aboutsummaryrefslogtreecommitdiff
path: root/fs/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'fs/common.mk')
-rw-r--r--fs/common.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/common.mk b/fs/common.mk
index ec6aa831d1..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
@@ -173,11 +178,11 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
PATH=$$(BR_PATH) $$(TOPDIR)/support/scripts/mkusers $$(ROOTFS_FULL_USERS_TABLE) $$(TARGET_DIR) >> $$(FAKEROOT_SCRIPT)
echo "$$(HOST_DIR)/bin/makedevs -d $$(ROOTFS_FULL_DEVICES_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
+ $$(foreach hook,$$(ROOTFS_PRE_CMD_HOOKS),\
+ $$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
$$(foreach s,$$(call qstrip,$$(BR2_ROOTFS_POST_FAKEROOT_SCRIPT)),\
echo "echo '$$(TERM_BOLD)>>> Executing fakeroot script $$(s)$$(TERM_RESET)'" >> $$(FAKEROOT_SCRIPT); \
echo $$(EXTRA_ENV) $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))
- $$(foreach hook,$$(ROOTFS_PRE_CMD_HOOKS),\
- $$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),\
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))