On 03/05/2020 12.39, Carlos E. R. wrote:
On 01/05/2020 20.48, Carlos E. R. wrote:
On 01/05/2020 16.28, Carlos E. R. wrote:
On 01/05/2020 01.06, Marc Chamberlin wrote:
On 4/29/20 12:10 AM, Carlos E. R. wrote:
On 29/04/2020 06.13, Marc Chamberlin wrote:
...
...
(4) Compile the module(s) by changing into the module source directory and typing ``make -C $(your_build_dir) M=$(pwd)''.
Let's try.
cer@Telcontar:~/tmp/kernel> cd source/net/ax25/ cer@Telcontar:~/tmp/kernel/source/net/ax25> pwd /home/cer/tmp/kernel/source/net/ax25 cer@Telcontar:~/tmp/kernel/source/net/ax25>
Now, what is "my_build_dir"? "/home/cer/tmp/kernel/"? It fails:
cer@Telcontar:~/tmp/kernel/source/net/ax25> make -C /home/cer/tmp/kernel/ M=$(pwd) make: Entering directory '/home_aux/cer/tmp/kernel' arch/x86/Makefile:136: CONFIG_X86_X32 enabled but no binutils support mkdir: cannot create directory ‘/home/cer/tmp/kernel/source/net/ax25/.tmp_versions’: Permission denied
WARNING: Symbol version dump ./Module.symvers is missing; modules will have no dependencies and modversions.
LD /home/cer/tmp/kernel/source/net/ax25/built-in.o ar: /home/cer/tmp/kernel/source/net/ax25/built-in.o: Permission denied make[3]: *** [/usr/src/linux-4.12.14-lp151.28.48/scripts/Makefile.build:479: /home/cer/tmp/kernel/source/net/ax25/built-in.o] Error 1 make[2]: *** [/usr/src/linux-4.12.14-lp151.28.48/Makefile:1569: _module_/home/cer/tmp/kernel/source/net/ax25] Error 2 make[1]: *** [Makefile:152: sub-make] Error 2 make: *** [Makefile:24: __sub-make] Error 2 make: Leaving directory '/home_aux/cer/tmp/kernel' cer@Telcontar:~/tmp/kernel/source/net/ax25>
Well, obviously permission denied. It is trying to write to "/usr/src/linux", not to my build directory... So what is the incantation, following the readme.suse method one, and a user, not root, directory and permissions?
STUCK.
More attempts. I created copy: cer@Telcontar:~/tmp/kernel> ls local ax25 hamradio cer@Telcontar:~/tmp/kernel> And tried to compile - no go. cer@Telcontar:~/tmp/kernel/local/ax25> cd .. cer@Telcontar:~/tmp/kernel/local> cd .. cer@Telcontar:~/tmp/kernel> make M=./local/ ax25/ hamradio/ cer@Telcontar:~/tmp/kernel> make M=./local/ax25/ WARNING: Symbol version dump ./Module.symvers is missing; modules will have no dependencies and modversions. /usr/src/linux-4.12.14-lp151.28.48/scripts/Makefile.build:44: /usr/src/linux-4.12.14-lp151.28.48/./local/ax25//Makefile: No such file or directory make[3]: *** No rule to make target '/usr/src/linux-4.12.14-lp151.28.48/./local/ax25//Makefile'. Stop. make[2]: *** [/usr/src/linux-4.12.14-lp151.28.48/Makefile:1569: _module_./local/ax25/] Error 2 make[1]: *** [Makefile:152: sub-make] Error 2 make: *** [Makefile:24: __sub-make] Error 2 cer@Telcontar:~/tmp/kernel> make -C /usr/src/linux-obj/x86_64/default M=./local/ax25/ make: Entering directory '/usr/src/linux-4.12.14-lp151.28.48-obj/x86_64/default' arch/x86/Makefile:136: CONFIG_X86_X32 enabled but no binutils support mkdir: cannot create directory ‘./local’: Permission denied mkdir: cannot create directory ‘./local’: Permission denied /usr/src/linux-4.12.14-lp151.28.48/scripts/Makefile.build:44: /usr/src/linux-4.12.14-lp151.28.48/./local/ax25//Makefile: No such file or directory make[3]: *** No rule to make target '/usr/src/linux-4.12.14-lp151.28.48/./local/ax25//Makefile'. Stop. make[2]: *** [/usr/src/linux-4.12.14-lp151.28.48/Makefile:1569: _module_./local/ax25/] Error 2 make[1]: *** [Makefile:152: sub-make] Error 2 make: *** [Makefile:24: __sub-make] Error 2 make: Leaving directory '/usr/src/linux-4.12.14-lp151.28.48-obj/x86_64/default' cer@Telcontar:~/tmp/kernel> l .local ls: cannot access '.local': No such file or directory cer@Telcontar:~/tmp/kernel> l ./local total 4 drwxr-xr-x 4 cer users 34 May 3 14:10 ./ drwxr-xr-x 9 cer users 235 May 3 14:09 ../ drwxr-xr-x 3 cer users 4096 May 3 14:14 ax25/ drwxr-xr-x 2 cer users 247 May 2 13:30 hamradio/ cer@Telcontar:~/tmp/kernel> mc cer@Telcontar:~/tmp/kernel> make -C /usr/src/linux-obj/x86_64/default M=local/ax25/ make: Entering directory '/usr/src/linux-4.12.14-lp151.28.48-obj/x86_64/default' arch/x86/Makefile:136: CONFIG_X86_X32 enabled but no binutils support mkdir: cannot create directory ‘local’: Permission denied mkdir: cannot create directory ‘local’: Permission denied /usr/src/linux-4.12.14-lp151.28.48/scripts/Makefile.build:44: /usr/src/linux-4.12.14-lp151.28.48/local/ax25//Makefile: No such file or directory make[3]: *** No rule to make target '/usr/src/linux-4.12.14-lp151.28.48/local/ax25//Makefile'. Stop. make[2]: *** [/usr/src/linux-4.12.14-lp151.28.48/Makefile:1569: _module_local/ax25/] Error 2 make[1]: *** [Makefile:152: sub-make] Error 2 make: *** [Makefile:24: __sub-make] Error 2 make: Leaving directory '/usr/src/linux-4.12.14-lp151.28.48-obj/x86_64/default' cer@Telcontar:~/tmp/kernel> make -C /usr/src/linux-obj/x86_64/default M=local/ax25/ CONFIG_AX25=m make: Entering directory '/usr/src/linux-4.12.14-lp151.28.48-obj/x86_64/default' arch/x86/Makefile:136: CONFIG_X86_X32 enabled but no binutils support mkdir: cannot create directory ‘local’: Permission denied mkdir: cannot create directory ‘local’: Permission denied /usr/src/linux-4.12.14-lp151.28.48/scripts/Makefile.build:44: /usr/src/linux-4.12.14-lp151.28.48/local/ax25//Makefile: No such file or directory make[3]: *** No rule to make target '/usr/src/linux-4.12.14-lp151.28.48/local/ax25//Makefile'. Stop. make[2]: *** [/usr/src/linux-4.12.14-lp151.28.48/Makefile:1569: _module_local/ax25/] Error 2 make[1]: *** [Makefile:152: sub-make] Error 2 make: *** [Makefile:24: __sub-make] Error 2 make: Leaving directory '/usr/src/linux-4.12.14-lp151.28.48-obj/x86_64/default' cer@Telcontar:~/tmp/kernel> F** it. Build it all. cer@Telcontar:~/tmp/kernel> make -C /usr/src/linux O=$PWD modules make: Entering directory '/usr/src/linux-4.12.14-lp151.28.48' make[1]: Entering directory '/home_aux/cer/tmp/kernel' GEN ./Makefile scripts/kconfig/conf --silentoldconfig Kconfig CHK include/config/kernel.release ... This takes a loooong time to run. Uses a single CPU core, I don't know how to parallelize it. ... IHEX2FW firmware/keyspan_pda/keyspan_pda.fw IHEX2FW firmware/keyspan_pda/xircom_pgs.fw IHEX firmware/cpia2/stv0672_vp4.bin make[1]: Leaving directory '/home_aux/cer/tmp/kernel' make: Leaving directory '/usr/src/linux-4.12.14-lp151.28.48' cer@Telcontar:~/tmp/kernel> And the module is there! cer@Telcontar:~/tmp/kernel> l ~/tmp/kernel/drivers/net/hamradio total 1120 drwxr-xr-x 2 cer users 184 May 3 15:31 ./ drwxr-xr-x 27 cer users 8192 May 3 15:32 ../ -rw-r--r-- 1 cer users 263 May 3 15:31 .mkiss.ko.cmd -rw-r--r-- 1 cer users 39051 May 3 15:31 .mkiss.mod.o.cmd -rw-r--r-- 1 cer users 76444 May 3 15:02 .mkiss.o.cmd -rw-r--r-- 1 cer users 579688 May 3 15:31 mkiss.ko -rw-r--r-- 1 cer users 966 May 3 15:28 mkiss.mod.c -rw-r--r-- 1 cer users 74288 May 3 15:31 mkiss.mod.o -rw-r--r-- 1 cer users 340544 May 3 15:02 mkiss.o -rw-r--r-- 1 cer users 0 May 3 15:28 modules.builtin -rw-r--r-- 1 cer users 37 May 3 15:02 modules.order cer@Telcontar:~/tmp/kernel> try to load them (modprobe fails as it searchs another place): Telcontar:/home/cer/tmp/kernel # insmod ./net/ax25/ax25.ko Telcontar:/home/cer/tmp/kernel # insmod ./drivers/net/hamradio/mkiss.ko Telcontar:/home/cer/tmp/kernel # lsmod | grep "mkiss\|ax25" mkiss 20480 0 ax25 73728 1 mkiss Telcontar:/home/cer/tmp/kernel # Done. :-) -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)