summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@windriver.com>2022-03-31 15:21:53 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-03 10:40:31 +0100
commit2a02a178af98cc528a90ad87aacc3d99ebd81abc (patch)
tree71fbc70bfce7959e4fa00ffc53f8fd12a1d8fc52 /meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
parent708cbdf3c9d93b8cbfb5877e16a1e3fe0e274524 (diff)
downloadpoky-2a02a178af98cc528a90ad87aacc3d99ebd81abc.tar.gz
depmodwrapper: Use nonarch_base_libdir for depmod.d
This ensure that when depmod-native runs we can find the correct exclude.conf information, in this case adding .debug to ignore the .debug kernell modules. The kmod utilities like depmod can use either /etc/depmod.d or /lib/depmod.d. The kmod recipe is installing the existing search.conf to /lib/depmod.d (nonarch_base_lib) When the busybox modutils are used, /lib/depmod.d is not used, so it's safe add the exclude.conf file to /lib/depmod.d. (From OE-Core rev: af3a8c11a0561c9f0a8055d4b1c7703ce56205af) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb')
-rw-r--r--meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb9
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index 04fc14a6d2..65068f02df 100644
--- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -30,11 +30,16 @@ if [ -r "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" ]; then
30 kernelabi=\$(cat "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion") 30 kernelabi=\$(cat "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion")
31fi 31fi
32 32
33if [ ! -e "\3${nonarch_base_libdir}/depmod.d/exclude.conf" ]; then
34 mkdir -p "\$3${nonarch_base_libdir}/depmod.d"
35 echo "exclude .debug" > "\$3${nonarch_base_libdir}/depmod.d/exclude.conf"
36fi
37
33if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then 38if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then
34 echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2 39 echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
35 exec env depmod -C "\$3${sysconfdir}/depmod.d" "\$1" "\$2" "\$3" "\$4" 40 exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" "\$4"
36else 41else
37 exec env depmod -C "\$3${sysconfdir}/depmod.d" "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4" 42 exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
38fi 43fi
39EOF 44EOF
40 chmod +x ${D}${bindir_crossscripts}/depmodwrapper 45 chmod +x ${D}${bindir_crossscripts}/depmodwrapper