KERNEL_MAKE_DIRECTIVE_2=""
KERNEL_BINARY="arch/alpha/boot/vmlinux.gz"
-COMPRESS_INITRD=yes
-
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE=make
KERNEL_MAKE_DIRECTIVE_2=""
KERNEL_BINARY="arch/arm/boot/zImage"
-COMPRESS_INITRD=yes
-
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE=make
KERNEL_MAKE_DIRECTIVE_2=""
KERNEL_BINARY="vmlinux.gz"
-COMPRESS_INITRD=yes
-
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE=make
KERNEL_BINARY="./vmlinux"
# Initrd/Initramfs Options
-COMPRESS_INITRD="yes"
USECOLOR="yes"
NOINITRDMODULES="yes"
BUSYBOX=1
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD="yes"
DEFAULT_KERNEL_MAKE=make
DEFAULT_UTILS_MAKE=make
DEFAULT_UTILS_CC=gcc
KERNEL_MAKE_DIRECTIVE_2=""
KERNEL_BINARY="vmlinux"
-COMPRESS_INITRD=yes
-
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE=make
KERNEL_MAKE_DIRECTIVE_2=""
KERNEL_BINARY="vmlinux"
-COMPRESS_INITRD=yes
-
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE=make
KERNEL_MAKE_DIRECTIVE="vmlinux"
KERNEL_BINARY="vmlinux"
-COMPRESS_INITRD=yes
-
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE=make
KERNEL_MAKE_DIRECTIVE="vmlinux"
KERNEL_BINARY="vmlinux"
-COMPRESS_INITRD=yes
-
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE=make
KERNEL_MAKE_DIRECTIVE_2=""
KERNEL_BINARY="vmlinux"
-COMPRESS_INITRD=yes
USECOLOR="no"
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j1"
DEFAULT_KERNEL_MAKE=make
KERNEL_MAKE_DIRECTIVE_2="image"
KERNEL_BINARY="arch/sparc64/boot/image arch/sparc/boot/image"
-COMPRESS_INITRD=yes
USECOLOR="no"
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE=make
KERNEL_MAKE_DIRECTIVE_2=""
KERNEL_BINARY="linux"
-COMPRESS_INITRD=yes
ARCH_HAVENOPREPARE=yes
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE="make ARCH=um"
KERNEL_MAKE_DIRECTIVE_2=""
KERNEL_BINARY="arch/i386/boot/bzImage"
-COMPRESS_INITRD=yes
-
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE=make
KERNEL_MAKE_DIRECTIVE_2=""
KERNEL_BINARY="arch/x86_64/boot/bzImage"
-COMPRESS_INITRD=yes
-
#
# Arch-specific defaults that can be overridden in the config file or on the
# command line.
#
+DEFAULT_COMPRESS_INITRD=yes
+
DEFAULT_MAKEOPTS="-j2"
DEFAULT_KERNEL_MAKE=make
Builds or does not build the generated initramfs into the kernel instead
of keeping it as a separate file.
+*--*[*no-*]*compress-initramfs*::
+ Compresses or does not compress the generated initramfs.
+
RAMDISK OPTIONS
---------------
echo " --integrated-initramfs, --no-integrated-initramfs"
echo " Include/exclude the generated initramfs in the kernel"
echo " instead of keeping it as a separate file"
+ echo " --compress-initramfs, --no-compress-initramfs"
+ echo " Compress or do not compress the generated initramfs"
}
usage() {
CMD_INTEGRATED_INITRAMFS=`parse_optbool "$*"`
print_info 2 "CMD_INTEGRATED_INITRAMFS=${CMD_INTEGRATED_INITRAMFS}"
;;
+ --compress-initramfs|--no-compress-initramfs)
+ CMD_COMPRESS_INITRD=`parse_optbool "$*"`
+ print_info 2 "CMD_COMPRESS_INITRD=${CMD_COMPRESS_INITRD}"
+ ;;
--config=*)
print_info 2 "CMD_GK_CONFIG: `parse_opt "$*"`"
;;
set_config_with_override BOOL KERNEL_SOURCES CMD_KERNEL_SOURCES "yes"
set_config_with_override STRING KNAME CMD_KERNNAME "genkernel"
+ set_config_with_override STRING COMPRESS_INITRD CMD_COMPRESS_INITRD "$DEFAULT_COMPRESS_INITRD"
set_config_with_override STRING MAKEOPTS CMD_MAKEOPTS "$DEFAULT_MAKEOPTS"
set_config_with_override STRING KERNEL_MAKE CMD_KERNEL_MAKE "$DEFAULT_KERNEL_MAKE"
set_config_with_override STRING UTILS_MAKE CMD_UTILS_MAKE "$DEFAULT_UTILS_MAKE"
}
create_initramfs() {
+ local compress_ext=""
print_info 1 "initramfs: >> Initializing..."
# Create empty cpio
append_data 'overlay'
fi
- gzip -9 "${CPIO}"
- mv -f "${CPIO}.gz" "${CPIO}"
+ # Implement support for disabling compression
+ if isTrue "${COMPRESS_INITRD}"
+ then
+ compress_ext=".gz"
+ print_info 1 " >> Compressing cpio data..."
+ gzip -9 "${CPIO}" || gen_die "Compression failed"
+ mv -f "${CPIO}.gz" "${CPIO}" || gen_die "Rename failed"
+ fi
+
if isTrue "${INTEGRATED_INITRAMFS}"
then
# cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/usr/initramfs_data.cpio.gz
- mv ${TMPDIR}/initramfs-${KV} ${TMPDIR}/initramfs-${KV}.cpio.gz
+ mv ${TMPDIR}/initramfs-${KV} ${TMPDIR}/initramfs-${KV}.cpio${compress_ext}
# sed -i "s|^.*CONFIG_INITRAMFS_SOURCE=.*$|CONFIG_INITRAMFS_SOURCE=\"${TMPDIR}/initramfs-${KV}.cpio.gz\"|" ${KERNEL_DIR}/.config
sed -i '/^.*CONFIG_INITRAMFS_SOURCE=.*$/d' ${KERNEL_DIR}/.config
- echo -e "CONFIG_INITRAMFS_SOURCE=\"${TMPDIR}/initramfs-${KV}.cpio.gz\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0" >> ${KERNEL_DIR}/.config
+ echo -e "CONFIG_INITRAMFS_SOURCE=\"${TMPDIR}/initramfs-${KV}.cpio${compress_ext}\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0" >> ${KERNEL_DIR}/.config
fi
if isTrue "${CMD_INSTALL}"
#INTEGRATED_INITRAMFS="1"
+# Compress generated initramfs
+#COMPRESS_INITRD="yes"
+
+
# Create a self-contained env in the initramfs
#NETBOOT="1"