aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-10-14 12:21:41 +0000
committerJohn Crispin <blogic@openwrt.org>2014-10-14 12:21:41 +0000
commit64f5a8f1999ee21b11ef9e44c95d0e31d791729c (patch)
treedce5d7b8d120bcaf3c4703f9a7cea69ff5f13354 /target/linux
parent96d2eba315cab9d3fc7088e2278bcb560eaf8a19 (diff)
downloadmaster-187ad058-64f5a8f1999ee21b11ef9e44c95d0e31d791729c.tar.gz
master-187ad058-64f5a8f1999ee21b11ef9e44c95d0e31d791729c.tar.bz2
master-187ad058-64f5a8f1999ee21b11ef9e44c95d0e31d791729c.zip
ar71xx: fix seama factory type image generation.
Currently JFFS2 end-of-filesystem marker 0xdeadc0de is included the computation of image's MD5 checksum as part of the seama header. But OpenWrt will erase blocks including and after the marker thus invalidating the checksum after the first boot. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42915 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/image/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index c307abef85..78e2d705ce 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -673,13 +673,15 @@ define Image/Build/Seama
-rm -f $(KDIR_TMP)/image-$(2).tmp
$(call CatFiles,$(KDIR_TMP)/loader-$(2).bin.lzma,$$$$(($(6) - 64)),$(KDIR)/root.$(1),$(7),$(KDIR_TMP)/image-$(2).tmp)
[ -e "$(KDIR_TMP)/image-$(2).tmp" ] && { \
+ head -c -4 "$(KDIR_TMP)/image-$(2).tmp" > "$(KDIR_TMP)/image-$(2).no-jffs2mark.tmp"; \
$(STAGING_DIR_HOST)/bin/seama \
- -i $(KDIR_TMP)/image-$(2).tmp \
+ -i $(KDIR_TMP)/image-$(2).no-jffs2mark.tmp \
-m "dev=/dev/mtdblock/1" -m "type=firmware"; \
$(STAGING_DIR_HOST)/bin/seama \
-s $(call imgname,$(1),$(2))-factory.bin \
-m "signature=$(5)" \
- -i $(KDIR_TMP)/image-$(2).tmp.seama; \
+ -i $(KDIR_TMP)/image-$(2).no-jffs2mark.tmp.seama; \
+ tail -c 4 "$(KDIR_TMP)/image-$(2).tmp" >> $(call imgname,$(1),$(2))-factory.bin; \
}
cat $(KDIR_TMP)/loader-$(2).bin.lzma > $(KDIR_TMP)/image-$(2)-sysupgrade.tmp
$(STAGING_DIR_HOST)/bin/seama \