Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 429534 - genkernel fails with option --integrated-initramfs and kernel >= 2.6.30.
Summary: genkernel fails with option --integrated-initramfs and kernel >= 2.6.30.
Status: RESOLVED DUPLICATE of bug 414581
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Genkernel Maintainers
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-02 17:28 UTC by Kenny Cheng
Modified: 2012-10-13 23:02 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenny Cheng 2012-08-02 17:28:39 UTC
Since kernel 2.6.30, there is an option of selecting compression algorithm for build-in initramfs. However, genkernel never handle it. That makes genkernel fail when compile initramfs into the kernel image. Please check out the URL for details.

Pleas note, the problem would not appear with kernel config CONFIG_KERNEL_NONE=y.

Reproducible: Always

Steps to Reproduce:
genkernel all --menuconfig --integrated-initramfs (CONFIG_KERNEL_LZO=y)
Actual Results:  
Kernel image fails to compile.

Expected Results:  
Kernel image should compile without any problem.

I use this hack to solve the problem. It makes initramfs compression algorithm same as the kernel image compression algorithm.

--- gen_initramfs.sh	2012-08-03 00:38:10.000000000 +0800
+++ /usr/share/genkernel/gen_initramfs.sh	2012-08-03 00:26:00.583794000 +0800
@@ -787,7 +787,14 @@
 		CONFIG_INITRAMFS_SOURCE="${TMPDIR}/initramfs-${KV}.cpio${compress_ext}"
 		CONFIG_INITRAMFS_ROOT_UID=0
 		CONFIG_INITRAMFS_ROOT_GID=0
+		# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+		# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+		# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+		# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set
+		# CONFIG_INITRAMFS_COMPRESSION_XZ is not set
+		# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
 		EOF
+		cat ${KERNEL_DIR}/.config | grep '^CONFIG_KERNEL_.\+=y$' | sed -e 's/CONFIG_KERNEL_/CONFIG_INITRAMFS_COMPRESSION_/' >> ${KERNEL_DIR}/.config
 	else
 		if isTrue "${COMPRESS_INITRD}"
 		then
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-10-13 23:02:51 UTC
*** This bug has been marked as a duplicate of bug 414581 ***