aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2017-12-20 22:27:42 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-12-31 18:13:36 +0100
commit90867d8fdf45e7af24cf9e63e3ee8a70f30b479c (patch)
treeb3d5d22e97b9b6c24068560a8aec9e8c1b42cddd /fs
parent7555a2ae1a7941f2ed0761425253048c0551bc40 (diff)
downloadbuildroot-90867d8fdf45e7af24cf9e63e3ee8a70f30b479c.tar.gz
buildroot-90867d8fdf45e7af24cf9e63e3ee8a70f30b479c.tar.bz2
fs/iso9660: add option for transparent (de)compression
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Thomas: rename option to BR2_TARGET_ROOTFS_ISO9660_TRANSPARENT_COMPRESSION.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/iso9660/Config.in9
-rw-r--r--fs/iso9660/iso9660.mk12
2 files changed, 21 insertions, 0 deletions
diff --git a/fs/iso9660/Config.in b/fs/iso9660/Config.in
index 842c987f21..6f001c0640 100644
--- a/fs/iso9660/Config.in
+++ b/fs/iso9660/Config.in
@@ -63,6 +63,15 @@ config BR2_TARGET_ROOTFS_ISO9660_INITRD
contain a kernel image, an initrd image (unless an initramfs
linked into the kernel is used) and the bootloader.
+config BR2_TARGET_ROOTFS_ISO9660_TRANSPARENT_COMPRESSION
+ bool "transparent compression"
+ depends on !BR2_TARGET_ROOTFS_ISO9660_INITRD
+ depends on !BR2_TARGET_ROOTFS_INITRAMFS
+ help
+ Say 'y' to enable use of transparent (de)compression. Files
+ are stored compressed and will be decompressed on-the-fly
+ upon access at runtime.
+
config BR2_TARGET_ROOTFS_ISO9660_HYBRID
bool "Build hybrid image"
depends on BR2_TARGET_ROOTFS_ISO9660_ISOLINUX
diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk
index c2de27101a..06467262e0 100644
--- a/fs/iso9660/iso9660.mk
+++ b/fs/iso9660/iso9660.mk
@@ -41,6 +41,17 @@ define ROOTFS_ISO9660_CREATE_TEMPDIR
mkdir -p $(ROOTFS_ISO9660_TARGET_DIR)
endef
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_CREATE_TEMPDIR
+else ifeq ($(BR2_TARGET_ROOTFS_ISO9660_TRANSPARENT_COMPRESSION),y)
+ROOTFS_ISO9660_TARGET_DIR = $(FS_DIR)/rootfs.iso9660.tmp
+# This must be early, before we copy the bootloader files
+define ROOTFS_ISO9660_MKZFTREE
+ $(RM) -rf $(ROOTFS_ISO9660_TARGET_DIR)
+ mkzftree -X -z 9 -p $(PARALLEL_JOBS) \
+ $(TARGET_DIR) \
+ $(ROOTFS_ISO9660_TARGET_DIR)
+endef
+ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_MKZFTREE
+ROOTFS_ISO9660_GENISOIMAGE_OPTS += -z
else
ROOTFS_ISO9660_TARGET_DIR = $(TARGET_DIR)
endif
@@ -117,6 +128,7 @@ endif # ROOTFS_ISO9660_USE_INITRD
define ROOTFS_ISO9660_CMD
$(HOST_DIR)/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \
-no-emul-boot -boot-load-size 4 -boot-info-table \
+ $(ROOTFS_ISO9660_GENISOIMAGE_OPTS) \
-o $@ $(ROOTFS_ISO9660_TARGET_DIR)
endef