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
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
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
expat tools: add expat library (to be used by gdb) 2015-07-10 19:42:05 +00:00
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 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
libtool libtool: passthrough -fstack-protector* to linker 2015-06-18 08:52:33 +00:00
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 mtools: build and install mmd 2015-10-11 16:23:11 +00:00
padjffs2
patch tools/patch: enable parallel build 2015-09-26 21:10:37 +00:00
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 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
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 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
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