1
0
Fork 0
forked from mirror/openwrt
openwrt/target/linux
Petr Štetiar 6009b3fd58 ar71xx: ubnt-m-xw: Fix factory image flashing using TFTP recovery
This is backport of the same functionality in ath79, from commit
 d42a7c469 ("ath79: ubnt-m-xw: Fix factory image flashing using TFTP
             recovery method")

Ubiquity allows flashing of unsigned factory images via TFTP recovery
method[1]. They claim in airOS v6.0.7 release changelog[2] following:

 All future airOS versions will be signed in this way and not allow
 unsigned firmware to be loaded except via TFTP.

U-boot bootloader on M-XW devices expects factory image revision
version in specific format. On airOS v6.1.7 with `U-Boot 1.1.4-s1039
(May 24 2017 - 15:58:18)` bootloader checks if the revision major(?)
number is actually a number, but in currently generated images there's
OpenWrt text and so the check fails:

 Hit any key to stop autoboot:  0
 Setting default IP 192.168.1.20
 Starting TFTP server...
 Receiving file from 192.168.1.25:38438
 Received 4981148 bytes
 Firmware check failed! (1)

By placing arbitrary correct number first in major version, we make the
bootloader happy and we can flash factory images over TFTP again:

 Received 3801500 bytes
 Firmware Version: XW.ar934x.v6.0.4-42.OpenWrt-r9766+2-be42e44
 Setting U-Boot environment variables
 Un-Protected 1 sectors
 Erasing Flash.... done

Patch provided by AREDN[3] project, tested on Bullet M2 XW.

1. https://help.ubnt.com/hc/en-us/articles/204910124-UniFi-TFTP-Recovery-for-Bricked-Access-Points
2. https://dl.ubnt.com/firmwares/XW-fw/v6.0.7/changelog.txt
3. https://github.com/aredn

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-04-08 18:37:04 +02:00
..
adm5120 kernel: bump 3.18 to 3.18.133 2019-01-28 18:17:32 +01:00
adm8668 kernel: bump 3.18 to 3.18.133 2019-01-28 18:17:32 +01:00
apm821xx kernel: bump 4.19 to 4.19.34 2019-04-08 14:53:39 +02:00
ar7 kernel: bump 4.9 to 4.9.153 2019-01-28 18:17:32 +01:00
ar71xx ar71xx: ubnt-m-xw: Fix factory image flashing using TFTP recovery 2019-04-08 18:37:04 +02:00
arc770 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
archs38 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
armvirt armvirt: 32: enable CONFIG_ARM_LPAE 2019-02-19 13:13:49 +00:00
at91 kernel: Build: Split kmod-regmap 2019-01-27 00:16:13 +01:00
ath25 kernel: bump 4.14 to 4.14.79 2018-11-05 16:00:00 +01:00
ath79 kernel: bump 4.19 to 4.19.34 2019-04-08 14:53:39 +02:00
au1000 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
bcm53xx kernel: bump 4.19 to 4.19.34 2019-04-08 14:53:39 +02:00
brcm47xx kernel: bump 4.19 to 4.19.34 2019-04-08 14:53:39 +02:00
brcm63xx kernel: bump 4.9 to 4.9.164 2019-03-22 18:14:28 +01:00
brcm2708 kernel: bump 4.14 to 4.14.111 2019-04-08 14:53:39 +02:00
cns3xxx kernel: bump 4.19 to 4.19.34 2019-04-08 14:53:39 +02:00
gemini kernel: bump 4.19 to 4.19.34 2019-04-08 14:53:39 +02:00
generic kernel: bump 4.19 to 4.19.34 2019-04-08 14:53:39 +02:00
imx6 imx6: Add support for Toradex Apalis family of CoMs 2019-04-08 18:37:04 +02:00
ipq40xx ipq40xx: essedma: Add fix for memory allocation issues 2019-03-24 21:17:41 +01:00
ipq806x kernel: bump 4.14 to 4.14.108 2019-03-27 10:48:59 +01:00
ixp4xx kernel: bump 4.9 to 4.9.160 2019-02-25 17:33:16 +01:00
kirkwood kernel: bump 4.14 to 4.14.108 2019-03-27 10:48:59 +01:00
lantiq lantiq: kernel 4.14: fix usb_phy1 reset status bit in vr9.dts 2019-03-18 20:42:30 +01:00
layerscape kernel: bump 4.14 to 4.14.111 2019-04-08 14:53:39 +02:00
malta malta: Add support for kernel 4.19 2019-01-13 16:31:40 +01:00
mcs814x kernel: bump 3.18 to 3.18.119 2018-08-20 13:03:23 +02:00
mediatek kernel: bump 4.14 to 4.14.99 2019-02-14 16:45:01 +01:00
mpc85xx kernel: bump 4.14 to 4.14.110 2019-04-08 12:07:28 +02:00
mvebu mvebu: sysupgrade: sdcard: keep user added partitons 2019-04-06 16:31:10 +02:00
mxs mxs: disable unused serial drivers 2019-03-11 19:35:43 +01:00
octeon kernel: bump 4.19 to 4.19.34 2019-04-08 14:53:39 +02:00
octeontx kernel: enable memory compaction 2018-10-09 14:29:55 +02:00
omap kernel: bump 4.14 to 4.14.77 2018-10-19 10:01:57 +02:00
omap24xx omap24xx: remove referece to not existing kmod-usb-musb-tusb6010 2018-01-15 13:13:34 +01:00
orion treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
oxnas kernel: bump 4.14 to 4.14.108 2019-03-27 10:48:59 +01:00
pistachio kernel: bump 4.14 to 4.14.91 2019-01-07 17:09:06 +01:00
ppc40x kernel: only optimized for size if small_flash 2018-07-12 18:15:32 +02:00
ppc44x kernel: only optimized for size if small_flash 2018-07-12 18:15:32 +02:00
ramips ramips: correct DTS for Belkin F9K1109v1 to include switch definition 2019-04-06 19:14:06 +02:00
rb532 kernel: bump 4.14 to 4.14.86 2018-12-10 11:48:44 +01:00
samsung kernel: Deactivate CONFIG_COMPAT_BRK 2018-12-26 17:32:48 +01:00
sunxi kernel: bump 4.19 to 4.19.34 2019-04-08 14:53:39 +02:00
tegra tegra: add kernel 4.19 support 2019-04-06 14:48:46 +02:00
uml treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
x86 x86: video: disable buildtin amdgpu DRM driver 2019-02-17 19:22:39 +01:00
xburst kernel: bump 3.18 to 3.18.119 2018-08-20 13:03:23 +02:00
zynq zynq: replace storage related configs by packages 2019-04-06 16:31:10 +02:00
Makefile