Currently kernel-build.eclass assumes `make modules_install` is valid in two places. However, on kernels built with CONFIG_MODULES=n that fails with the following error: >>> Install sys-kernel/gentoo-kernel-6.2.11 into /var/tmp/portage/sys-kernel/gentoo-kernel-6.2.11/image make -j5 O=/var/tmp/portage/sys-kernel/gentoo-kernel-6.2.11/work/build V=1 HOSTCC=x86_64-pc-linux-gnu-gcc HOSTCXX=x86_64-pc-linux-gnu-g++ 'HOSTCFLAGS=-O3 -march=native -pipe' 'HOSTLDFLAGS=-Wl,-O1 -Wl,--as-needed' CROSS_COMPILE=x86_64-pc-linux-gnu- AS=x86_64-pc-linux-gnu-as CC=x86_64-pc-linux-gnu-gcc LD=x86_64-pc-linux-gnu-ld.bfd AR=x86_64-pc-linux-gnu-ar NM=x86_64-pc-linux-gnu-nm STRIP=: OBJCOPY=x86_64-pc-linux-gnu-objcopy OBJDUMP=x86_64-pc-linux-gnu-objdump ARCH=x86 INSTALL_MOD_PATH=/var/tmp/portage/sys-kernel/gentoo-kernel-6.2.11/image INSTALL_PATH=/var/tmp/portage/sys-kernel/gentoo-kernel-6.2.11/image/boot modules_install make -C /var/tmp/portage/sys-kernel/gentoo-kernel-6.2.11/work/build -f /var/tmp/portage/sys-kernel/gentoo-kernel-6.2.11/work/linux-6.2/Makefile modules_install *** *** The present kernel configuration has modules disabled. *** To use the module feature, please run "make menuconfig" etc. *** to enable CONFIG_MODULES. *** make[1]: *** [/var/tmp/portage/sys-kernel/gentoo-kernel-6.2.11/work/linux-6.2/Makefile:1964: modules_install] Error 1 make: *** [Makefile:242: __sub-make] Error 2 Now, I am not sure what the right course of action here is, as the eclass intentionally does not use `make install`. `make bzImage` does exist, but `make help` says that is architecture specific.
I'm sorry but support for uncommon custom configs means you need to supply a patch.
That sounds absolutely fair. I have a patch locally, but have not had a chance to try it yet. Should the patch be submitted over at https://github.com/gentoo/gentoo ?
(In reply to Boris Staletic from comment #2) > That sounds absolutely fair. I have a patch locally, but have not had a > chance to try it yet. > > Should the patch be submitted over at https://github.com/gentoo/gentoo ? Yeah, preferably there. If you don't want to use GH, you can also git-send-email it to us.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcfd48957adc57003821b6801eac84a46139298b commit bcfd48957adc57003821b6801eac84a46139298b Author: Boris Staletic <boris.staletic@protonmail.com> AuthorDate: 2023-08-17 17:05:40 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2023-08-20 15:46:45 +0000 kernel-build.class: Allow usage with module-less kernel configs With CONFIG_MODULES not set to either y or m, kernel-build.eclass runs into two issues: 1. Modules.symvers does not get generated. doins build/Module.symvers thus fails. 2. kernel.release exists, but in ${WORKDIR}/build/include/config/kernel.release while kernel-build_src_install() seems to expect to to find it in ${PWD}/include/config. Closes: https://bugs.gentoo.org/904694 Signed-off-by: Boris Staletic <boris.staletic@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/32358 Signed-off-by: Michał Górny <mgorny@gentoo.org> eclass/kernel-build.eclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)