From 8514269b3c30ac4e20600837c4746f0ce0392f2c Mon Sep 17 00:00:00 2001 From: who0 Date: Fri, 27 Jul 2018 11:57:43 -0400 Subject: [PATCH] If you compress modules (CONFIG_MODULE_COMPRESS) genkernel could not find .ko.(gz|xz) modules. - update changes modules_kext() to configure right $KEXT with kernel parameters When booting, modules are not correctly find unless you run depmod -a Minor change typo --- defaults/linuxrc | 3 +++ gen_initramfs.sh | 4 ++-- gen_moddeps.sh | 13 +++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/defaults/linuxrc b/defaults/linuxrc index ad33ae81..a2938a89 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -19,6 +19,9 @@ mount -t tmpfs -o rw,nosuid,nodev,relatime,mode=755 none /run 2>&1 /bin/busybox --install -s +#Reck Modules +depmod -a + if [ "$0" = "/init" ]; then rm -f /linuxrc fi diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 955b2735..57dfb161 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -777,7 +777,7 @@ print_list() append_modules() { local group local group_modules - local MOD_EXT=".ko" + local MOD_EXT=`modules_kext` print_info 2 "initramfs: >> Searching for modules..." if [ "${INSTALL_MOD_PATH}" != '' ] @@ -821,7 +821,7 @@ append_modules() { } append_drm() { - local MOD_EXT=".ko" + local MOD_EXT=`modules_kext` print_info 2 "initramfs: >> Appending drm drivers..." if [ "${INSTALL_MOD_PATH}" != '' ] diff --git a/gen_moddeps.sh b/gen_moddeps.sh index 27dab487..ec9023f3 100755 --- a/gen_moddeps.sh +++ b/gen_moddeps.sh @@ -4,6 +4,19 @@ modules_kext() { KEXT=".ko" +#Testing modules compressiona to add right extension +#CONFIG_MODULE_COMPRESS_XZ=y +#CONFIG_MODULE_COMPRESS_GZIP=y + +if [ xy == x`kconfig_get_opt ${KERNEL_CONFIG} "CONFIG_MODULE_COMPRESS"` ] +then + if [ "xy" = x`kconfig_get_opt ${KERNEL_CONFIG} "CONFIG_MODULE_COMPRESS_XZ"` ] + then + KEXT="$KEXT.xz" + else + KEXT="$KEXT.gz" + fi +fi echo ${KEXT} }