[OpenWrt-Devel] [PATCH] SysupgradeNAND: include rootfs-type in image name

Daniel Golle daniel at makrotopia.org
Fri Jun 20 11:36:04 EDT 2014


so we can have images for different rootfs types, e.g.
*-ubifs-sysupgrage.tar as well as *-squashfs-sysupgrade.tar.

Also added quotes around pathnames.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 include/image.mk                   | 12 ++++++------
 target/linux/ar71xx/image/Makefile |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/image.mk b/include/image.mk
index 66ac497..ab953eb 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -134,12 +134,12 @@ endif
 # $(3): rootfs image
 ifneq ($(CONFIG_NAND_SUPPORT),)
    define Image/Build/SysupgradeNAND
-	mkdir -p $(KDIR_TMP)/sysupgrade-$(1)/
-	echo "BOARD=$(1)" > $(KDIR_TMP)/sysupgrade-$(1)/CONTROL
-	[ -z "$(2)" ] || $(CP) $(2) $(KDIR_TMP)/sysupgrade-$(1)/kernel
-	[ -z "$(3)" ] || $(CP) $(3) $(KDIR_TMP)/sysupgrade-$(1)/root
-	(cd $(KDIR_TMP); $(TAR) cvf \
-		$(BIN_DIR)/$(IMG_PREFIX)-$(1)-ubi-sysupgrade.tar sysupgrade-$(1))
+	mkdir -p "$(KDIR_TMP)/sysupgrade-$(1)/"
+	echo "BOARD=$(1)" > "$(KDIR_TMP)/sysupgrade-$(1)/CONTROL"
+	[ -z "$(2)" ] || $(CP) "$(KDIR)/root.$(2)" "$(KDIR_TMP)/sysupgrade-$(1)/root"
+	[ -z "$(3)" ] || $(CP) "$(3)" "$(KDIR_TMP)/sysupgrade-$(1)/kernel"
+	(cd "$(KDIR_TMP)"; $(TAR) cvf \
+		"$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-sysupgrade.tar" sysupgrade-$(1))
    endef
 endif
 
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index d0ee363..3c68fa3 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -878,7 +878,7 @@ define Image/Build/NetgearNAND
 		-i $(imageraw) \
 		-o $(call imgname,ubi,$(2))-factory.img
 
-	$(call Image/Build/SysupgradeNAND,$(2),$(KDIR_TMP)/vmlinux-$(2).uImage,$(KDIR_TMP)/root.squashfs)
+	$(call Image/Build/SysupgradeNAND,$(2),squashfs,$(KDIR_TMP)/vmlinux-$(2).uImage)
 endef
 
 
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list