diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-11-11 16:27:50 +0100 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-01-14 13:34:34 +0100 |
commit | e845c094d5c9d6afbb1ab3f0815d6ed546b9d429 (patch) | |
tree | eb78d9d5f7c998bdf855b78b30d68fee37715a01 /target/linux/mediatek/base-files/lib/upgrade/platform.sh | |
parent | c6e972c8772a628a1a2f2e5590d7c6f4acef9ab0 (diff) | |
download | openwrt-e845c094d5c9d6afbb1ab3f0815d6ed546b9d429.tar.gz openwrt-e845c094d5c9d6afbb1ab3f0815d6ed546b9d429.tar.bz2 openwrt-e845c094d5c9d6afbb1ab3f0815d6ed546b9d429.zip |
mediatek: split base-files into subtargets
This splits some base-files across subtargets, as done previously
on ath79 and ramips and also introduced for mt7629 subtarget here
already. Most of the existing base-files content is specific to
mt7623.
While at it, apply the following fixes:
- Remove lots of trailing whitespaces
- Remove wildcard on unielec,u7623-02-emmc-512m
- Remove inconsistent quotation marks in cases
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek/base-files/lib/upgrade/platform.sh')
-rwxr-xr-x | target/linux/mediatek/base-files/lib/upgrade/platform.sh | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/target/linux/mediatek/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/base-files/lib/upgrade/platform.sh deleted file mode 100755 index 9c99ee1c18..0000000000 --- a/target/linux/mediatek/base-files/lib/upgrade/platform.sh +++ /dev/null @@ -1,68 +0,0 @@ -platform_do_upgrade() { - local board=$(board_name) - case "$board" in - "unielec,u7623"*) - #Keep the persisten random mac address (if it exists) - mkdir -p /tmp/recovery - mount -o rw,noatime /dev/mmcblk0p1 /tmp/recovery - [ -f "/tmp/recovery/mac_addr" ] && \ - mv -f /tmp/recovery/mac_addr /tmp/ - umount /tmp/recovery - - #1310720 is the offset in bytes from the start of eMMC and to - #the location of the kernel (2560 512 byte sectors) - get_image "$1" | dd of=/dev/mmcblk0 bs=1310720 seek=1 conv=fsync - - mount -o rw,noatime /dev/mmcblk0p1 /tmp/recovery - [ -f "/tmp/mac_addr" ] && mv -f /tmp/mac_addr /tmp/recovery - sync - umount /tmp/recovery - ;; - *) - default_do_upgrade "$1" - ;; - esac -} - -PART_NAME=firmware - -platform_check_image() { - local board=$(board_name) - local magic="$(get_magic_long "$1")" - - [ "$#" -gt 1 ] && return 1 - - case "$board" in - bananapi,bpi-r2|\ - "unielec,u7623"*) - [ "$magic" != "27051956" ] && { - echo "Invalid image type." - return 1 - } - return 0 - ;; - - *) - echo "Sysupgrade is not supported on your board yet." - return 1 - ;; - esac - - return 0 -} - -platform_copy_config_emmc() { - mkdir -p /recovery - mount -o rw,noatime /dev/mmcblk0p1 /recovery - cp -af "$UPGRADE_BACKUP" "/recovery/$BACKUP_FILE" - sync - umount /recovery -} - -platform_copy_config() { - case "$(board_name)" in - "unielec,u7623"*) - platform_copy_config_emmc - ;; - esac -} |