mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 18:35:55 +02:00
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
This commit is contained in:
parent
5a99d27cc6
commit
124b7a0af5
@ -40,13 +40,17 @@ define add_jffs2_mark
|
|||||||
echo -ne '\xde\xad\xc0\xde' >> $(1)
|
echo -ne '\xde\xad\xc0\xde' >> $(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# pad to 64k and add jffs2 end-of-filesystem mark
|
# pad to 4k, 8k, 64k, 128k and add jffs2 end-of-filesystem mark
|
||||||
# do this twice to make sure that this works with 128k blocksize as well
|
|
||||||
define prepare_generic_squashfs
|
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)
|
$(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))
|
$(call add_jffs2_mark,$(1))
|
||||||
|
rm -f $(KDIR)/tmpfile.*
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
||||||
|
@ -276,7 +276,7 @@ define Image/Build/Template/TPLINK4K
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Image/Build/Template/TPLINK4K/squashfs
|
define Image/Build/Template/TPLINK4K/squashfs
|
||||||
$(call Image/Build/Template/TPLINK,squashfs-4k,$(1),$(2),$(3))
|
$(call Image/Build/Template/TPLINK,squashfs,$(1),$(2),$(3))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Image/Build/Template/UBNT
|
define Image/Build/Template/UBNT
|
||||||
@ -296,7 +296,7 @@ define Image/Build/Template/UBNTXM
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Image/Build/Template/UBNTXM/squashfs
|
define Image/Build/Template/UBNTXM/squashfs
|
||||||
$(call Image/Build/Template/UBNTXM,squashfs-4k,$(1),$(2),$(3),$(4),$(5))
|
$(call Image/Build/Template/UBNTXM,squashfs,$(1),$(2),$(3),$(4),$(5))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Image/Build/Template/UBNTXM/jffs2-64k
|
define Image/Build/Template/UBNTXM/jffs2-64k
|
||||||
@ -428,8 +428,6 @@ define Image/Build/Profile/Madwifi
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Image/Build/squashfs
|
define Image/Build/squashfs
|
||||||
dd if=$(KDIR)/root.squashfs of=$(IMGNAME)-root.squashfs-4k bs=4k conv=sync
|
|
||||||
$(call add_jffs2_mark,$(IMGNAME)-root.squashfs-4k)
|
|
||||||
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
|
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user