On 02/05/2020 17.34, Andrei Borzenkov wrote:
02.05.2020 13:34, Carlos E. R. пишет:
Telcontar:/usr/src/linux # grep -i mkiss .config CONFIG_MKISS=m Telcontar:/usr/src/linux #
You must not compile anything inside /usr/src/linux. README.SUSE makes it pretty clear.
I explained why I don't:
]> Notes: ]> ]> a) Purists will say that it is wrong to do this as root. Well, it happens that none of the above runs as user, because of the ownership of the files. Doing as user is more complicated, so I will not.
Can you explain how to do it?
I included full example how to do it.
Sorry, not clear to me the methodology.
(4) Compile the module(s) by changing into the module source directory and typing ``make -C $(your_build_dir) M=$(pwd)''.
Fails.
This explains how to compile external module, not module that is part of kernel tree.
Ok, then point me to the correct chapter in the readme.
(3) Compile the module(s) by changing into the module source directory and typing ``make -C /usr/src/linux-obj/$ARCH/$FLAVOR M=$(pwd)''. Substitute $ARCH and $FLAVOR with the architecture and flavor for which to build the module(s).
Seems to me that it is doing the operation directly on the /usr/src/linux directory as root.
Once again - this is for compiling external module that is not part of kernel tree.
Clear as mud to me that readme.
Of course you need to also build ax25 module that is required by mkiss, so
And you know this how?
By building mkiss and observing missing symbols?
It doesn't build at all here... I see no reports of missing symbols.
Maybe of course you happen to know. How am I supposed to know?
I have never heard about mkiss module until this thread either.
Anyway:
cer@Telcontar:/usr/src/linux> grep -i ax25 .config CONFIG_AX25=y CONFIG_AX25_DAMA_SLAVE=y cer@Telcontar:/usr/src/linux>
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.
Readme presumes basic understanding of kernel build system.
The Readme is presumed to explain every needed thing.
And once again - readme talks about building external module. "External module" is by definition module that is not part of kernel tree.
Obviously not clear to me.
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.
Make process builds external module in place. It writes into directory where external module (source) is located.
bor@leap15:/usr/src/linux> sed -ie 's/\(obj-\)$(CONFIG_AX25)/\1m/' /tmp/ax25/Makefile
I have no idea what this is doing, sorry.
This is end result of configuring kernel to include AX25 as module. This config variable is undefined because this module is disabled in configuration, so in kernel tree Makefile does nothing. This sed invocation simply replaces variable by its value. If you do not like editing makefile, you could also simply set this variable when calling make, this is indeed more simple.
Sorry, but I can not read sed commands. But Per explained this morning what that line does: edit subdir/hamradio/Makefile: replace '$(CONFIG_MKISS)' with 'm'. edit subdir/ax25/Makefile: replace '$(CONFIG_AX25)' with 'm'. ;-) -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)