From 1fa04b5d9fb1cba56a8597d6da9e1d52b8030f6b Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 18 Jan 2020 02:21:13 +0100 Subject: 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 Acked-by: Tomasz Maciej Nowak --- .../cortexa9/base-files/lib/upgrade/platform.sh | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh (limited to 'target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh') diff --git a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh new file mode 100755 index 0000000000..8baed969a3 --- /dev/null +++ b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh @@ -0,0 +1,59 @@ +# +# 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 + cznic,turris-omnia|\ + solidrun,clearfog-base-a1|\ + solidrun,clearfog-pro-a1) + platform_check_image_sdcard "$1" + ;; + *) + return 0 + ;; + esac +} + +platform_do_upgrade() { + case "$(board_name)" in + cznic,turris-omnia|\ + solidrun,clearfog-base-a1|\ + solidrun,clearfog-pro-a1) + platform_do_upgrade_sdcard "$1" + ;; + linksys,caiman|\ + linksys,cobra|\ + linksys,mamba|\ + linksys,rango|\ + linksys,shelby|\ + linksys,venom) + platform_do_upgrade_linksys "$1" + ;; + *) + default_do_upgrade "$1" + ;; + esac +} +platform_copy_config() { + case "$(board_name)" in + cznic,turris-omnia|\ + solidrun,clearfog-base-a1|\ + solidrun,clearfog-pro-a1) + platform_copy_config_sdcard + ;; + linksys,caiman|\ + linksys,cobra|\ + linksys,mamba|\ + linksys,rango|\ + linksys,shelby|\ + linksys,venom) + platform_copy_config_linksys + ;; + esac +} -- cgit v1.2.3