Workaround Debian's fake System.map behavior
Debian ships fake System.map files by default, leading to the invocation of depmod with them to flood you with errors about missing symbols. Let's notice and not do that. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #12862
This commit is contained in:
parent
eecd3f1a21
commit
f68b9c81c8
|
@ -90,7 +90,15 @@ modules_install-Linux:
|
|||
if [ -n "$(DESTDIR)" ]; then \
|
||||
find $$kmoddir -name 'modules.*' | xargs $(RM); \
|
||||
fi
|
||||
@# Debian ships tiny fake System.map files that are
|
||||
@# syntactically valid but just say
|
||||
@# "if you want system.map go install this package"
|
||||
@# Naturally, depmod is less than amused by this.
|
||||
@# So if we find it missing or with one of these present,
|
||||
@# we check for the alternate path for the System.map
|
||||
sysmap=$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
|
||||
{ [ -f "$$sysmap" ] && [ $$(wc -l < "$$sysmap") -ge 100 ]; } || \
|
||||
sysmap=$(INSTALL_MOD_PATH)/usr/lib/debug/boot/System.map-@LINUX_VERSION@; \
|
||||
if [ -f $$sysmap ]; then \
|
||||
depmod -ae -F $$sysmap @LINUX_VERSION@; \
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue