brcm63xx: do not align squashfs rootfs start

We do not need to align the start of read only rootfs's to erase blocks.
This allows us to write the squashfs rootfs directly behind the kernel,
potentially freeing up one erase block.

We still need to align for jffs2, so add a flag for imagetag to
optionally align the rootfs start.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44556
This commit is contained in:
Jonas Gorski
2015-02-27 17:38:14 +00:00
parent d4652e817a
commit bb54859543
5 changed files with 133 additions and 100 deletions

View File

@@ -17,14 +17,13 @@ LOADER_MAKEOPTS= \
KERNEL_ENTRY=$(KERNEL_ENTRY) \
RAMSIZE=$(RAMSIZE)
define trxalign/jffs2-128k
-a 0x20000
define rootfspad/jffs2-128k
--align-rootfs
endef
define trxalign/jffs2-64k
-a 0x10000
define rootfspad/jffs2-64k
--align-rootfs
endef
define trxalign/squashfs
-a 1024
define rootfspad/squashfs
endef
define Image/LimitName16
@@ -44,6 +43,7 @@ define Image/Build/CFE
--boardid $(2) --chipid $(3) --entry $(KERNEL_ENTRY) \
--load-addr $(LOADADDR) --rsa-signature "$(5)" \
--info1 "-$(call Image/LimitName16,$(4))" --info2 $(1) \
$(call rootfspad/$(1)) \
$(6) $(7) $(8) $(9)
endef
@@ -53,6 +53,7 @@ define Image/Build/CFEDTB
--output $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin \
--boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
--load-addr $(LOADADDR) --info1 "-$(call Image/LimitName16,$(5))" \
$(call rootfspad/$(1)) \
--info2 $(1) $(6)
endef
@@ -69,6 +70,7 @@ define Image/Build/SPW303VCFEDTB
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(2).lzma.cfe -f $(KDIR)/root.$(1) \
--output $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
--boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
$(call rootfspad/$(1)) \
--load-addr $(LOADADDR) $(6)
# Fix up header
$(STAGING_DIR_HOST)/bin/spw303v -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
@@ -84,6 +86,7 @@ define Image/Build/ZYXCFEDTB
--output $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
--boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
--load-addr $(LOADADDR) --info1 "-$(call Image/LimitName16,$(5))" \
$(call rootfspad/$(1)) \
--info2 $(1) $(6)
# Fix up header
$(STAGING_DIR_HOST)/bin/zyxbcm -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \