commit:     675e5bf8efaefc2769c74dd2576f49ac5dc6437d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 27 15:23:23 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Nov 27 16:18:57 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=675e5bf8

gen_determineargs.sh: determine_real_args(): Create kernel module group for 
additional modules

This is needed to get modules, used by genkernel features,
like bcache module which is used by "dobcache" feature,
into initramfs.

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_determineargs.sh | 9 +++++++++
 gen_moddeps.sh       | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index 6326a5e..a5bebd5 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -787,6 +787,10 @@ determine_real_args() {
 
        if isTrue "${BUILD_RAMDISK}"
        then
+               # Internal module group to get modules used in genkernel 
features
+               # into initramfs.
+               GK_INITRAMFS_ADDITIONAL_KMODULES=""
+
                if [[ "${CMD_BOOTFONT}" != "none" ]]
                then
                        if [[ "${CMD_BOOTFONT}" == "current" ]]
@@ -851,6 +855,11 @@ determine_real_args() {
                        fi
                fi
 
+               if isTrue "${BCACHE}"
+               then
+                       GK_INITRAMFS_ADDITIONAL_KMODULES+=" bcache"
+               fi
+
                if isTrue "${ZFS}"
                then
                        if isTrue "$(tc-is-cross-compiler)"

diff --git a/gen_moddeps.sh b/gen_moddeps.sh
index 1664c33..5e6c980 100755
--- a/gen_moddeps.sh
+++ b/gen_moddeps.sh
@@ -9,7 +9,7 @@ gen_dep_list() {
                rm -f "${TEMP}/moddeps" >/dev/null
 
                local group_modules
-               for group_modules in ${!MODULES_*}
+               for group_modules in ${!MODULES_*} 
GK_INITRAMFS_ADDITIONAL_KMODULES
                do
                        gen_deps ${!group_modules}
                done

Reply via email to