Dear moderators and colleagues,
Please tell me right
step-by-step instruction how to compile device drivers for OrangePi from sources.
I have a particular task now - to make my usb wifi dongle with RTL8188CUS chipset working in OrangePi (Ubuntu Mate distributive)
I've downloaded needed driver
from Realtek website, made some changes in makefile accodring target architecture, installed build-essential and started to compile the driver on OrangePi, but got the error:
- orangepi@OrangePI:~/rtl8188C$ make
- make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/3.4.39/build M=/home/orangepi/rtl8188C modules
- make[1]: *** /lib/modules/3.4.39/build: No such file or directory. Stop.
- Makefile:584: recipe for target 'modules' failed
- make: *** [modules] Error 2
I found that /lib/modules/3.4.39/build it a symlink that lead to non-existent directory /home/LoBo2_Razno/OrangePI/kernel_3.4.9/linux-3.4. Seem like it was a path to kernel sources at OrangePi developer's machine, so I substitute it with linux-3.4 from
Github.
However finally I still got the error:
- ERROR: Kernel configuration is invalid.
- include/generated/autoconf.h or include/config/auto.conf are missing.
- Run 'make oldconfig && make prepare' on kernel src to fix it.
(full error log
here)
I assumed that I need to build kernel previously and started to do at my desktop machine. But during kernel build I again got the error:
- pavel@pavel-IdeaPad-U310T:/drive_d/OrangePI-Kernel-master$ sudo ./build_linux_kernel.sh 2
- Building kernel for OPI-2 () ...
- Configuring ...
- Building kernel & modules ...
- Error: KERNEL NOT BUILT.
Full content of kbuild_2_.log is
here.
What was I doing wrong and what is a right sequence of compiling drivers from sources for OrangePi?