aboutsummaryrefslogtreecommitdiff
path: root/linux/linux.mk
diff options
context:
space:
mode:
authorGravatar Johan Sagaert <sagaert.johan@proximus.be>2015-07-12 13:43:32 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-13 16:22:40 +0100
commit3ea133c9710b7d479c7828a59a99f3d10f74be35 (patch)
treefd48ad3d0a26c7582487ce60b60bf3d50e8c9a71 /linux/linux.mk
parent27d6deb449fdb3b7662059a83212787ae568c76e (diff)
downloadbuildroot-3ea133c9710b7d479c7828a59a99f3d10f74be35.tar.gz
buildroot-3ea133c9710b7d479c7828a59a99f3d10f74be35.tar.bz2
linux: Add kernel compression selection.
This selection will ensure that the correct host tools will be build used for the kernel compression method used. [Maxime: Select the compression opts in the kernel config too ] Signed-off-by: Sagaert Johan <sagaert.johan@proximus.be> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998 at free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'linux/linux.mk')
-rw-r--r--linux/linux.mk22
1 files changed, 21 insertions, 1 deletions
diff --git a/linux/linux.mk b/linux/linux.mk
index 9507837c41..dd2cc49617 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -56,7 +56,23 @@ LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
LINUX_PATCH = $(filter ftp://% http://% https://%,$(LINUX_PATCHES))
LINUX_INSTALL_IMAGES = YES
-LINUX_DEPENDENCIES += host-kmod host-lzop
+LINUX_DEPENDENCIES += host-kmod
+
+# host tools needed for kernel compression
+ifeq ($(BR2_LINUX_KERNEL_LZ4),y)
+LINUX_DEPENDENCIES += host-lz4
+else ifeq ($(BR2_LINUX_KERNEL_LZMA),y)
+LINUX_DEPENDENCIES += host-lzma
+else ifeq ($(BR2_LINUX_KERNEL_LZO),y)
+LINUX_DEPENDENCIES += host-lzop
+else ifeq ($(BR2_LINUX_KERNEL_XZ),y)
+LINUX_DEPENDENCIES += host-xz
+endif
+LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_GZIP) = CONFIG_KERNEL_GZIP
+LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZ4) = CONFIG_KERNEL_LZ4
+LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) = CONFIG_KERNEL_LZMA
+LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) = CONFIG_KERNEL_LZO
+LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) = CONFIG_KERNEL_XZ
ifeq ($(BR2_LINUX_KERNEL_UBOOT_IMAGE),y)
LINUX_DEPENDENCIES += host-uboot-tools
@@ -181,6 +197,10 @@ LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS)
define LINUX_KCONFIG_FIXUP_CMDS
$(if $(LINUX_NEEDS_MODULES),
$(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config))
+ $(call KCONFIG_ENABLE_OPT,$(LINUX_COMPRESSION_OPT_y),$(@D)/.config)
+ $(foreach opt, $(LINUX_COMPRESSION_OPT_),
+ $(call KCONFIG_DISABLE_OPT,$(opt),$(@D)/.config)
+ )
$(if $(BR2_arm)$(BR2_armeb),
$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
$(if $(BR2_TARGET_ROOTFS_CPIO),