aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/tiny/base-files/lib/upgrade
Commit message (Collapse)AuthorAgeFilesLines
* ath79: add Senao 'failsafe' sysupgrade procedureMichael Pratt2021-04-082-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ath79: split base-files into subtargetsAdrian Schmutzler2019-10-271-0/+20
While most of the target's contents are split into subtargets, the base-files are maintained for the target as a whole. However, OpenWrt already implements a mechanism that will use (and even prefer) files in the subtargets' directories. This can be exploited to make several scripts subtarget-specific and thus save some space (especially helpful for the tiny devices). The only script remaining in parent base-files is /etc/hotplug.d/ieee80211/00-wifi-migration, everything else is moved/split. Note that this will increase overall code lines, but reduce code per subtarget. base-files ipk size reduction: master (generic) 49135 B split (generic) 48533 B (- 0.6 kiB) split (tiny) 43337 B (- 5.7 kiB) split (nand) 44423 B (- 4.6 kiB) Tested on TL-WR1043ND v4 (generic) and TL-WR841N v12 (tiny). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>