diff options
Diffstat (limited to 'target/linux/mvebu/cortexa72/base-files')
-rwxr-xr-x | target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network | 30 | ||||
-rwxr-xr-x | target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh | 37 |
2 files changed, 67 insertions, 0 deletions
diff --git a/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network new file mode 100755 index 0000000000..080e32ada3 --- /dev/null +++ b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network @@ -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 diff --git a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh new file mode 100755 index 0000000000..2428de08c4 --- /dev/null +++ b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh @@ -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 +} |