In version 4.2.3, genkernel was perfectly happy to generate an initramfs for a monolithic kernel (the kernel itself built with CONFIG_MODULES=n, and BUILD_STATIC=yes in genkernel.conf), and, when doing so, did not require any userspace module handling software to be installed. In version 4.2.5, the same configuration now fails. Reproducible: Always Steps to Reproduce: 1. Build a static kernel with CONFIG_MODULES=n. 2. Set BUILD_STATIC=yes in /etc/genkernel.conf. 3. Uninstall sys-apps/kmod and any other userspace module-loading software. 4. Run “genkernel initramfs”. Actual Results: I expect successful generation of an initramfs without any (unneeded) module loading support. Expected Results: # genkernel initramfs * Gentoo Linux Genkernel; Version 4.2.5 * Using genkernel configuration from '/etc/genkernel.conf' ... * Running with options: initramfs * ERROR: kmod not found. Is sys-apps/kmod installed? * Report any genkernel bugs to bugs.gentoo.org and * assign your bug to genkernel@gentoo.org. Please include * as much information as you can in your bug report; attaching * '/var/log/genkernel.log' so that your issue can be dealt with effectively. * * Please do *not* report kernel compilation failures as genkernel bugs! * # emerge --info sys-kernel/genkernel Portage 3.0.28 (python 3.9.7-final-0, default/linux/amd64/17.1/no-multilib, gcc-11.2.0, glibc-2.33-r7, 5.10.61-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.10.61-gentoo-x86_64-Intel-R-_Xeon-R-_Silver_4210R_CPU_@_2.40GHz-with-glibc2.33 KiB Mem: 1017240 total, 123312 free KiB Swap: 1048572 total, 951748 free Timestamp of repository gentoo: Wed, 03 Nov 2021 05:45:01 +0000 Head commit of repository gentoo: f22ee91e18ac1b65eec983dd3ea49b48c85d3b19 Head commit of repository hawk777: 86948bfdf5c2cae798487f393fff0b4287ad549b sh bash 5.1_p8 ld GNU ld (Gentoo 2.37_p1 p0) 2.37 app-shells/bash: 5.1_p8::gentoo dev-lang/perl: 5.34.0-r3::gentoo dev-lang/python: 3.9.7_p1::gentoo dev-util/cmake: 3.20.5::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.44.7::gentoo sys-apps/sandbox: 2.25::gentoo sys-devel/autoconf: 2.71-r1::gentoo sys-devel/automake: 1.16.4::gentoo sys-devel/binutils: 2.37_p1::gentoo sys-devel/gcc: 11.2.0::gentoo sys-devel/gcc-config: 2.4::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r7::gentoo Repositories: gentoo location: /var/cache/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.ca.gentoo.org/gentoo-portage priority: 1 sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 hawk777 location: /var/cache/repos/hawk777 sync-type: git sync-uri: /var/lib/git/portage masters: gentoo priority: 2 Installed sets: @admin, @dns, @letsencrypt, @mail, @pim, @web, @wedding ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native -fomit-frame-pointer" DISTDIR="/tmp/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y --complete-graph y -1 --quiet-build y" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe -march=native -fomit-frame-pointer" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=native -fomit-frame-pointer" GENTOO_MIRRORS="http://gentoo.gossamerhost.com/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles http://gentoo.osuosl.org/" INSTALL_MASK="grub-mkconfig" LANG="en_CA.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="acl amd64 brotli bzip2 caps cli dri fortran iconv icu idn ipv6 libglvnd libtirpc ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2019" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 popcnt sse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-CA" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS ================================================================= Package Settings ================================================================= sys-kernel/genkernel-4.2.5::gentoo was built with the following: USE="-firmware (-ibm)" PYTHON_SINGLE_TARGET="python3_9 (-python3_10) -python3_8"
In commit https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=153a877d333d3b85920267535aef950056c92192 we added a check for kmod. We probably need to make it conditional but also need to update is_kext_supported_by_kmod() to make it work without kmod.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=c790b6e2c5bd4841a7469bdd8f6e3eee8bf82453 commit c790b6e2c5bd4841a7469bdd8f6e3eee8bf82453 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2021-11-15 00:19:31 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2021-11-15 01:24:49 +0000 gen_determineargs.sh: determine_real_args(): Make kmod only required for non-static kernels Fixes: 153a877d ("Refactor (compressed) kernel module handling") Bug: https://bugs.gentoo.org/821484 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> gen_determineargs.sh | 15 +++++++++------ gen_funcs.sh | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-)
Released with genkernel-4.2.6.