Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115263 - genkernel fails to make kernel with --genzkernel
Summary: genkernel fails to make kernel with --genzkernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-11 20:24 UTC by Doug Goldstein (RETIRED)
Modified: 2006-02-04 19:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
genkernel.log (genkernel.log,1.45 KB, text/plain)
2005-12-11 20:25 UTC, Doug Goldstein (RETIRED)
Details
genkernel.log (genkernel.log,79.59 KB, text/plain)
2005-12-14 10:34 UTC, Doug Goldstein (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Goldstein (RETIRED) gentoo-dev 2005-12-11 20:24:47 UTC
*       >> Copying to bincache...
* initramfs: >> Initializing...
*         >> Creating base_layout cpio archive...
*         >> Creating auxilary cpio archive...
*         >> Creating busybox cpio archive...
*         >> Creating udev cpio archive...
*         >> Creating lvm2 cpio archive...
*               LVM2: Adding support (using local static binaries)...
*         >> Creating insmod cpio archive...
*         >> Creating modules cpio archive...

* Merging
*     initramfs-base-layout.cpio.gz
*     initramfs-aux.cpio.gz
*     initramfs-busybox-1.00-rt-mdstart.plasmaroo.cpio.gz
*     initramfs-insmod-0.9.15-pre4.cpio.gz
*     initramfs-udev-075.cpio.gz
*     initramfs-lvm2-2.00.25.cpio.gz
*     initramfs-modules-2.6.14-gentoo-r4.cpio.gz
cp: cannot stat `/var/tmp/genkernel/initramfs-2.6.14-gentoo-r4': No such file or
directory
* ERROR: Could not copy the initramfs to /boot!

* -- Grepping log... --

  SCSI media changer support (CHR_DEV_SCH) [N/m/?] n
  *
  * Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  *
  Probe all LUNs on each SCSI device (SCSI_MULTI_LUN) [N/y/?] n
  Verbose SCSI error reporting (kernel size +=12K) (SCSI_CONSTANTS) [N/y/?] n
--
*     initramfs-lvm2-2.00.25.cpio.gz
*     initramfs-modules-2.6.14-gentoo-r4.cpio.gz
* Gentoo Linux Genkernel; Version 3.3.8
* Running with options: --genzimage --lvm2 --no-devfs
--kerneldir=/usr/src/linux-2.6.14-gentoo-r4/
--kernel-config=/usr/share/genkernel/ppc/kernel-config all

* ERROR: Could not copy the initramfs to /boot!
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2005-12-11 20:25:16 UTC
Created attachment 74547 [details]
genkernel.log
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-12 05:02:15 UTC
Could you try with genkernel 3.3.8?
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2005-12-13 21:24:29 UTC
Calculating dependencies ...done!
[ebuild   R   ] sys-kernel/genkernel-3.3.8  -bootsplash -ibm 0 kB


That's what I'm using.
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-14 06:09:27 UTC
Not according to your genkernel log attached...
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2005-12-14 10:34:55 UTC
Created attachment 74745 [details]
genkernel.log

Here's the correct log file.
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2005-12-20 19:12:16 UTC
ping on this bug?
Comment 7 Doug Goldstein (RETIRED) gentoo-dev 2005-12-21 11:26:52 UTC
results with genkernel 3.3.10

*       >> Copying to bincache...
* initramfs: >> Initializing...
*         >> Creating base_layout cpio archive...
*         >> Creating auxilary cpio archive...
*         >> Creating busybox cpio archive...
*         >> Creating udev cpio archive...
*         >> Creating lvm2 cpio archive...
*               LVM2: Adding support (using local static binaries)...
*         >> Creating insmod cpio archive...
*         >> Creating modules cpio archive...

* Merging
*     initramfs-base-layout.cpio.gz
*     initramfs-aux.cpio.gz
*     initramfs-busybox-1.00-rt-mdstart.plasmaroo.cpio.gz
*     initramfs-insmod-0.9.15-pre4.cpio.gz
*     initramfs-udev-077.cpio.gz
*     initramfs-lvm2-2.00.25.cpio.gz
*     initramfs-modules-2.6.14-gentoo-r5.cpio.gz
cp: cannot stat `/var/tmp/genkernel/initramfs-2.6.14-gentoo-r5': No such file or directory
* ERROR: Could not copy the initramfs to /boot!

* -- Grepping log... --

  SCSI media changer support (CHR_DEV_SCH) [N/m/?] n
  *
  * Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  *
  Probe all LUNs on each SCSI device (SCSI_MULTI_LUN) [N/y/?] n
  Verbose SCSI error reporting (kernel size +=12K) (SCSI_CONSTANTS) [N/y/?] n
--
COMMAND: make -j2 CC="gcc" LD="ld" AS="as" clean
# Temporary hack until we have migrated to asm-powerpc
awk: cmd. line:1: fatal: cannot open file `/usr/src/linux-2.6.14-gentoo-r5/include/linux/version.h' for reading (No such file or directory)
* kernel: >> Making dependencies...
COMMAND: make -j2 CC="gcc" LD="ld" AS="as" dep
*** Warning: make dep is unnecessary now.
--
gcc -Wp,-MD,./.main.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include -I../linux/include2 -I../linux/include -I../linux/arch/ppc/include -Wstrict-prototypes -Wall -I. -c -o main.o main.c
gcc -Wp,-MD,./.netdev.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include -I../linux/include2 -I../linux/include -I../linux/arch/ppc/include -Wstrict-prototypes -Wall -I. -c -o netdev.o netdev.c
gcc -Wp,-MD,./.packet.o.d -Os  -D__KLIBC__=1 -D__KLIBC_MINOR__=1 -nostdlib -nostdinc -iwithprefix include -I../include/arch/ppc -I../include/bits32 -I../include -I../linux/include -I../linux/include2 -I../linux/include -I../linux/arch/ppc/include -Wstrict-prototypes -Wall -I. -c -o packet.o packet.c
In file included from ../include/netinet/ip.h:9,
                 from packet.c:18:
../linux/include/linux/ip.h:199: warning: "struct sock" declared inside parameter list
../linux/include/linux/ip.h:199: warning: its scope is only this definition or declaration, which is probably not what you want
--
*     initramfs-lvm2-2.00.25.cpio.gz
*     initramfs-modules-2.6.14-gentoo-r5.cpio.gz
* Gentoo Linux Genkernel; Version 3.3.10
* Running with options: --genzimage --lvm2 --no-devfs --kernel-config=/usr/share/genkernel/ppc/kernel-config all

* ERROR: Could not copy the initramfs to /boot!

* -- End log... --
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2005-12-22 01:12:05 UTC
copy and paste from gen_initramfs.sh


        cat ${MERGE_LIST} > ${TMPDIR}/initramfs-${KV}

        # Pegasos hack for merging the initramfs into the kernel at compile time
        [ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] ||
                [ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] &&
                        cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/arch/${ARCH}/boot/images/ramdisk.image.gz &&
                        rm ${TMPDIR}/initramfs-${KV}

        # Mips also mimics Pegasos to merge the initramfs into the kernel
        if [ "${MIPS_EMBEDDED_IMAGE}" != '' ]; then
                cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/initramfs.cpio.gz
                gunzip -f ${KERNEL_DIR}/initramfs.cpio.gz
        fi


if I removed the rm ${TMPDIR}/initramfs-${KV} line then it'll get past the current issue of creating the initramfs.

The klibc issue is fixed by http://bugs.gentoo.org/show_bug.cgi?id=112742
Comment 9 Eric Edgar (RETIRED) gentoo-dev 2005-12-22 06:55:52 UTC
Is this tested as working for you?
Comment 10 Doug Goldstein (RETIRED) gentoo-dev 2005-12-22 11:02:45 UTC
yes. That's obviously not the "correct" fix. You can see there's an issue in the code because it's doing a double copy. Once for Pegasos systems and once because it thinks it's MIPS. Because it's the MIPS copy that's failing.

But yes, removing the rm and using the klibc patch I can generate a kernel that will boot on my system
Comment 11 Joshua Kinard gentoo-dev 2005-12-22 11:47:55 UTC
(In reply to comment #10)
> yes. That's obviously not the "correct" fix. You can see there's an issue in
> the code because it's doing a double copy. Once for Pegasos systems and once
> because it thinks it's MIPS. Because it's the MIPS copy that's failing.
> 
> But yes, removing the rm and using the klibc patch I can generate a kernel that
> will boot on my system

afaict, the MIPS copy isn't the problem.  If the copy command under the mips piece is firing, then MIPS_EMBEDDED_IMAGE is getting defined someplace and that's a wholly different bug.  That value is only defined in mips/config.sh, so if genkernel is enabling it, then it must be somehow processing the mips config w/ the ppc config, and that's a genkernel bug.

Comment 12 Doug Goldstein (RETIRED) gentoo-dev 2005-12-22 21:26:51 UTC
ok..

Eric, Obviously it worked if I posted it here and said this cleared up the issue. I wasn't gonna give a "duh" answer to your "duh" question. But since Josh had to make a "duh" comment, lemme kill two birds with one stone.

Josh, OBVIOUSLY that's the case. It's the MIPS copy that's causing the error message hence the variable is being incorrectly enabled in the ppc profile.

And like I've been saying on IRC, this is still a genkernel bug.

I hope I've spoken clearly for everyone this time around.
Comment 13 Tim Yamin (RETIRED) gentoo-dev 2006-02-04 19:19:09 UTC
Ok, I think this *specific* bug should be fixed in the latest _pre releases. Cardoe, I know you've been having issues with klibc not working so if you want to file another bug for that and the klibc -> .bz2 swap go right ahead. Thanks.