On 02/05/2020 13.32, Per Jessen wrote:
Carlos E. R. wrote:
you need to also build ax25 module that is required by
And you know this how? Maybe of course you happen to know. How am I
supposed to know?
'modinfo mkiss' will tell you ("depends"), but I think it was also
evident in the config menu you posted some of earlier.
cer@Telcontar:~/tmp/kernel> modinfo mkiss
modinfo: ERROR: Module mkiss not found.
In the search in "menuconfig", perhaps:
.config - Linux/x86 4.12.14 Kernel Configuration
→ Search (mkiss) ─────────────────────────────────────────────────────────────
┌──────────────────────────── Search Results ─────────────────────────────┐
│ Symbol: MKISS [=n] │
│ Type : tristate │
│ Prompt: Serial port KISS driver │
│ Location: │
│ -> Networking support (NET [=y]) │
│ (1) -> Amateur Radio support (HAMRADIO [=n]) │
│ -> Amateur Radio AX.25 Level 2 protocol (AX25 [=n]) │
│ -> AX.25 network device drivers │
│ Defined at drivers/net/hamradio/Kconfig:1 │
│ Depends on: NET [=y] && HAMRADIO [=n] && AX25 [=n] && TTY
│ Selects: CRC16 [=y] │
│ < Exit > │
bor@leap15:/usr/src/linux> cp -a net/ax25 /tmp
Ah, you copy a part of the source directory to a temporary directory
outside. Well, the readme fails to explain this. I don't see why the
original sources can not be used and we need a copy, the make process
is not supposed to write to the source files.
The whole idea is building an out-of-tree module - the process presumes
the source is _not_ part of the kernel sources. That's why Andrei
created a copy somewhere else.
If I had sent you a tarball with the module sources, you would probably
also have untar'ed into your homedir, e.g. /home/carlos/pers-mkiss/
It is somewhat absurd, the kernel sources are already in /usr/src/linux, they should have
designed a method to do it without replicating the tree.
Anyway, I am trying, and I got:
drwxr-xr-x 8 cer users 222 May 2 13:36 ./
drwxr-xr-x 121 cer users 8192 May 2 12:42 ../
-rw-r--r-- 1 cer users 22 May 2 13:32 .21461.d
-rw-r--r-- 1 cer users 200427 May 2 13:36 .config
-rw-r--r-- 1 cer users 200089 May 2 13:32 .config.old
-rw-r--r-- 1 cer users 200089 May 2 13:34 .configcopy
-rw-r--r-- 1 cer users 850 May 2 13:32 .missing-syscalls.d
drwxr-xr-x 2 cer users 6 May 2 13:32 .tmp_versions/
-rw-r--r-- 1 cer users 629 May 2 13:34 Makefile
drwxr-xr-x 3 cer users 17 May 2 13:32 arch/
drwxr-xr-x 4 cer users 37 May 2 13:32 include/
drwxr-xr-x 2 cer users 43 May 2 13:32 kernel/
drwxr-xr-x 7 cer users 291 May 2 13:32 scripts/
lrwxrwxrwx 1 cer users 34 May 2 13:34 source ->
drwxr-xr-x 3 cer users 21 May 2 13:32 tools/
As you see, the sources were symlinked by the preparation scripts.
Why copy them again?
I am follwing the readme, method one:
BUILDING ADDITIONAL (EXTERNAL) MODULES
(1) by configuring the kernel sources in a separate build directory
(see HOW TO CONFIGURE THE KERNEL SOURCES), or
(2) by using one of the standard configurations in
(3) by creating a Kernel Module Package (KMP) as described in the
Kernel Module Packages Manual, https://drivers.suse.com/doc/kmpm/
The first method involves the following steps:
(1) Install the kernel-source package.
(2) Configure the kernel, see HOW TO CONFIGURE THE KERNEL SOURCES.
(3) Create files required for compiling external modules:
``make prepare'' and ``make scripts''.
However, I did first the prepare and scripts, then menuconfig, in that order. First time I
notice the instructions in reverse order.
(4) Compile the module(s) by changing into the module source directory
and typing ``make -C $(your_build_dir) M=$(pwd)''.
cer@Telcontar:~/tmp/kernel> cd 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’:
WARNING: Symbol version dump ./Module.symvers
is missing; modules will have no dependencies and modversions.
ar: /home/cer/tmp/kernel/source/net/ax25/built-in.o: Permission denied
make: *** [/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: *** [/usr/src/linux-4.12.14-lp151.28.48/Makefile:1569:
_module_/home/cer/tmp/kernel/source/net/ax25] Error 2
make: *** [Makefile:152: sub-make] Error 2
make: *** [Makefile:24: __sub-make] Error 2
make: Leaving directory '/home_aux/cer/tmp/kernel'
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
(5) Install the module(s) by typing
``make -C $(your_build_dir) M=$(pwd) modules_install''.
Cheers / Saludos,
Carlos E. R.
(from 15.1 x86_64 at Telcontar)