openwrt/target/linux/ath79
Michael Pratt d5035f0d26 ath79: add Senao 'failsafe' sysupgrade procedure
Use a similar upgrade method for sysupgrade.bin, like factory.bin,
for Senao boards with the tar.gz OEM upgrade platform,
and 'failsafe' image which is loaded on checksum failure.

This is inspired by the OEM upgrade script /etc/fwupgrade.sh
and the existing platforms for dual-boot Senao boards.

Previously, if the real kernel was damaged or missing
the only way to recover was with UART serial console,
because the OKLI lzma-loader is programmed to halt.

uboot did not detect cases where kernel or rootfs is damaged
and boots OKLI instead of the failsafe image,
because the checksums stored in uboot environment
did not include the real kernel and rootfs space.

Now, the stored checksums include the space for both
the lzma-loader, kernel, and rootfs.
Therefore, these boards are now practically unbrickable.

Also, the factory.bin and sysupgrade.bin are now the same,
except for image metadata.
This allows for flashing OEM image directly from openwrt
as well as flashing openwrt image directly from OEM.

Make 'loader' partition writable so that it can be updated
during a sysupgrade.

tested with
ENS202EXT v1
EAP1200H
EAP350 v1
EAP600
ECB350 v1
ECB600
ENH202 v1

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2021-04-08 09:20:59 +02:00
..
base-files/etc/hotplug.d/ieee80211 ath79: add WiFi migration for AR913x 2020-09-28 16:23:03 +02:00
dts ath79: add Senao 'failsafe' sysupgrade procedure 2021-04-08 09:20:59 +02:00
files ath79: ar934x-nand: fix broken nand on kernel 5.10 2021-04-06 17:00:07 +02:00
generic ath79: add Senao 'failsafe' sysupgrade procedure 2021-04-08 09:20:59 +02:00
image ath79: add Senao 'failsafe' sysupgrade procedure 2021-04-08 09:20:59 +02:00
mikrotik treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
nand treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
patches-5.4 kernel: backport 5.13 mtd partitioning changes 2021-03-29 08:46:17 +02:00
patches-5.10 kernel: backport 5.13 mtd partitioning changes 2021-03-29 08:46:17 +02:00
tiny ath79: add Senao 'failsafe' sysupgrade procedure 2021-04-08 09:20:59 +02:00
config-5.4 ath79: enable Regulator support for target 2021-02-22 00:57:25 +01:00
config-5.10 ath79: enable AT803X PHY for kernel 5.10 2021-03-05 00:03:57 +01:00
Makefile ath79: add kernel 5.10 support 2021-02-20 01:26:33 +01:00
modules.mk ath79: add new OF only target for QCA MIPS silicon 2018-05-07 08:06:51 +02:00