Gentoo Archives: gentoo-dev

From: Mike Pagano <mpagano@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH 1/1] linux-info.eclass: Chk for .config/config.gz when CONFIG_* req
Date: Sun, 15 Jan 2023 23:22:39
Message-Id: a8e868db-8832-a3cc-034f-07e653a403f7@gentoo.org
1 In the instance where CONFIG_* settings are required and not optional,
2 make sure there is either a .config or a config.gz to check
3
4 Signed-off-by: Mike Pagano <mpagano@g.o>
5 ---
6 eclass/linux-info.eclass | 10 ++++++++--
7 1 file changed, 8 insertions(+), 2 deletions(-)
8
9 diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
10 index 16ef69ebc..a65d0c441 100644
11 --- a/eclass/linux-info.eclass
12 +++ b/eclass/linux-info.eclass
13 @@ -805,8 +805,14 @@ check_extra_config() {
14 export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}"
15 return 0
16 fi
17 - else
18 - require_configured_kernel
19 + elif ! linux_config_exists; then
20 + qeerror "Could not find a neither a usable .config in the kernel source directory"
21 + qeerror "nor a /proc/config.gz file,"
22 + qeerror "Please ensure that ${KERNEL_DIR} points to a configured set of Linux sources."
23 + qeerror "If you are using KBUILD_OUTPUT, please set the environment var so that"
24 + qeerror "it points to the necessary object directory so that it might find .config"
25 + qeerror "or have a properly configured kernel to produce a config.gz file. (CONFIG_IKCONFIG)."
26 + die "Kernel not configured; no .config found in ${KV_OUT_DIR} or /proc/config.gz found"
27 fi
28
29 ebegin "Checking for suitable kernel configuration options"
30 --
31 2.38.2
32
33
34 --
35 Mike Pagano
36 Gentoo Developer - Kernel Project
37 Gentoo Sources - Lead
38 E-Mail : mpagano@g.o
39 GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
40 Public Key : http://http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index

Replies