hexdump0815 / linux-mainline-and-mali-generic-stable-kernel

my kind of generic armv7l 32bit linux mainline stable kernel build - used on bananapi m1, asus tinkerboard, tx1 allwinner h3 tv box, r39 allwinner h3 tv box, orbsmart s92 tv box (same as beelink r89, tronsmart orion r28, very similar to ubox tv box), raspberry pi 3b and 3b plus in 32bit mode
20 stars 12 forks source link

Add Module.symvers to images and packages #10

Open meden opened 2 years ago

meden commented 2 years ago

Having Module.symvers available somewhere would allow to (re-)compile kernel modules without the need to go through the full modules build.

hexdump0815 commented 2 years ago

@meden - this might be a good idea - which files would actually be required? there are some modules.* and a vmlinux.symvers after the kernel compile ...

hexdump0815 commented 2 years ago

@meden - i just noticed that on the veyron chromebook i'm right now running on the files are actually there in /lib/modules/kernel-version - is that not the case for your system?

update: sorry i was wrong - modules.symbols are there, but not Module.symvers

meden commented 2 years ago

which files would actually be required?

@hexdump0815 I'm not 100% sure, as it's very long time I was not building my kernel... :sweat_smile:

System.map (already provided in /boot) and Module.symvers (produced by make modules) are needed for sure. I think that you could find a good example about what is needed by looking at linux-headers packages from Debian, as they are used to compile standalone modules (dkms, manual compilation, even of out-of-tree modules).

A good thing would also be to document a bit the kernel versioning method you use: often the version qualifier is passed by EXTRAVERSION, but I see you used the LOCALVERSION directly in the .config (and curiously I found -stb-exy in the kernel config for stb-exy+).

hexdump0815 commented 2 years ago

@meden - the hint with the linux-headers-*.deb was a good one - it seems to contain all what is usually included there - i'll experiment a bit with putting some, most or all of this into the kernel tar.gz files maybe - but this might take some time, at least its on my todo list now

the naming is something i once started and it so far worked very well for me - its two 3 letter/digit sequences: the first is to describe the kernel source tree like stb for stable or bsp for some bsp tree etc. and the second is for the device or group of devices like av7 for my generic arm v7 kernel or exy for some samsung exynos systems - i at least tried to give a hint about the name in the kernel readmes now like https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel/blob/master/readme.av7#L7 ... its all not perfect, but as said it works surprisingly well for me for many years now

meden commented 2 years ago

the naming is something i once started and it so far worked very well for me

The naming is very effective indeed :slightly_smiling_face:. I was just saying that it would be nice to add this detail to the readme.

BTW, I found that the config for exy+ (which I used as base to re-compile my kernel) has CONFIG_LOCALVERSION set to stb-exy, so I'm not sure how this could produce the right kernel version...

hexdump0815 commented 2 years ago

@meden - the "+" in the name is automatically appended by the kernel build whenever the tree gets changed from its original version (by patches etc.)