openwrt/tools
Felix Fietkau 076d58d344 firmware-utils: mkfwimage: fix firmware_max_length for XM layout
The new u-boot version bundled with the 5.6.x firmwares from Ubiquiti gets
confused by the smaller rootfs partition size; this can lead to various
issues:

1. We've gotten reports that flashing from the 5.6.x stock firmware to
   OpenWrt will brick devices; I wasn't able to reproduce this myself
2. Flashing from 5.5.x stock firmware to OpenWrt and back to stock (via
   TFTP recovery), following by an update to 5.6.x via web interface can
   yield a bricked device with the following properties:
   - It can't be booted without entering commands over a serial console, as
     u-boot supplies the wrong MTD layout
   - The web interface won't accept any image with the original flash
     layout, so stock firmware upgrades are impossible
   - As the TFTP recovery doesn't update u-boot, returning to the old
     u-boot from firmware 5.5.x is impossible

To recover from 2., creating an OpenWrt image which doesn't set u-boot as
read-only and flashing a backup of the old u-boot from there is the only
way known to me. (Fixing the mtdparts variable in u-boot-env from OpenWrt
might also work; settings this from u-boot over serial didn't have
any permanent effect.)

Fix all of this by setting the correct flash layout also used by the stock
firmware. Flashing has been tested from both firmware 5.5.x and 5.6.x. The
fixed layout also matches the mtdparts defined by OpenWrt.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 48829
2016-02-29 20:11:33 +00:00
..
autoconf
automake
b43-tools
bc
bison tools/bison: update to 3.0.4 2015-11-03 12:00:04 +00:00
ccache
cloog
cmake tools/cmake: update to 3.4.3 2016-02-08 08:25:39 +00:00
dosfstools
e2fsprogs tools/e2fsprogs: remove outdated configure args 2015-12-23 14:44:18 +00:00
elftosb
expat
findutils
firmware-utils firmware-utils: mkfwimage: fix firmware_max_length for XM layout 2016-02-29 20:11:33 +00:00
flex
flock flock: do not use ccache, fixes build error 2016-01-21 23:22:11 +00:00
gengetopt
gmp tools/gmp: update to 6.1.0 2016-02-08 08:25:46 +00:00
include
isl tools: add isl (used for graphite on GCC 5) 2015-11-13 11:35:37 +00:00
libelf
libtool
lzma
lzma-old
m4
make-ext4fs tools: make-ext4fs: explicitely request C collation for sorting 2015-12-02 16:10:09 +00:00
missing-macros
mkimage tools/mkimage: backport SOURCE_DATE_EPOCH for reproducible builds 2016-01-28 22:42:44 +00:00
mklibs
mm-macros tools/mm-macros: update to 0.9.9 2015-12-10 12:39:51 +00:00
mpc tools/mpc: update to 1.0.3 2015-11-03 11:59:35 +00:00
mpfr tools/mpfr: update to 3.1.3 2015-11-03 11:59:49 +00:00
mtd-utils update mtd-utils to 1.5.2 2015-12-05 15:44:58 +00:00
mtools
padjffs2
patch
patch-image
patchelf
pkg-config tools/pkg-config: update to 0.29 2015-10-30 22:31:29 +00:00
ppl
qemu
quilt tools/quilt: fix build error during kernel_menuconfig on a cleaned env 2015-11-07 12:52:14 +00:00
scons tools/scons: update to 2.4.1 2015-11-21 21:26:06 +00:00
sdimage
sed
sparse
squashfs tools/squashfs: refresh patches 2015-12-11 15:07:28 +00:00
squashfs4 tools/squashfs4: refresh patches 2015-12-11 19:21:43 +00:00
sstrip
tar
upslug2
upx
wrt350nv2-builder
xz tools/xz: update to 5.2.2 2015-10-30 22:31:09 +00:00
yaffs2
Makefile tools: compile flock before everything else 2016-01-20 21:31:34 +00:00