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/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>
5 years ago
..
adm5120 kernel: bump 3.18 to 3.18.133 5 years ago
adm8668 kernel: bump 3.18 to 3.18.133 5 years ago
apm821xx kernel: bump 4.19 to 4.19.34 5 years ago
ar7 kernel: bump 4.9 to 4.9.153 5 years ago
ar71xx ar71xx: ubnt-m-xw: Fix factory image flashing using TFTP recovery 5 years ago
arc770 treewide: use wpad-basic for not small flash targets 6 years ago
archs38 treewide: use wpad-basic for not small flash targets 6 years ago
armvirt armvirt: 32: enable CONFIG_ARM_LPAE 5 years ago
at91 kernel: Build: Split kmod-regmap 5 years ago
ath25 kernel: bump 4.14 to 4.14.79 6 years ago
ath79 kernel: bump 4.19 to 4.19.34 5 years ago
au1000 treewide: use wpad-basic for not small flash targets 6 years ago
bcm53xx kernel: bump 4.19 to 4.19.34 5 years ago
brcm47xx kernel: bump 4.19 to 4.19.34 5 years ago
brcm63xx kernel: bump 4.9 to 4.9.164 5 years ago
brcm2708 kernel: bump 4.14 to 4.14.111 5 years ago
cns3xxx kernel: bump 4.19 to 4.19.34 5 years ago
gemini kernel: bump 4.19 to 4.19.34 5 years ago
generic kernel: bump 4.19 to 4.19.34 5 years ago
imx6 imx6: Add support for Toradex Apalis family of CoMs 5 years ago
ipq40xx ipq40xx: essedma: Add fix for memory allocation issues 5 years ago
ipq806x kernel: bump 4.14 to 4.14.108 5 years ago
ixp4xx kernel: bump 4.9 to 4.9.160 5 years ago
kirkwood kernel: bump 4.14 to 4.14.108 5 years ago
lantiq lantiq: kernel 4.14: fix usb_phy1 reset status bit in vr9.dts 5 years ago
layerscape kernel: bump 4.14 to 4.14.111 5 years ago
malta malta: Add support for kernel 4.19 6 years ago
mcs814x kernel: bump 3.18 to 3.18.119 6 years ago
mediatek kernel: bump 4.14 to 4.14.99 5 years ago
mpc85xx kernel: bump 4.14 to 4.14.110 5 years ago
mvebu mvebu: sysupgrade: sdcard: keep user added partitons 5 years ago
mxs mxs: disable unused serial drivers 5 years ago
octeon kernel: bump 4.19 to 4.19.34 5 years ago
octeontx kernel: enable memory compaction 6 years ago
omap kernel: bump 4.14 to 4.14.77 6 years ago
omap24xx omap24xx: remove referece to not existing kmod-usb-musb-tusb6010 7 years ago
orion treewide: use wpad-basic for not small flash targets 6 years ago
oxnas kernel: bump 4.14 to 4.14.108 5 years ago
pistachio kernel: bump 4.14 to 4.14.91 6 years ago
ppc40x kernel: only optimized for size if small_flash 6 years ago
ppc44x kernel: only optimized for size if small_flash 6 years ago
ramips ramips: correct DTS for Belkin F9K1109v1 to include switch definition 5 years ago
rb532 kernel: bump 4.14 to 4.14.86 6 years ago
samsung kernel: Deactivate CONFIG_COMPAT_BRK 6 years ago
sunxi kernel: bump 4.19 to 4.19.34 5 years ago
tegra tegra: add kernel 4.19 support 5 years ago
uml treewide: use wpad-basic for not small flash targets 6 years ago
x86 x86: video: disable buildtin amdgpu DRM driver 5 years ago
xburst kernel: bump 3.18 to 3.18.119 6 years ago
zynq zynq: replace storage related configs by packages 5 years ago
Makefile