Cyclone V SOC WS-3 linux device driver

Hello All,

I am using Cyclone V from Terasic Soc kit and now trying to make driver for Hps to FPGA bridge.

I have Quartus and SOCEDS 15.0.

I have started with Workshop 3 from rocketboard.

So, I download image, set ENVIRONMENT variable.

After that I try to execute first example which is lab_module.

So basically I create KBUILD file, make file and after that While, I am trying to executete Make file I got error: makefile:2 *** OUT_DIR is undefined, bad environment. you point OUT_DIR to the linux kernel build ouutput Directory & stop.(PFA)

Basically I am not able to execute make and it seems to be compilation error, and I am not able to build the kernel module.

I already cross check environmental variable, its:
export ARCH=arm; (for ARM achitecture)
export CROSS_COMPILE= /toolchain/arm-linux-gnueabihf (cross compiler toolchain)
export OUT_DIR=/socfpga-3.10-ltsi (linux kernel source tree)

Could any one help me to solve this?

this error message is defined in Makefile of this Workshop. You can see it exactly at lines 14-16:
ifndef OUT_DIR
$(error OUT_DIR is undefined, bad environment, you point OUT_DIR to the linux kernel build output directory)

So, are You absolutely sure that the variable OUT_DIR is set properly?