wildcat_paris Posted October 13, 2015 Posted October 13, 2015 Hello Igor, greatings everyone, I have realized the "build" link is missing to the /usr/src/linux-headers-x.x.x-sunxi Ubuntu Trusty (x86/amd64 kernel) provides such a link I was building a small kernel module from source (frandom-dkms) on my labomo-r1 gr@bpi:/lib/modules/4.2.3-sunxi$ ll total 1260 drwxr-xr-x 4 root root 4096 Oct 13 18:34 ./ drwxr-xr-x 3 root root 4096 Oct 13 15:20 ../ lrwxrwxrwx 1 root root 34 Oct 13 14:23 build -> /usr/src/linux-headers-4.2.3-sunxi/ drwxr-xr-x 9 root root 4096 Oct 13 15:20 kernel/ -rw-r--r-- 1 root root 360156 Oct 13 18:34 modules.alias -rw-r--r-- 1 root root 367304 Oct 13 18:34 modules.alias.bin -rw-r--r-- 1 root root 14935 Oct 11 14:12 modules.builtin -rw-r--r-- 1 root root 17813 Oct 13 18:34 modules.builtin.bin -rw-r--r-- 1 root root 82602 Oct 13 18:34 modules.dep -rw-r--r-- 1 root root 128280 Oct 13 18:34 modules.dep.bin -rw-r--r-- 1 root root 128 Oct 13 18:34 modules.devname -rw-r--r-- 1 root root 40034 Oct 11 14:12 modules.order -rw-r--r-- 1 root root 131 Oct 13 18:34 modules.softdep -rw-r--r-- 1 root root 103401 Oct 13 18:34 modules.symbols -rw-r--r-- 1 root root 131685 Oct 13 18:34 modules.symbols.bin drwxr-xr-x 3 root root 4096 Oct 13 18:34 updates/ without the link: gr@bpi:~/frandom/frandom-master$ ls CHANGELOG debian description-pak etc frandom.c INSTALL Makefile README usr gr@bpi:~/frandom/frandom-master$ make make -C /lib/modules/4.2.3-sunxi/build SUBDIRS=/home/gr/frandom/frandom-master modules make: *** /lib/modules/4.2.3-sunxi/build: No such file or directory. Stop. make: *** [default] Error 2 with the link: gr@bpi:~/frandom/frandom-master$ make make -C /lib/modules/4.2.3-sunxi/build SUBDIRS=/home/gr/frandom/frandom-master modules make[1]: Entering directory `/home2/src/linux-headers-4.2.3-sunxi' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/gr/frandom/frandom-master/.tmp_versions ; rm -f /home/gr/frandom/frandom-master/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/gr/frandom/frandom-master gcc -Wp,-MD,/home/gr/frandom/frandom-master/.frandom.o.d -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.8/include -I./arch/arm/include -Iarch/arm/include/generated/uapi -Iarch/arm/include/generated -Iinclude -I./arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp -funwind-tables -marm -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(frandom)" -D"KBUILD_MODNAME=KBUILD_STR(frandom)" -c -o /home/gr/frandom/frandom-master/frandom.o /home/gr/frandom/frandom-master/frandom.c (cat /dev/null; echo kernel//home/gr/frandom/frandom-master/frandom.ko;) > /home/gr/frandom/frandom-master/modules.order make -f ./scripts/Makefile.modpost find /home/gr/frandom/frandom-master/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -i ./Module.symvers -I /home/gr/frandom/frandom-master/Module.symvers -o /home/gr/frandom/frandom-master/Module.symvers -S -w -s -T - gcc -Wp,-MD,/home/gr/frandom/frandom-master/.frandom.mod.o.d -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.8/include -I./arch/arm/include -Iarch/arm/include/generated/uapi -Iarch/arm/include/generated -Iinclude -I./arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp -funwind-tables -marm -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(frandom.mod)" -D"KBUILD_MODNAME=KBUILD_STR(frandom)" -DMODULE -c -o /home/gr/frandom/frandom-master/frandom.mod.o /home/gr/frandom/frandom-master/frandom.mod.c ld -EL -r -T ./scripts/module-common.lds --build-id -o /home/gr/frandom/frandom-master/frandom.ko /home/gr/frandom/frandom-master/frandom.o /home/gr/frandom/frandom-master/frandom.mod.o make[1]: Leaving directory `/home2/src/linux-headers-4.2.3-sunxi' gr@bpi:~/frandom/frandom-master$ ls CHANGELOG description-pak frandom.c frandom.mod.c frandom.o Makefile Module.symvers usr debian etc frandom.ko frandom.mod.o INSTALL modules.order README thanks! Guillaume
Igor Posted October 14, 2015 Posted October 14, 2015 There is / must be a link to headers / sources on all images for at least a year. If you did an kernel upgrade, than you need to upgrade headers too. I checked some of my running configurations and all have a valid link. Ahaa, I see. Naming is wrong. BTW. Latest image works as expected. I compiled some driver without a problem.
wildcat_paris Posted October 14, 2015 Author Posted October 14, 2015 Igor, let's see with 4.6 I keep you in touch if needed. 1/ I have observed the situation from Armbian 4.3 -> 4.5 2/ Or is it the "image-only" kernel 4.5 you tendered me to check if zram module was ok. I switched back to 4.4 after, reinstalling all the 4.4 (kernel, header, boot, etc.), then installing my own compiled 4.5, then overwritten with the Armbian 4.5 you have published. => you cannot imagine all the tricky things your users(&fans) can do! Thks!
wildcat_paris Posted October 18, 2015 Author Posted October 18, 2015 removed -- new topic "report on testing lib"
wildcat_paris Posted November 1, 2015 Author Posted November 1, 2015 (edited) @Igor testing beta Armbian 4.6 kernel 4.2.5-sunxi => link is here: FIXED or NON-ISSUE thanks! gr@bpi:~$ ll /lib/modules/4.2.5-sunxi/ total 1272 drwxr-xr-x 3 root root 4096 Nov 1 21:34 ./ drwxr-xr-x 4 root root 4096 Nov 1 21:32 ../ lrwxrwxrwx 1 root root 34 Nov 1 21:07 build -> /usr/src/linux-headers-4.2.5-sunxi/ drwxr-xr-x 9 root root 4096 Nov 1 21:34 kernel/ -rw-r--r-- 1 root root 363960 Nov 1 21:07 modules.alias -rw-r--r-- 1 root root 371810 Nov 1 21:07 modules.alias.bin -rw-r--r-- 1 root root 15005 Nov 1 21:07 modules.builtin -rw-r--r-- 1 root root 17938 Nov 1 21:07 modules.builtin.bin -rw-r--r-- 1 root root 84867 Nov 1 21:07 modules.dep -rw-r--r-- 1 root root 132053 Nov 1 21:07 modules.dep.bin -rw-r--r-- 1 root root 128 Nov 1 21:07 modules.devname -rw-r--r-- 1 root root 41209 Nov 1 21:07 modules.order -rw-r--r-- 1 root root 55 Nov 1 21:07 modules.softdep -rw-r--r-- 1 root root 104578 Nov 1 21:07 modules.symbols -rw-r--r-- 1 root root 133118 Nov 1 21:07 modules.symbols.bin Edited November 1, 2015 by wildcat_paris
Recommended Posts