openwrt/target/linux/ath79/image
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
..
bin ath79: add support for PISEN WMB001N 2019-08-08 21:00:59 +08:00
lzma-loader ath79: lzma-loader: allow setting custom kernel magic 2021-04-08 09:20:59 +02:00
common-buffalo.mk ath79: use common device definition for Buffalo devices 2020-09-16 17:31:03 +02:00
common-mikrotik.mk ath79/mikrotik: disable building NAND images 2020-12-27 20:33:57 +01:00
common-netgear.mk ath79: fix factory image generation for Netgear and Zyxel boards 2021-02-14 19:21:38 +01:00
common-senao.mk ath79: add Senao 'failsafe' sysupgrade procedure 2021-04-08 09:20:59 +02:00
common-tp-link.mk ath79: replace custom uImageArcher generation 2020-06-29 01:08:09 +02:00
common-yuncore.mk ath79: add support for YunCore TFTP image generation 2019-11-25 17:32:46 +01:00
generic-tp-link.mk treewide: make AddDepends/usb-serial selective 2021-03-06 12:38:38 +01:00
generic-ubnt.mk ath79: add support for Ubiquiti UniFi AP Outdoor+ 2021-02-01 00:47:46 +01:00
generic.mk ath79: remove 'fakeroot' for Senao devices 2021-04-08 09:20:59 +02:00
Makefile ath79: lzma-loader: allow setting custom kernel magic 2021-04-08 09:20:59 +02:00
mikrotik.mk ath79: add support for MikroTik RouterBOARD wAPR-2nD (wAP R) 2020-12-22 19:11:50 +01:00
nand.mk ath79: fix factory image generation for Netgear and Zyxel boards 2021-02-14 19:21:38 +01:00
tiny-netgear.mk ath79: netgear: trim down uImage customisations 2020-11-25 16:33:49 +01:00
tiny-tp-link.mk ath79: add support for TP-Link TL-WA901ND v3 2020-08-08 20:40:48 +02:00
tiny.mk ath79: adjust ath79/tiny Senao APs to 4k blocksize 2021-04-08 09:20:59 +02:00