1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-28 20:05:10 +02:00
Commit Graph

18 Commits

Author SHA1 Message Date
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
Felix Fietkau
619a58d641 ar71xx, firmware-utils: split ubdev01 flash layout from XM
The ubdev01 profile defines its own MTDPARTS with smaller firmware
partition, so give it its own UBNT_BOARD in mkfwimage.

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

SVN-Revision: 48828
2016-02-29 20:11:30 +00:00
Felix Fietkau
bd93998df6 firmware-utils: mkfwimage: add -Wall, fix obvious bugs causing compile warnings
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 48827
2016-02-29 20:11:26 +00:00
Gabor Juhos
50458fb24c mkfwimage: Increase RSPRO maximum size to 0xF00000 (15 MiB)
RSPRO has 16MiB of Flash, using the following layout:

[    2.930000] 0x000000000000-0x000000030000 : "RedBoot"
[    2.940000] 0x000000030000-0x000000130000 : "kernel"
[    2.950000] 0x000000130000-0x000000ff0000 : "rootfs"
[    2.960000] 0x000000ff0000-0x000000fff000 : "FIS directory"
[    2.970000] 0x000000fff000-0x000001000000 : "RedBoot config"

Firmware images contain kernel and rootfs, so they can use up to 0xFF0000 -
0x30000 = 0xFC0000 (15,75MiB) of space. We don't include the RedBoot and FIS
partitions and leave an extra 0xC0000 (768KiB) of space.

This is based on revision 18410 which sets the limit to 0xB00000 (11 MiB).

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38484
2013-10-20 15:59:08 +00:00
Gabor Juhos
84267683bb firmware-utils/mkfwimage: allow to override firmware magic
SVN-Revision: 30627
2012-02-18 14:45:54 +00:00
Felix Fietkau
e999c93128 mkfwimage: add support for the XM layout (bullet/rocket/nano M)
SVN-Revision: 18448
2009-11-18 18:10:24 +00:00
Gabor Juhos
e6a40cac9a ar71xx: increase max size of RouterStation and RouterStation Pro firmware images
Thanks to riskable! (closes #5860)

SVN-Revision: 18410
2009-11-13 17:11:23 +00:00
Gabor Juhos
9221732114 firmware-utils/mkfwimage: add support for RouterStation Pro (patch from Ubiquiti Networks)
SVN-Revision: 16064
2009-05-25 17:18:21 +00:00
Jo-Philipp Wich
70bf92d03c Generate suitable images for the UBNT PicoStation2
SVN-Revision: 15314
2009-04-21 01:16:34 +00:00
Gabor Juhos
b4644aedce create firmware image for the Ubiquiti LS-SR71 board
SVN-Revision: 14874
2009-03-14 13:25:49 +00:00
Gabor Juhos
7fcc18ee99 firmware-utils/mkfwimage: update RouterStation specific values, adn remove some unused code
SVN-Revision: 14404
2009-02-04 08:13:58 +00:00
Gabor Juhos
50c19eee3f firmware-utils/mkfwimage: fix root_start values
SVN-Revision: 13874
2009-01-05 12:35:51 +00:00
Gabor Juhos
54b85f55d9 firmware-utils/mkfwimage: fix Ubiquiti firmware generation (closes #4414)
SVN-Revision: 13859
2009-01-04 18:42:46 +00:00
Gabor Juhos
124f0b003a firmware-utils/mkfwimage: add RouterStation support (based on a patch by Jonas <jonas at ubnt.com>)
SVN-Revision: 13682
2008-12-18 13:31:59 +00:00
Travis Kemen
1de0fb9f02 fix mkfwimage to recognize the -s option
SVN-Revision: 11978
2008-07-28 20:48:06 +00:00
Felix Fietkau
c385ca9c81 fix mkfwimage build on mac os x
SVN-Revision: 11947
2008-07-26 20:27:03 +00:00
Travis Kemen
14622d5a08 Use mkfwimage from athero.openwrt.net with modification for XS2 devices. Add back in ubiquiti image generation.
SVN-Revision: 11920
2008-07-25 03:55:21 +00:00
Travis Kemen
3612b1e7c0 buld images for the Ubiquiti LiteStation and NanoStation ported from http://atheros.openwrt.net. Tested on a Nanostation 2 with airos 3
SVN-Revision: 11061
2008-05-07 23:47:17 +00:00