diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-07-12 14:05:47 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-07-16 19:02:49 +0200 |
commit | 20452a8db9f90e5f1d0733363a488be522cd5c0f (patch) | |
tree | 82a2239f021469939e70656a0635bc8480055f4b /target/linux/ar71xx/base-files/lib | |
parent | 2a7519e29d6cbbe1eb73623ef35add0ef596fb5f (diff) | |
download | upstream-20452a8db9f90e5f1d0733363a488be522cd5c0f.tar.gz upstream-20452a8db9f90e5f1d0733363a488be522cd5c0f.tar.bz2 upstream-20452a8db9f90e5f1d0733363a488be522cd5c0f.zip |
ar71xx: get rid of platform_pre_upgrade()
The only step between platform_pre_upgrade() and platform_do_upgrade()
is switching to ramdisk. It should be fine to "mtd erase firmware" from
the later callback and get rid of the first one.
This change wasn't tested on affected target but identical code logic
was verified to work as expected on brcm47xx with initramfs firmware.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/ar71xx/base-files/lib')
-rwxr-xr-x | target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index d0690dbaf4..c0f383b4e3 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -746,33 +746,6 @@ platform_check_image() { return 1 } -platform_pre_upgrade() { - local board=$(board_name) - - case "$board" in - rb-750-r2|\ - rb-750p-pbr2|\ - rb-750up-r2|\ - rb-911-2hn|\ - rb-911-5hn|\ - rb-931-2nd|\ - rb-941-2nd|\ - rb-951ui-2nd|\ - rb-952ui-5ac2nd|\ - rb-962uigs-5hact2hnt|\ - rb-lhg-5nd|\ - rb-map-2nd|\ - rb-mapl-2nd|\ - rb-sxt-2nd-r3|\ - rb-wap-2nd|\ - rb-wapg-5hact2hnd|\ - rb-wapr-2nd) - # erase firmware if booted from initramfs - [ -z "$(rootfs_type)" ] && mtd erase firmware - ;; - esac -} - platform_nand_pre_upgrade() { local board=$(board_name) @@ -809,6 +782,29 @@ platform_do_upgrade() { local board=$(board_name) case "$board" in + rb-750-r2|\ + rb-750p-pbr2|\ + rb-750up-r2|\ + rb-911-2hn|\ + rb-911-5hn|\ + rb-931-2nd|\ + rb-941-2nd|\ + rb-951ui-2nd|\ + rb-952ui-5ac2nd|\ + rb-962uigs-5hact2hnt|\ + rb-lhg-5nd|\ + rb-map-2nd|\ + rb-mapl-2nd|\ + rb-sxt-2nd-r3|\ + rb-wap-2nd|\ + rb-wapg-5hact2hnd|\ + rb-wapr-2nd) + # erase firmware if booted from initramfs + [ -z "$(rootfs_type)" ] && mtd erase firmware + ;; + esac + + case "$board" in all0258n) platform_do_upgrade_allnet "0x9f050000" "$ARGV" ;; |