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 tools/autoconf: fix compile on musl hosts 2015-05-04 13:22:36 +00:00
automake automake: portability fixes 2015-03-24 13:13:01 +00:00
b43-tools b43-tools: b43-fwsquash.py: manually remove LP-PHY 16 support 2014-07-12 15:41:50 +00:00
bc bc: add download mirrors 2015-06-06 13:48:57 +00:00
bison tools/bison: update to 3.0.4 2015-11-03 12:00:04 +00:00
ccache ccache: Make ccache aware of OpenWRT provided GCC patch. 2015-07-14 10:30:38 +00:00
cloog cloog: update to 0.18.1 2013-12-15 21:07:32 +00:00
cmake tools/cmake: update to 3.4.3 2016-02-08 08:25:39 +00:00
dosfstools dosfstools: switch back to release tarballs, update patches to the latest sent upstream 2015-03-22 10:58:04 +00:00
e2fsprogs tools/e2fsprogs: remove outdated configure args 2015-12-23 14:44:18 +00:00
elftosb tools: remove static linking support 2015-02-06 00:00:43 +00:00
expat tools: add expat library (to be used by gdb) 2015-07-10 19:42:05 +00:00
findutils tools: Fix compilation on x32 host 2014-10-25 16:57:16 +00:00
firmware-utils firmware-utils: mkfwimage: fix firmware_max_length for XM layout 2016-02-29 20:11:33 +00:00
flex tools: remove static linking support 2015-02-06 00:00:43 +00:00
flock flock: do not use ccache, fixes build error 2016-01-21 23:22:11 +00:00
gengetopt tools: gengetopt: Disable doc and tests builds 2015-05-22 22:33:41 +00:00
gmp tools/gmp: update to 6.1.0 2016-02-08 08:25:46 +00:00
include tools: host/include/getline.h: fix FreeBSD 8.0+ support 2015-05-08 12:09:26 +00:00
isl tools: add isl (used for graphite on GCC 5) 2015-11-13 11:35:37 +00:00
libelf build: add the + token to any commands that can pass through the jobserver, fixes parallel build on some systems 2012-09-23 09:50:01 +00:00
libtool libtool: passthrough -fstack-protector* to linker 2015-06-18 08:52:33 +00:00
lzma tools: remove static linking support 2015-02-06 00:00:43 +00:00
lzma-old tools/lzma-old fix compile issues (patch from #10253) 2011-10-21 12:52:49 +00:00
m4 tools: remove static linking support 2015-02-06 00:00:43 +00:00
make-ext4fs tools: make-ext4fs: explicitely request C collation for sorting 2015-12-02 16:10:09 +00:00
missing-macros tools: remove a bunch of unused automake macros 2015-03-17 10:11:00 +00:00
mkimage tools/mkimage: backport SOURCE_DATE_EPOCH for reproducible builds 2016-01-28 22:42:44 +00:00
mklibs tools: remove static linking support 2015-02-06 00:00:43 +00:00
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 mtools: build and install mmd 2015-10-11 16:23:11 +00:00
padjffs2 tools: remove static linking support 2015-02-06 00:00:43 +00:00
patch tools/patch: enable parallel build 2015-09-26 21:10:37 +00:00
patch-image tools: remove static linking support 2015-02-06 00:00:43 +00:00
patchelf tools/patchelf: fix portability issue breaking mac os x builds (#18998) 2015-02-19 10:30:39 +00:00
pkg-config tools/pkg-config: update to 0.29 2015-10-30 22:31:29 +00:00
ppl ppl: update to 1.1 2013-12-15 21:07:34 +00:00
qemu tools: remove static linking support 2015-02-06 00:00:43 +00:00
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 tools: add sdimage for mxs 2015-09-21 21:08:08 +00:00
sed tools/sed: fix compile on musl hosts 2015-05-04 13:22:17 +00:00
sparse sparse: add as a new package selectable from the config 2014-04-12 21:21:49 +00:00
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 tools: remove static linking support 2015-02-06 00:00:43 +00:00
tar tools: add tar host build, required for --sort=name which was only added in the latest version 2015-09-11 18:38:02 +00:00
upslug2 tools: remove static linking support 2015-02-06 00:00:43 +00:00
upx tools: remove static linking support 2015-02-06 00:00:43 +00:00
wrt350nv2-builder tools: remove static linking support 2015-02-06 00:00:43 +00:00
xz tools/xz: update to 5.2.2 2015-10-30 22:31:09 +00:00
yaffs2 tools: remove static linking support 2015-02-06 00:00:43 +00:00
Makefile tools: compile flock before everything else 2016-01-20 21:31:34 +00:00