diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-09-22 20:14:23 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-09-22 20:14:23 +0000 |
commit | 70dc6a49ff3bd4ae5a5e6f2a2fe2c95aae4683d4 (patch) | |
tree | 8553a258106b6e70ec7be222795e3e170613dabd /target/linux/ar71xx/image/Makefile | |
parent | ccc96f79d58f57ba1161da4c4cea90a94cf85804 (diff) | |
download | master-187ad058-70dc6a49ff3bd4ae5a5e6f2a2fe2c95aae4683d4.tar.gz master-187ad058-70dc6a49ff3bd4ae5a5e6f2a2fe2c95aae4683d4.tar.bz2 master-187ad058-70dc6a49ff3bd4ae5a5e6f2a2fe2c95aae4683d4.zip |
ar71xx: image: add optional JFFS2 padding support to the CatFiles macro
Also remove the similar code from the Netgear
profile and use the new feature instead.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38126 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/image/Makefile')
-rw-r--r-- | target/linux/ar71xx/image/Makefile | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 65ddabec15..a837f9a71c 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -114,6 +114,13 @@ define CatFiles *) bs=`stat -c%s $(1)`;; \ esac; \ ( dd if=$(1) bs=$$$${bs} conv=sync; cat $(3) ) > $(5); \ + if [ -n "$(6)" ]; then \ + case "$$$${fstype}" in \ + squashfs*) \ + padjffs2 $(5) $(6); \ + ;; \ + esac; \ + fi; \ if [ `stat -c%s $(5)` -gt $(4) ]; then \ echo "Warning: $(5) is too big (> $(4) bytes)" >&2; \ rm -f $(5); \ @@ -128,7 +135,7 @@ define CatFiles endef Sysupgrade/KR=$(call CatFiles,$(2),$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(5))) -Sysupgrade/KRuImage=$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(2))) +Sysupgrade/KRuImage=$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(2)),$(5)) Sysupgrade/RKuImage=$(call CatFiles,$(KDIR)/root.$(1),$(4),$(KDIR_TMP)/vmlinux-$(2).uImage,$(3),$(call sysupname,$(1),$(2))) define Image/BuildLoader @@ -714,13 +721,8 @@ endef define Image/Build/Netgear $(eval fwsize=$(call mtdpartsize,firmware,$(4))) - $(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage.squashfs,0,$(KDIR)/root.$(1),$(fwsize),$(call sysupname,$(1),$(2))) + $(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage.squashfs,0,$(KDIR)/root.$(1),$(fwsize),$(call sysupname,$(1),$(2)),64) if [ -e $(call sysupname,$(1),$(2)) ]; then \ - case "$(1)" in \ - *squashfs*) \ - padjffs2 $(call sysupname,$(1),$(2)) 64; \ - ;; \ - esac; \ for r in $(7) ; do \ [ -n "$$$$r" ] && dashr="-$$$$r" || dashr= ; \ $(STAGING_DIR_HOST)/bin/mkdniimg \ |