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>
This commit is contained in:
Adrian Schmutzler
2020-01-18 02:21:13 +01:00
parent e93626f1f4
commit 1fa04b5d9f
17 changed files with 251 additions and 129 deletions

View File

@@ -0,0 +1,30 @@
#!/bin/sh
#
# Copyright (C) 2014-2016 OpenWrt.org
# Copyright (C) 2016 LEDE-Project.org
#
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
marvell,armada8040-mcbin)
ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2"
;;
marvell,armada8040-db)
ucidef_set_interfaces_lan_wan "eth0 eth2 eth3" "eth1"
;;
marvell,armada7040-db)
ucidef_set_interfaces_lan_wan "eth0 eth2" "eth1"
;;
*)
ucidef_set_interface_lan "eth0"
;;
esac
board_config_flush
exit 0

View File

@@ -0,0 +1,37 @@
#
# 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
marvell,armada8040-mcbin)
platform_check_image_sdcard "$1"
;;
*)
return 0
;;
esac
}
platform_do_upgrade() {
case "$(board_name)" in
marvell,armada8040-mcbin)
platform_do_upgrade_sdcard "$1"
;;
*)
default_do_upgrade "$1"
;;
esac
}
platform_copy_config() {
case "$(board_name)" in
marvell,armada8040-mcbin)
platform_copy_config_sdcard
;;
esac
}