GRMLBASE/16-depmod: no longer rely on /boot/System.map-* file
authorMichael Prokop <mika@grml.org>
Tue, 9 Mar 2021 17:54:09 +0000 (18:54 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 9 Mar 2021 18:03:57 +0000 (19:03 +0100)
commitfb26a16e6ba3deb6569dcd62adeb7cbcd23fcf05
tree0356b7b6a0f3da27d26b73f4d543b6f4a71999ea
parent22460471a5545cda771980009a55cf6e0efad799
GRMLBASE/16-depmod: no longer rely on /boot/System.map-* file

The System.map content was moved into Debian's debug package with kernel
5.8.10-1 and newer, see https://salsa.debian.org/kernel-team/linux.git:

| commit 26a6ecc287bdbe56ae5dd4fbbd32c76b57b9e690 (origin/waldi/update-5.8)
| Author: Bastian Blank <bastian.blank@credativ.de>
| Date:   Tue Aug 4 17:19:42 2020 +0200
|
|     Move System.map into debug package

Now it only contains a place holder:

| # cat /boot/System.map-5.10.0-4-amd64
ffffffffffffffff B The real System.map is in the linux-image-<version>-dbg package

Due to this, we get >134k entries like:

| depmod: WARNING: /lib/modules/5.10.0-4-amd64/kernel/arch/x86/events/rapl.ko needs unknown symbol x86_match_cpu

… resulting in a ~16MB log file (FAI's shell.log).

To avoid this, let's skip usage of depmod's `-e -F /boot/System.map-*'.

Note: It's probably not worth checking for 'The real System.map is in
the' inside the /boot/System.map-* file and only if it's not present
then consider using it, given that this string might change over time.

FTR: We usually also don't have the Module.symvers available for usage
with depmod's `-E` option, as the Module.symvers is part of the kernel
source package.

Closes: https://github.com/grml/grml-live/issues/99
etc/grml/fai/config/scripts/GRMLBASE/16-depmod