aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-04-21 08:20:00 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-04-21 08:20:00 +0000
commitd28f70b2f8982cf9a396eb27ee685ae336a2e9fc (patch)
treebd0fd27d9ebbd1bc1880caf1802ff7eaca780b79 /target/linux/bcm53xx
parentca309341ed81407cd20d7b872f9079dffd77e196 (diff)
downloadmaster-187ad058-d28f70b2f8982cf9a396eb27ee685ae336a2e9fc.tar.gz
master-187ad058-d28f70b2f8982cf9a396eb27ee685ae336a2e9fc.tar.bz2
master-187ad058-d28f70b2f8982cf9a396eb27ee685ae336a2e9fc.zip
bcm53xx: append only 1 block (with erasing mark) to UBI
This is needed as prepare_generic_squashfs generates more data (in our case 0x40004 B) and it's complex for sysupgrade to extract UBI image out of TRX. Signed-off-by: Dan Haab <dhaab@luxul.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45541 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/bcm53xx')
-rw-r--r--target/linux/bcm53xx/image/Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile
index b3f2cd8127..fb909c4629 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -14,6 +14,10 @@ define Image/Prepare
echo -ne '\xde\xad\xc0\xde' > $(KDIR)/fs_mark
$(call prepare_generic_squashfs,$(KDIR)/fs_mark)
+ # For UBI we want only one extra block
+ rm -f $(KDIR)/ubi_mark
+ echo -ne '\xde\xad\xc0\xde' > $(KDIR)/ubi_mark
+
$(CP) ./ubinize.cfg $(KDIR)
endef
@@ -33,12 +37,14 @@ endef
define Build/trx-nand
# kernel: always use 4 MiB (-28 B or TRX header) to allow upgrades even
# if it grows up between releases
+ # root: UBI with one extra block containing UBI mark to trigger erasing
+ # rest of partition
$(STAGING_DIR_HOST)/bin/trx \
-o $@ \
-m 33554432 \
-f $(word 1,$^) -a 0x20000 -b 0x400000 \
- -f $(KDIR)/root-block-0x20000-min-0x800.ubi -a 0x20000 \
- -A $(KDIR)/fs_mark
+ -f $(KDIR)/root-block-0x20000-min-0x800.ubi \
+ -A $(KDIR)/ubi_mark -a 0x20000
endef
define Build/netgear-chk