From c04534d38d15d7f9c12f7d63756a98fc2dfd55d7 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 24 May 2012 15:51:09 +0200 Subject: [PATCH] [eclass] sabayon-kernel: force gzip compression on initramfs This workaround a bug inside splash_geninitramfs which corrupts the whole initramfs if xz is selected by genkernel --- eclass/sabayon-kernel.eclass | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eclass/sabayon-kernel.eclass b/eclass/sabayon-kernel.eclass index a7c6aa82b..7fb50a16f 100644 --- a/eclass/sabayon-kernel.eclass +++ b/eclass/sabayon-kernel.eclass @@ -451,6 +451,13 @@ _kernel_src_compile() { K_GENKERNEL_ARGS+=" --kernel-target=uImage --kernel-binary=arch/arm/boot/uImage" fi + # Workaround bug in splash_geninitramfs corrupting the initramfs + # if xz compression is used (newer genkernel >3.4.24) + local support_comp=$(genkernel --help | grep compress-initramfs-type) + if [ -n "${support_comp}" ]; then + GKARGS+=" --compress-initramfs-type=gzip" + fi + unset LDFLAGS DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel ${GKARGS} ${K_GENKERNEL_ARGS} \ --kerneldir="${S}" \