make.conf rules don't seem to take effect, and running "genkernel all" or "genkernel --menuconfig all" ends in an error saying "ERROR: Failed to compile the "bzImage" target..." Reproducible: Always Steps to Reproduce: 1. Follow the handbook instructions up to step 7.e. 2. run "genkernal all" or "genkernel --menuconfig all" Actual Results: # genkernel --menuconfig all * Gentoo Linux Genkernel; Version 3.4.10.907 * Running with options: --menuconfig all * Linux Kernel 2.6.36-gentoo-r8 for x86_64... mount: special device /dev/BOOT does not exist * WARNING: Failed to mount /boot! * kernel: >> Running mrproper... * config: Using config from /usr/share/genkernel/arch/x86_64/kernel-config * Previous config backed up to .config.bak * >> Running oldconfig... * kernel: >> Cleaning... * config: >> Invoking menuconfig... scripts/basic/docproc.c: In function 'docsect': scripts/basic/docproc.c:336: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result # # configuration written to .config # *** End of Linux kernel configuration. *** Execute 'make' to build the kernel or try 'make help'. * >> Compiling 2.6.36-gentoo-r8 bzImage... * ERROR: Failed to compile the "bzImage" target... * -- Grepping log... -- * Gentoo Linux Genkernel; Version 3.4.10.907 * Running with options: --menuconfig all * Linux Kernel 2.6.36-gentoo-r8 for x86_64... * WARNING: Failed to mount /boot! -- COMMAND: make -j2 CC="gcc" LD="ld" AS="as" ARCH="x86" HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/docproc HOSTCC scripts/basic/hash scripts/basic/docproc.c: In function 'docsect': scripts/basic/docproc.c:336: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result -- choice[1]: 1 Sparse Memory virtual memmap (SPARSEMEM_VMEMMAP) [Y/n/?] y Allow for memory hot-add (MEMORY_HOTPLUG) [N/y] n Enable KSM for page merging (KSM) [N/y/?] n Low address space to protect from user allocation (DEFAULT_MMAP_MIN_ADDR) [4096] 4096 Enable recovery from hardware memory errors (MEMORY_FAILURE) [N/y/?] n -- Thermal Zone (ACPI_THERMAL) [M/n/?] m Debug Statements (ACPI_DEBUG) [N/y/?] n PCI slot detection driver (ACPI_PCI_SLOT) [N/m/y/?] n Container and Module Devices (EXPERIMENTAL) (ACPI_CONTAINER) [M/y/?] m Smart Battery System (ACPI_SBS) [N/m/y/?] n Hardware Error Device (ACPI_HED) [N/m/y/?] n ACPI Platform Error Interface (APEI) (ACPI_APEI) [N/y/?] n -- SHIPPED scripts/genksyms/parse.h SHIPPED scripts/genksyms/keywords.c SHIPPED scripts/genksyms/parse.c HOSTCC scripts/genksyms/lex.o scripts/genksyms/lex.c: In function 'yylex1': scripts/genksyms/lex.l:97: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result -- CC drivers/base/sys.o CC drivers/base/bus.o make[1]: *** No rule to make target `/lib/firmware/iwlwifi-100-5.ucode', needed by `firmware/iwlwifi-100-5.ucode.gen.o'. Stop. make[1]: *** Waiting for unfinished jobs.... MK_FW firmware/iwlwifi-100-5.ucode.gen.S make: *** [firmware] Error 2 -- LD drivers/video/built-in.o LD drivers/built-in.o * Gentoo Linux Genkernel; Version 3.4.10.907 * Running with options: --menuconfig all * ERROR: Failed to compile the "bzImage" target... * -- End log... -- * Please consult /var/log/genkernel.log for more information and any * errors that were reported above. * 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 compilation failures as genkernel bugs! * Expected Results: I would have expected bzImage to compile properly as well as all kernel modules... # cat /etc/make.conf # These settings were set by the catalyst build script that automatically # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. CFLAGS="-march=core2 -mtune=generic -O2 -pipe" CXXFLAGS="${CFLAGS}" # WARNING: Changing your CHOST is not something that should be done lightly. # Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing. CHOST="x86_64-pc-linux-gnu" GENTOO_MIRRORS="http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" MAKEOPTS="-j5" # These are the USE flags that were used in addition to what is provided by the # profile used for building. USE="mmx sse sse2 X aac acpi aim alsa apm bash-completion berkdb bluetooth bzip2 cdr cgi clamav cracklib crypt curl curlwrappers dbi dbus directfb dri dv dvb dvd dvdr encode exif fastcgi ffmpeg gd gif gimp gpm graphviz gzip hddtemp icq imap imagemagick innodb ipv6 jabber java javascript jpeg kde lame libnotify libwww mad mhash mng mp3 mp4 mpeg mplayer msn multilib mysql mysqli ncurses networkmanager nptl ogg opengl oscar pcre pdf perl php png postgres python raw rss ruby simplexml smp sndfile sound spell sqlite sqlite3 subversion svg syslog truetype tiff v4l v4l2 vim-syntax vnc vorbis wddx wifi win32codecs wmf wxwidgets xml xmlrpc xmpp xpm xscreensaver xsl xvid yahoo zlib " Using this make.conf, I'm confused why genkernel would be running this for gcc: "COMMAND: make -j2 CC="gcc" LD="ld" AS="as" ARCH="x86"" (should be -j5 and ARCH=core2 shouldn't it?) I will include my /usr/src/linux.config file and lspci -vvv output once the bug is filed.
Created attachment 269439 [details] my .config file my modified .config file after running this: zcat /proc/config.gz > /usr/share/genkernel/arch/x86_64/kernel-config genkernel --menuconfig all
Created attachment 269441 [details] lcpci -vvv This is my lspci -vvv output on my Dell XPS15, Intel i5
Thank you, Jeroen, for figuring out that it was a problem with iwlwifi. I guess I'd have seen the same thing if I'd just done: cd /usr/src/linux make make[1]: *** No rule to make target `/lib/firmware/iwlwifi-100-5.ucode', needed by `firmware/iwlwifi-100-5.ucode.gen.o'. Stop. make: *** [firmware] Error 2 Still, I'm curious why genkernel doesn't obey the make.conf rules about architecture and MAKEOPTS. I'll post a bug for them about that.
Looks like my .config file was building in a bunch of firmware code into the kernel for some other Intel Wireless cards (besides the iwl6000 that I do have), as well as a handful of Radeon graphics cards. I removed all of the Radeon entries, in both /usr/src/linux/.config and /usr/share/genkernel/arch/x86_64/kernel-config, and then did this: # echo "=net-wireless/iwl6000-ucode-9.221.4.1 ~amd64" > /etc/portage/package.keywords # emerge -av net-wireless/iwl6000-ucode I did the same for other iwl*.ucode packages, but when running # genkernel all I still get: make[1]: *** No rule to make target `/lib/firmware/iwlwifi-6000g2a-5.ucode', needed by `firmware/iwlwifi-6000g2a-5.ucode.gen.o'. Stop. ... there appears to be no match. I manually edited .config and the /usr/share/genkernel/arch/x86_64/kernel-config to remove all but this: CONFIG_EXTRA_FIRMWARE="iwlwifi-6000-4.ucode" # genkernel all . . . LZO arch/x86/boot/compressed/vmlinux.bin.lzo /bin/sh: lzop: command not found make[2]: *** [arch/x86/boot/compressed/vmlinux.bin.lzo] Error 1 make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [bzImage] Error 2 * Gentoo Linux Genkernel; Version 3.4.10.907 * Running with options: all if I emerge lzop, then bzImage compiles just fine, and now I see it compiling the modules. Whether the iwl6000 firmware, etc., actually works, I need to wait until I boot into Gentoo the first time to see if wifi works.
(In reply to comment #0) > "COMMAND: make -j2 CC="gcc" LD="ld" AS="as" ARCH="x86"" > > (should be -j5 and ARCH=core2 shouldn't it?) No. Genkernel uses /etc/genkernel.conf to find out the MAKEOPTS (or the --makeopts command option). Since genkernel is supposed to work without portage, and also be able to generate kernels/ramdisks for other systems then the currently running, it is better off with its own config file. Also ARCH is not the same as the current processor, but the same as architecture. With other words, ARCH has more in common with CHOST in make.conf then with CFLAGS, but since the x86 and x86_64 arches were merged some versions back in the kernel tree ARCH is x86 for you instead of x86_64 as it was before. If you want a kernel more tuned with core2, then you should set the "Processor Family" option in the "Processor types and Features" category of the kernel config.
(In reply to comment #4) > Looks like my .config file was building in a bunch of firmware code into the > kernel for some other Intel Wireless cards (besides the iwl6000 that I do > have), as well as a handful of Radeon graphics cards. I removed all of the > Radeon entries, in both /usr/src/linux/.config and For this you want "genkernel --oldconfig", it reuses the current /usr/src/linux dir in what shape it may be. > /usr/share/genkernel/arch/x86_64/kernel-config, and then did this: Instead of this you might want to copy your custom kernel config to your own location, and use "genkernel --kernel-config=<file>" instead, as that file will be overwritten every time you re-emerge portage. Also remember that genkernel stores by default the config file from every successful build in /etc/kernels. > make[1]: *** No rule to make target `/lib/firmware/iwlwifi-6000g2a-5.ucode', > needed by `firmware/iwlwifi-6000g2a-5.ucode.gen.o'. Stop. > What does "grep CONFIG_STANDALONE /usr/src/linux/.config" say? > . > LZO arch/x86/boot/compressed/vmlinux.bin.lzo > /bin/sh: lzop: command not found This is probably because of "Kernel compression mode" LZO. Did genkernel do this be default or did you change that?
Just by looking at the bug title: do you have sys-kernel/linux-firmware installed? File /lib/firmware/iwlwifi-100-5.ucode is provided by that package.
firmware handling has changed a lot, please update to newer genkernel.