summaryrefslogtreecommitdiffstats
path: root/target/ext2
diff options
context:
space:
mode:
Diffstat (limited to 'target/ext2')
-rw-r--r--target/ext2/Config.in7
-rw-r--r--target/ext2/ext2root.mk7
2 files changed, 14 insertions, 0 deletions
diff --git a/target/ext2/Config.in b/target/ext2/Config.in
index 7671caa81..7f15884ff 100644
--- a/target/ext2/Config.in
+++ b/target/ext2/Config.in
@@ -34,6 +34,13 @@ config BR2_TARGET_ROOTFS_EXT2_GZ
depends on BR2_TARGET_ROOTFS_EXT2
default n
+config BR2_TARGET_ROOTFS_EXT2_LZMA
+ bool "lzma the output file"
+ depends on BR2_TARGET_ROOTFS_EXT2
+ select BR2_PACKAGE_LZMA_HOST
+ default n
+
+
config BR2_TARGET_ROOTFS_EXT2_COPYTO
string "also copy the image to..."
depends on BR2_TARGET_ROOTFS_EXT2
diff --git a/target/ext2/ext2root.mk b/target/ext2/ext2root.mk
index c7c7cb200..c88437f2b 100644
--- a/target/ext2/ext2root.mk
+++ b/target/ext2/ext2root.mk
@@ -66,6 +66,10 @@ else
EXT2_TARGET := $(EXT2_BASE)
endif
+ifeq ($(strip $(BR2_TARGET_ROOTFS_EXT2_LZMA)),y)
+EXT2_TARGET := $(EXT2_BASE).lzma
+endif
+
$(EXT2_BASE): host-fakeroot makedevs genext2fs
-@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true;
@rm -rf $(TARGET_DIR)/usr/man
@@ -102,6 +106,9 @@ endif
$(EXT2_BASE).gz: $(EXT2_BASE)
@gzip --best -fv $(EXT2_BASE)
+$(EXT2_BASE).lzma: lzma-host $(EXT2_BASE)
+ @$(STAGING_DIR)/bin/lzma -vc $(EXT2_BASE) > $(EXT2_BASE).lzma
+
EXT2_COPYTO := $(strip $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_COPYTO)))
# " stupid syntax highlighting does not like unmatched quote from above line