diff options
author | 2012-10-13 22:02:59 +0000 | |
---|---|---|
committer | 2012-10-13 22:02:59 +0000 | |
commit | 85d772454a59512c0e9536f366fff3ba6f2b466b (patch) | |
tree | 306936c2ce3bc34b096bb29ab8cde810fa475d49 | |
parent | Add --kernel-outputdir to save files outside the source tree. (diff) | |
download | genkernel-85d772454a59512c0e9536f366fff3ba6f2b466b.tar.gz genkernel-85d772454a59512c0e9536f366fff3ba6f2b466b.tar.bz2 genkernel-85d772454a59512c0e9536f366fff3ba6f2b466b.zip |
Bug #414581: ensure built-in initramfs compress config options are set to avoid silentoldconfig bailing out.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | gen_initramfs.sh | 18 |
2 files changed, 22 insertions, 0 deletions
@@ -5,6 +5,10 @@ # Distributed under the GPL v2 # $Id$ + 13 Oct 2012; Robin H. Johnson <robbat2@gentoo.org> gen_initramfs.sh: + Bug #414581: ensure built-in initramfs compress config options are set to + avoid silentoldconfig bailing out. + 13 Oct 2012; Łukasz Stelmach <stlman@poczta.fm> gen_cmdline.sh, gen_compile.sh, gen_configkernel.sh, gen_determineargs.sh, gen_funcs.sh, genkernel: diff --git a/gen_initramfs.sh b/gen_initramfs.sh index f986ed4..55b9dd9 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -802,10 +802,28 @@ create_initramfs() { # The kernel will do a better job of it than us. mv ${TMPDIR}/initramfs-${KV} ${TMPDIR}/initramfs-${KV}.cpio sed -i '/^.*CONFIG_INITRAMFS_SOURCE=.*$/d' ${KERNEL_DIR}/.config + compress_config='INITRAMFS_COMPRESSION_NONE' + case ${compress_ext} in + gz) compress_config='INITRAMFS_COMPRESSION_GZIP' ;; + bz2) compress_config='INITRAMFS_COMPRESSION_BZIP2' ;; + lzma) compress_config='INITRAMFS_COMPRESSION_LZMA' ;; + xz) compress_config='INITRAMFS_COMPRESSION_XZ' ;; + lzo) compress_config='INITRAMFS_COMPRESSION_LZO' ;; + *) compress_config='INITRAMFS_COMPRESSION_NONE' ;; + esac + # All N default except XZ, so there it gets used if the kernel does + # compression on it's own. cat >>${KERNEL_DIR}/.config <<-EOF CONFIG_INITRAMFS_SOURCE="${TMPDIR}/initramfs-${KV}.cpio${compress_ext}" CONFIG_INITRAMFS_ROOT_UID=0 CONFIG_INITRAMFS_ROOT_GID=0 + CONFIG_INITRAMFS_COMPRESSION_NONE=n + CONFIG_INITRAMFS_COMPRESSION_GZIP=n + CONFIG_INITRAMFS_COMPRESSION_BZIP2=n + CONFIG_INITRAMFS_COMPRESSION_LZMA=n + CONFIG_INITRAMFS_COMPRESSION_XZ=y + CONFIG_INITRAMFS_COMPRESSION_LZO=n + CONFIG_${compress_config}=y EOF else if isTrue "${COMPRESS_INITRD}" |