aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-11-24 13:55:40 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-11-24 13:55:40 +0000
commitf9f60dce007f75420b0fc38df2ee8c1711bc609c (patch)
tree41868addd5ee2adde5c28f246d75032d55852070 /include
parentb9a877473540283c47e02549917515adac85ff09 (diff)
downloadupstream-f9f60dce007f75420b0fc38df2ee8c1711bc609c.tar.gz
upstream-f9f60dce007f75420b0fc38df2ee8c1711bc609c.tar.bz2
upstream-f9f60dce007f75420b0fc38df2ee8c1711bc609c.zip
ar71xx: the squashfs-4k images are unreliable in some builds. add 4k, 8k padding to the generic squashfs images and use them on 4k devices as well
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18526 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/image.mk12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/image.mk b/include/image.mk
index a722086a07..d75ca3c30f 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -40,13 +40,17 @@ define add_jffs2_mark
echo -ne '\xde\xad\xc0\xde' >> $(1)
endef
-# pad to 64k and add jffs2 end-of-filesystem mark
-# do this twice to make sure that this works with 128k blocksize as well
+# pad to 4k, 8k, 64k, 128k and add jffs2 end-of-filesystem mark
define prepare_generic_squashfs
- dd if=$(1) of=$(KDIR)/tmpfile.1 bs=64k conv=sync
+ dd if=$(1) of=$(KDIR)/tmpfile.0 bs=4k conv=sync
+ $(call add_jffs2_mark,$(KDIR)/tmpfile.0)
+ dd if=$(KDIR)/tmpfile.0 of=$(KDIR)/tmpfile.1 bs=4k conv=sync
$(call add_jffs2_mark,$(KDIR)/tmpfile.1)
- dd of=$(1) if=$(KDIR)/tmpfile.1 bs=64k conv=sync
+ dd if=$(KDIR)/tmpfile.1 of=$(KDIR)/tmpfile.2 bs=64k conv=sync
+ $(call add_jffs2_mark,$(KDIR)/tmpfile.2)
+ dd if=$(KDIR)/tmpfile.2 of=$(1) bs=64k conv=sync
$(call add_jffs2_mark,$(1))
+ rm -f $(KDIR)/tmpfile.*
endef
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)