bobbydf
bobbydf

Reputation: 183

makefile compilation error for compiling on Arm board

I wanted to install rt8192cu driver on my ubuntu 12.0.4 LTS based OS (xillinux) running on an ARM processor (microzed board, zynq processor).

git clone https://github.com/dz0ny/rt8192cu.git

After I enter the above command and enter into the directory, and type make , i get the following error.

make[1]: Entering directory `/usr/src/kernels/3.12.0-xillinux-1.3'
Makefile:579: /usr/src/kernels/3.12.0-xillinux-1.3/arch/armv7l/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/kernels/3.12.0-xillinux-1.3/arch/armv7l/Makefile'.  Stop.
make[1]: Leaving directory `/usr/src/kernels/3.12.0-xillinux-1.3'
make: *** [modules] Error 2

The makefile can be found at https://github.com/dz0ny/rt8192cu/blob/master/Makefile

The ubuntu based OS I am using is, http://xillybus.com/downloads/doc/xillybus_getting_started_zynq.pdf

How do I modify the makefile to compile directly on my platform ?

Upvotes: 0

Views: 2769

Answers (2)

Alexey Vesnin
Alexey Vesnin

Reputation: 675

even with linux-headers installed sometimes it fails, a quick workaround is this:

ln -s /lib/modules/`uname -r`/build/arch/arm /lib/modules/`uname -r`/build/arch/armv7l

a long workaround is to compile your own config from source with the same dot-config file and install all the stuff.

Upvotes: 4

Francis Straccia
Francis Straccia

Reputation: 916

If I understand correctly you are trying to compile a Linux Kernel Module for the RT8192CU Wi-Fi IC. Moreover, you are running Ubuntu directly on the Zynq and you are trying to compile in place.

The error you receive is given by the lack of the Kernel headers, namely '3.12.0-xillinux-1.3', which should be the same kernel version you are using (try write uname -r in terminal).

The quickest way to solve is to let Ubuntu install the required sources/headers (provided the Kernel Module is targeting distribution-provided sources and you are running that specific kernel when issuing the following command) with

$ sudo apt-get install linux-headers-$(uname -r)

Upvotes: 1

Related Questions