Power & Source of Big Ideas

Broken link of kernel build and source

Moderators: chensy, FATechsupport

When I install a XR driver on NanoPi Duo2 using the command "make", I got the following error message:

10:09 root@G2:XR21B1411-RS-485-driver# make
make -C /lib/modules/4.14.111/build M=/root/C/XR21B1411-RS-485-driver
make[1]: *** /lib/modules/4.14.111/build: No such file or directory. Stop.
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2

I went to check the directory /lib/modules/4.14.111 and found out that the file "build" and "source" are broken link, which they point to some directory that does not exist (and both appear red). The list of the kernel folder are shown as below:

10:41 root@G2:XR21B1411-RS-485-driver# ls -l /lib/modules/4.14.111
total 1354
lrwxrwxrwx 1 root root 59 May 22 2019 build -> /root/2.source/board/tools/rom-manager/src/plat/sunxi/linux
drwxr-xr-x 2 root root 4096 May 22 2019 extra
drwxr-xr-x 8 root root 4096 May 22 2019 kernel
-rw-r--r-- 1 root root 428003 Sep 5 15:04 modules.alias
-rw-r--r-- 1 root root 439138 Sep 5 15:04 modules.alias.bin
-rw-r--r-- 1 root root 12732 May 22 2019 modules.builtin
-rw-r--r-- 1 root root 15252 Sep 5 15:04 modules.builtin.bin
-rw-r--r-- 1 root root 73920 Sep 5 15:04 modules.dep
-rw-r--r-- 1 root root 123313 Sep 5 15:04 modules.dep.bin
-rw-r--r-- 1 root root 125 Sep 5 15:04 modules.devname
-rw-r--r-- 1 root root 43677 May 22 2019 modules.order
-rw-r--r-- 1 root root 352 Sep 5 15:04 modules.softdep
-rw-r--r-- 1 root root 101486 Sep 5 15:04 modules.symbols
-rw-r--r-- 1 root root 130506 Sep 5 15:04 modules.symbols.bin
lrwxrwxrwx 1 root root 59 May 22 2019 source -> /root/2.source/board/tools/rom-manager/src/plat/sunxi/linux

I don't understand why build and source are linked to the directoty /root/2.source/board/tools/rom-manager/src/plat/sunxi/linux. From google, I think I should expect to see the link to be something like build -> /usr/src/(kernel version), but my /usr/src directory is empty somehow.

Can someone please advice me what to do next?
Maggie777 wrote:
please advice me what to do next?


Better start with Armbian: https://github.com/armbian/build
Hi Igorp, any chance you can give a hint regarding what to take from https://github.com/armbian/build in order to fix the two broken symlinks:
/lib/modules/4.14.111/build
/lib/modules/4.14.111/source

Its my first attempt at building batman-adv. And i am lost.
nanoelec wrote:
any chance you can give


Now is your time to give something.

https://www.armbian.com/get-involved/
https://forum.armbian.com/staffapplications/
https://www.armbian.com/donate

Then I will give you another hint.

Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 14 guests