aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-01-18 02:21:13 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-01-21 14:24:49 +0100
commit1fa04b5d9fb1cba56a8597d6da9e1d52b8030f6b (patch)
treeda02f4bb267128497f1ad7e3c755c8685d8005d1 /target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh
parente93626f1f47ec6c1995067c9ed3798ebd468cda3 (diff)
downloadupstream-1fa04b5d9fb1cba56a8597d6da9e1d52b8030f6b.tar.gz
upstream-1fa04b5d9fb1cba56a8597d6da9e1d52b8030f6b.tar.bz2
upstream-1fa04b5d9fb1cba56a8597d6da9e1d52b8030f6b.zip
mvebu: split base-files across subtargets
For the mvebu target in particular, there is a lot of files in base-files that are only relevant for one subtarget. Improve overview and reduce size per subtarget by moving/splitting base-files depending on the subtarget they belong to. While at it, consolidate 01_leds by using the model part of the board name as variable. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Diffstat (limited to 'target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh')
-rwxr-xr-xtarget/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh52
1 files changed, 52 insertions, 0 deletions
diff --git a/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh
new file mode 100755
index 0000000000..cdf5933272
--- /dev/null
+++ b/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2014-2016 OpenWrt.org
+# Copyright (C) 2016 LEDE-Project.org
+#
+
+RAMFS_COPY_BIN='fw_printenv fw_setenv'
+RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
+REQUIRE_IMAGE_METADATA=1
+
+platform_check_image() {
+ case "$(board_name)" in
+ globalscale,espressobin|\
+ globalscale,espressobin-emmc|\
+ globalscale,espressobin-v7|\
+ globalscale,espressobin-v7-emmc)
+ platform_check_image_sdcard "$1"
+ ;;
+ *)
+ return 0
+ ;;
+ esac
+}
+
+platform_do_upgrade() {
+ case "$(board_name)" in
+ globalscale,espressobin|\
+ globalscale,espressobin-emmc|\
+ globalscale,espressobin-v7|\
+ globalscale,espressobin-v7-emmc)
+ platform_do_upgrade_sdcard "$1"
+ ;;
+ methode,udpu)
+ platform_do_upgrade_uDPU "$1"
+ ;;
+ *)
+ default_do_upgrade "$1"
+ ;;
+ esac
+}
+platform_copy_config() {
+ case "$(board_name)" in
+ globalscale,espressobin|\
+ globalscale,espressobin-emmc|\
+ globalscale,espressobin-v7|\
+ globalscale,espressobin-v7-emmc)
+ platform_copy_config_sdcard
+ ;;
+ methode,udpu)
+ platform_copy_config_uDPU
+ ;;
+ esac
+}