Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: /
Date: Thu, 28 Mar 2019 23:43:24
Message-Id: 1553815826.cb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f.whissi@gentoo
1 commit: cb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 28 23:30:26 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 28 23:30:26 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=cb0d1ec7
7
8 config_kernel(): Force --static and --no-ramdisk-modules
9
10 ...if kernel doesn't support modules to avoid that genkernel will run
11 into errors when trying to call 'make modules' or expects to build
12 initramfs with modules when there aren't any modules.
13
14 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
15
16 gen_configkernel.sh | 15 +++++++++++++++
17 1 file changed, 15 insertions(+)
18
19 diff --git a/gen_configkernel.sh b/gen_configkernel.sh
20 index abc2f61..541a3a8 100755
21 --- a/gen_configkernel.sh
22 +++ b/gen_configkernel.sh
23 @@ -187,6 +187,21 @@ config_kernel() {
24 else
25 # no, we do NOT support modules, set 'y' for new stuff.
26 newcfg_setting='y'
27 +
28 + if ! isTrue "${BUILD_STATIC}"
29 + then
30 + local _no_modules_support_warning="$(getIndent 1)>> Forcing --static "
31 + if isTrue "${BUILD_RAMDISK}" && isTrue "${RAMDISKMODULES}"
32 + then
33 + _no_modules_support_warning+="and --no-ramdisk-modules "
34 + RAMDISKMODULES="no"
35 + fi
36 +
37 + _no_modules_support_warning+="to avoid genkernel failures because kernel does NOT support modules..."
38 +
39 + print_warning 1 "${_no_modules_support_warning}"
40 + BUILD_STATIC="yes"
41 + fi
42 fi
43
44 # If the user has configured DM as built-in, we need to respect that.