[gentoo-dev] [PATCH 1/1] linux-info.eclass: Chk for .config/config.gz when CONFIG_* req
In the instance where CONFIG_* settings are required and not optional, make sure there is either a .config or a config.gz to check Signed-off-by: Mike Pagano --- eclass/linux-info.eclass | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 16ef69ebc..a65d0c441 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -805,8 +805,14 @@ check_extra_config() { export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}" return 0 fi - else - require_configured_kernel + elif ! linux_config_exists; then + qeerror "Could not find a neither a usable .config in the kernel source directory" + qeerror "nor a /proc/config.gz file," + qeerror "Please ensure that ${KERNEL_DIR} points to a configured set of Linux sources." + qeerror "If you are using KBUILD_OUTPUT, please set the environment var so that" + qeerror "it points to the necessary object directory so that it might find .config" + qeerror "or have a properly configured kernel to produce a config.gz file. (CONFIG_IKCONFIG)." + die "Kernel not configured; no .config found in ${KV_OUT_DIR} or /proc/config.gz found" fi ebegin "Checking for suitable kernel configuration options" -- 2.38.2 -- Mike Pagano Gentoo Developer - Kernel Project Gentoo Sources - Lead E-Mail : mpag...@gentoo.org GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137 Public Key : http://http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137=index
Re: [gentoo-dev] [PATCH 1/1] linux-info.eclass: Add /proc/config.gz as a valid src of CONFIG_* settings
On 1/15/23 15:16, Mike Gilbert wrote: On Sun, Jan 15, 2023 at 12:40 PM Mike Pagano wrote: In the event that the linux src tree does not have a valid .config, check for /proc/config.gz Bug: https://bugs.gentoo.org/890720 I think this is the wrong place to "fix" bug 890720. We already have a linux_config_exists function. This change would make that function redundant and removes the ability to check for only a valid .config in the kernel build directory. I think the check_config_extra function should be updated to not call require_configured_kernel. Yeah, I guess that does make sense. The CONFIGs are optional, why look for any config file ? -- Mike Pagano Gentoo Developer - Kernel Project E-Mail : mpag...@gentoo.org GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137 Public Key : http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137=index
Re: [gentoo-dev] [PATCH 1/1] linux-info.eclass: Add /proc/config.gz as a valid src of CONFIG_* settings
On Sun, Jan 15, 2023 at 12:40 PM Mike Pagano wrote: > > In the event that the linux src tree does not have > a valid .config, check for /proc/config.gz > > Bug: https://bugs.gentoo.org/890720 I think this is the wrong place to "fix" bug 890720. We already have a linux_config_exists function. This change would make that function redundant and removes the ability to check for only a valid .config in the kernel build directory. I think the check_config_extra function should be updated to not call require_configured_kernel.
Re: [gentoo-dev] [PATCH 1/1] linux-info.eclass: Add /proc/config.gz as a valid src of CONFIG_* settings
On Sun, Jan 15, 2023 at 12:40:12 -0500, Mike Pagano wrote: > In the event that the linux src tree does not have > a valid .config, check for /proc/config.gz > What about checking /boot/config-[version] as a backup as well? Since the standard `make install` for the kernel drops the config used to build into there too. - Oskari signature.asc Description: PGP signature
[gentoo-dev] [PATCH 1/1] linux-info.eclass: Add /proc/config.gz as a valid src of CONFIG_* settings
In the event that the linux src tree does not have a valid .config, check for /proc/config.gz Bug: https://bugs.gentoo.org/890720 Signed-off-by: Mike Pagano --- eclass/linux-info.eclass | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 16ef69ebc..daedd758f 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -301,10 +301,18 @@ linux_config_qa_check() { # @FUNCTION: linux_config_src_exists # @RETURN: true or false # @DESCRIPTION: -# It returns true if .config exists in a build directory otherwise false +# Returns true if either .config exists in a build directory or +# /proc/config.gz is found, otherwise returns false linux_config_src_exists() { export _LINUX_CONFIG_EXISTS_DONE=1 - use kernel_linux && [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]] + if use kernel_linux; then + if [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]; then + return 0 + elif linux_config_bin_exists; then + return 0 + fi + fi + return 1 } # @FUNCTION: linux_config_bin_exists -- 2.38.2 -- Mike Pagano Gentoo Developer - Kernel Project E-Mail : mpag...@gentoo.org GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137 Public Key : http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137=index