aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image/Makefile
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-11-04 18:37:06 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-11-04 18:37:06 +0000
commit4a76cb79e72ea1fbbd9a224ed5db2339994dd1d2 (patch)
treea5fb7e102ed30c4d71f3e95a92c6871de191c655 /target/linux/ar71xx/image/Makefile
parent49c7b92ff64cbea9f66436130cab375716875407 (diff)
downloadmaster-187ad058-4a76cb79e72ea1fbbd9a224ed5db2339994dd1d2.tar.gz
master-187ad058-4a76cb79e72ea1fbbd9a224ed5db2339994dd1d2.tar.bz2
master-187ad058-4a76cb79e72ea1fbbd9a224ed5db2339994dd1d2.zip
ar71xx: image: dd root.* images in fs specific macros
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38644 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/image/Makefile')
-rw-r--r--target/linux/ar71xx/image/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 0d8f72b5f6..a0f34c7275 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -11,8 +11,10 @@ IMAGE_PROFILE:=$(if $(PROFILE),$(PROFILE),Default)
JFFS2_BLOCKSIZE = 64k 128k 256k
+rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
+
define imgname
-$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
+$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(call rootfs_type,$(1))
endef
define rootfs_align
@@ -1012,6 +1014,11 @@ define Image/Build/squashfs
$(STAGING_DIR_HOST)/bin/padjffs2 $(KDIR)/root.squashfs-64k 64
cp $(KDIR)/root.squashfs-64k $(BIN_DIR)/$(IMG_PREFIX)-root.squashfs-64k
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+endef
+
+define Image/Build/jffs2
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
endef
define Image/Build/Initramfs
@@ -1031,8 +1038,7 @@ endif
endef
define Image/Build
- $(call Image/Build/$(1))
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+ $(call Image/Build/$(call rootfs_type,$(1)),$(1))
$(call Image/Build/Profile/$(IMAGE_PROFILE),$(1))
endef