On 15/03/15 05:18, Niels de Vos wrote:
On 2015-03-13 19:19, Robert Brown wrote:
> I am trying to compile a module for FC22 Rawhide on an A10 device
> (MK802ii) with a uname -r of 3.19.0-0.rc7.git3.1.fc22.armv7hl but am
> getting a truncated vermagic: vermagic: 3.19.0-rc7 SMP
> mod_unload ARMv7 p2v8
> The .config I am using is a copy of the
> I have tried editing LOCALVERSION without success.
> If I edit the Makefile from the rpmbuild process to:
> SUBLEVEL = 0-0
> EXTRAVERSION = rc7.git3.1.fc22.armv7hl
> or to
> SUBLEVEL = 0
> EXTRAVERSION = -0.rc7.git3.1.fc22.armv7hl
> I still only get vermagic: 3.19.0-0.rc7 SMP mod_unload ARMv7 p2v8
> The version.h file generated in include/generated/uapi/linux/
> says #define LINUX_VERSION_CODE 201472
> whereas the one in /usr/include/linux/version.h says
> #define LINUX_VERSION_CODE 201728
> Any tips on where to go with this?
This is actually the same for arm or any other Fedora kernel. You will
have the kernel-devel package installed for the kernel that you want
the module for. And, after that, you can find the sources of your
build only the module for that kernel with:
$ make -C /lib/modules/$(uname -r)/build M=$PWD/fs/fuse/
The above would (try to) compile the fuse.ko module for the current
Thanks that's helpful for just compiling the one module.
The current working directory would be a (git) repository where the
sources/branch is available.
In case the kernel module that you want to compile needs extra .config
(that do not affect the rest of the kernel/modules), you should be
able to pass
them on the 'make' command line:
$ make -C .... EXTRA_CFLAGS="-DCONFIG_SOME_DRIVER=m" M=...
to try cross-compiling as I figured it would be far quicker on
the laptop than on the device. I used the same .config, Makefile and
kernel sources but had no success getting the required vermagic until I put
into the .config file and set
SUBLEVEL = 0
in the Makefile. This gave me the desired result.
So, encouraged, I tried again on the device (i.e. not cross compiling)
but again no good.
Decided to delete the file Module.symvers so it would re-build on the
next run and straight away I had success.
Is this documented?
Went on to compile the r8188eu from github as suggested by Clive Messer
as the Staging version was buggy. So far so good.