You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
8 years ago
..
autoconf tools/autoconf: fix compile on musl hosts 9 years ago
automake automake: portability fixes 9 years ago
b43-tools b43-tools: b43-fwsquash.py: manually remove LP-PHY 16 support 10 years ago
bc bc: add download mirrors 9 years ago
bison tools/bison: update to 3.0.4 9 years ago
ccache ccache: Make ccache aware of OpenWRT provided GCC patch. 9 years ago
cloog cloog: update to 0.18.1 11 years ago
cmake tools/cmake: update to 3.4.3 8 years ago
dosfstools dosfstools: switch back to release tarballs, update patches to the latest sent upstream 9 years ago
e2fsprogs tools/e2fsprogs: remove outdated configure args 9 years ago
elftosb tools: remove static linking support 9 years ago
expat tools: add expat library (to be used by gdb) 9 years ago
findutils tools: Fix compilation on x32 host 10 years ago
firmware-utils firmware-utils: mkfwimage: fix firmware_max_length for XM layout 8 years ago
flex tools: remove static linking support 9 years ago
flock flock: do not use ccache, fixes build error 9 years ago
gengetopt tools: gengetopt: Disable doc and tests builds 9 years ago
gmp tools/gmp: update to 6.1.0 8 years ago
include tools: host/include/getline.h: fix FreeBSD 8.0+ support 9 years ago
isl tools: add isl (used for graphite on GCC 5) 9 years ago
libelf build: add the + token to any commands that can pass through the jobserver, fixes parallel build on some systems 12 years ago
libtool libtool: passthrough -fstack-protector* to linker 9 years ago
lzma tools: remove static linking support 9 years ago
lzma-old tools/lzma-old fix compile issues (patch from #10253) 13 years ago
m4 tools: remove static linking support 9 years ago
make-ext4fs tools: make-ext4fs: explicitely request C collation for sorting 9 years ago
missing-macros tools: remove a bunch of unused automake macros 9 years ago
mkimage tools/mkimage: backport SOURCE_DATE_EPOCH for reproducible builds 9 years ago
mklibs tools: remove static linking support 9 years ago
mm-macros tools/mm-macros: update to 0.9.9 9 years ago
mpc tools/mpc: update to 1.0.3 9 years ago
mpfr tools/mpfr: update to 3.1.3 9 years ago
mtd-utils update mtd-utils to 1.5.2 9 years ago
mtools mtools: build and install mmd 9 years ago
padjffs2 tools: remove static linking support 9 years ago
patch tools/patch: enable parallel build 9 years ago
patch-image tools: remove static linking support 9 years ago
patchelf tools/patchelf: fix portability issue breaking mac os x builds (#18998) 9 years ago
pkg-config tools/pkg-config: update to 0.29 9 years ago
ppl ppl: update to 1.1 11 years ago
qemu tools: remove static linking support 9 years ago
quilt tools/quilt: fix build error during kernel_menuconfig on a cleaned env 9 years ago
scons tools/scons: update to 2.4.1 9 years ago
sdimage tools: add sdimage for mxs 9 years ago
sed tools/sed: fix compile on musl hosts 9 years ago
sparse sparse: add as a new package selectable from the config 10 years ago
squashfs tools/squashfs: refresh patches 9 years ago
squashfs4 tools/squashfs4: refresh patches 9 years ago
sstrip tools: remove static linking support 9 years ago
tar tools: add tar host build, required for --sort=name which was only added in the latest version 9 years ago
upslug2 tools: remove static linking support 9 years ago
upx tools: remove static linking support 9 years ago
wrt350nv2-builder tools: remove static linking support 9 years ago
xz tools/xz: update to 5.2.2 9 years ago
yaffs2 tools: remove static linking support 9 years ago
Makefile tools: compile flock before everything else 9 years ago