aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-11-07 19:53:02 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-11-07 19:53:02 +0000
commit0b9fb616ed17e751c2c77bea8434c31b0d6f71f9 (patch)
treebc0932cf178d48aa2d72cc960dfe14fd93294e8b /target/linux/ar71xx/image
parent8124ffd8d20791a2710bc5cb7afdd16cd58ff99c (diff)
downloadupstream-0b9fb616ed17e751c2c77bea8434c31b0d6f71f9.tar.gz
upstream-0b9fb616ed17e751c2c77bea8434c31b0d6f71f9.tar.bz2
upstream-0b9fb616ed17e751c2c77bea8434c31b0d6f71f9.zip
ar71xx: image: add EOF marker to the WNDR4300 UBI image
Append EOF markers to the END of the UBI image file. This forces the kernel to erase all blocks after the marker even if those blocks are not empty. Additionally, the resulting image can be flashed from the original web UI now, so use '-factory' suffix for that. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38683 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/image')
-rw-r--r--target/linux/ar71xx/image/Makefile15
1 files changed, 6 insertions, 9 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 7f2ca28d7a..583899ed68 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -756,18 +756,15 @@ define Image/Build/NetgearNAND
$(eval imageraw=$(KDIR_TMP)/$(2)-raw.img)
$(CP) $(KDIR)/root.squashfs-raw $(KDIR_TMP)/root.squashfs
echo -ne '\xde\xad\xc0\xde' > $(KDIR_TMP)/jffs2.eof
- $(call ubinize,ubinize-$(2).ini,$(KDIR_TMP),$(KDIR_TMP)/$(2)-root.ubi,128KiB,2048)
- # Create firmware image full of 0xff to use the UBIFS auto-resize function
- firmwareblocks=$$$$(($(firmwaresize) / 131072)); \
- dd if=/dev/zero bs=128k count=$$$${firmwareblocks} conv=sync | tr '\000' '\377' > $(imageraw)
- # Insert Kernel and UBI image to rootfs and generate DNI image
- dd if=$(KDIR_TMP)/vmlinux-$(2).uImage of=$(imageraw) conv=notrunc
- kernelblocks=$$$$(($(kernelsize) / 131072)); \
- dd if=$(KDIR_TMP)/$(2)-root.ubi of=$(imageraw) bs=128k seek=$$$${kernelblocks} conv=notrunc
+ $(call ubinize,ubinize-$(2).ini,$(KDIR_TMP),$(KDIR_TMP)/$(2)-root.ubi,128KiB,2048,-E 5)
+ ( \
+ dd if=$(KDIR_TMP)/vmlinux-$(2).uImage; \
+ dd if=$(KDIR_TMP)/$(2)-root.ubi \
+ ) > $(imageraw)
$(STAGING_DIR_HOST)/bin/mkdniimg \
-B $(6) -v OpenWrt.$(REVISION) -r "$$$$r" $(8) \
-i $(imageraw) \
- -o $(call imgname,ubi,$(2))-recovery.img
+ -o $(call imgname,ubi,$(2))-factory.img
endef