diff options
Diffstat (limited to 'target/tar')
-rw-r--r-- | target/tar/Config.in | 10 | ||||
-rw-r--r-- | target/tar/tarroot.mk | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/target/tar/Config.in b/target/tar/Config.in index 4787ec094..03f9330cd 100644 --- a/target/tar/Config.in +++ b/target/tar/Config.in @@ -48,3 +48,13 @@ config BR2_TARGET_ROOTFS_TAR_OPTIONS Any other flags you want to pass to tar Refer to tar --help for details +config BR2_TARGET_ROOTFS_TAR_COPYTO + string "also copy the image to..." + depends on BR2_TARGET_ROOTFS_TAR + default "" + help + Copies the resulting image to a secondary location + like a tftp server's root directory. + + Example: $(IMAGE)-$(DATE).tar + diff --git a/target/tar/tarroot.mk b/target/tar/tarroot.mk index 913cf82a1..b47259e2d 100644 --- a/target/tar/tarroot.mk +++ b/target/tar/tarroot.mk @@ -21,6 +21,8 @@ ifeq ($(BR2_TARGET_ROOTFS_TAR_LZMA),y) TAR_COMPRESSOR:=lzma -9 -c TAR_COMPRESSOR_EXT:=lzma endif +ROOTFS_TAR_COPYTO:=$(strip $(subst ",,$(BR2_TARGET_ROOTFS_TAR_COPYTO))) +# ")) tarroot: host-fakeroot makedevs -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true @@ -50,8 +52,15 @@ ifneq ($(TAR_COMPRESSOR),) -rm -f $(TAR_TARGET).$() PATH="$(STAGING_DIR)/sbin:$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/sbin:$(STAGING_DIR)/usr/bin:$(PATH)" $(TAR_COMPRESSOR) $(TAR_TARGET) > $(TAR_TARGET).$(TAR_COMPRESSOR_EXT) endif +ifneq ($(ROOTFS_TAR_COPYTO),) + $(Q)cp -f $(TAR_TARGET) $(ROOTFS_TAR_COPYTO) +endif -@rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET)) +EXT2_COPYTO := $(strip $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_COPYTO))) +# ")) + + tarroot-source: tarroot-clean: |