aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorGravatar José Luis Salvador Rufo <salvador.joseluis@gmail.com>2021-01-10 20:05:59 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2021-01-16 22:45:34 +0100
commitb717952074d213f5bcfdb87c905d92afb0949d11 (patch)
tree0c61bf9043c9c88bb30ddd7e0cbdbe2e4fd05b7a /fs
parent3fccb15705d55a12e7a20cb0612049a3251ea1a0 (diff)
downloadbuildroot-b717952074d213f5bcfdb87c905d92afb0949d11.tar.gz
buildroot-b717952074d213f5bcfdb87c905d92afb0949d11.tar.bz2
fs/cpio: add zstd as compression option
U-Boot mkimage zstd is available since v2020.10: https://gitlab.denx.de/u-boot/u-boot/-/commit/26073f9ed3ab0aaf3c2a2b433fecb30a95a067d6 Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/common.mk5
-rw-r--r--fs/cpio/Config.in5
2 files changed, 10 insertions, 0 deletions
diff --git a/fs/common.mk b/fs/common.mk
index 84e13d1b7e..afab7b50fb 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -154,6 +154,11 @@ ifeq ($(BR2_REPRODUCIBLE),)
ROOTFS_$(2)_COMPRESS_CMD += -T $(PARALLEL_JOBS)
endif
endif
+ifeq ($(BR2_TARGET_ROOTFS_$(2)_ZSTD),y)
+ROOTFS_$(2)_DEPENDENCIES += host-zstd
+ROOTFS_$(2)_COMPRESS_EXT = .zst
+ROOTFS_$(2)_COMPRESS_CMD = zstd -19 -z -f -T$(PARALLEL_JOBS)
+endif
$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): ROOTFS=$(2)
$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): FAKEROOT_SCRIPT=$$(ROOTFS_$(2)_DIR)/fakeroot
diff --git a/fs/cpio/Config.in b/fs/cpio/Config.in
index 83a7fa5824..c1151a2881 100644
--- a/fs/cpio/Config.in
+++ b/fs/cpio/Config.in
@@ -51,6 +51,11 @@ config BR2_TARGET_ROOTFS_CPIO_XZ
help
Do compress the cpio filesystem with xz.
+config BR2_TARGET_ROOTFS_CPIO_ZSTD
+ bool "zstd"
+ help
+ Do compress the cpio filesystem with zstd.
+
endchoice
config BR2_TARGET_ROOTFS_CPIO_UIMAGE