aboutsummaryrefslogtreecommitdiff
path: root/target/linux/armvirt/base-files/etc
diff options
context:
space:
mode:
authorMathew McBride <matt@traverse.com.au>2022-01-19 02:25:23 +0000
committerPetr Štetiar <ynezz@true.cz>2023-06-02 11:36:05 +0200
commite0f06ddc23b2503a1791ae7e97b02e2647e8a70d (patch)
tree803540679be5eb9e2ca7163ad459ed8df99bc940 /target/linux/armvirt/base-files/etc
parent16a20512d852f6ecebf8c57cd7fa2572a06a9d0b (diff)
armvirt: add EFI support
EFI booting is used on newer machines compatible with the Arm SystemReady specifications. This commit restructures armvirt into a more 'generic' target similar to x86. See https://github.com/openwrt/openwrt/pull/4956 for a history of this port. Signed-off-by: Mathew McBride <matt@traverse.com.au>
Diffstat (limited to 'target/linux/armvirt/base-files/etc')
-rw-r--r--target/linux/armvirt/base-files/etc/board.d/01_led19
-rw-r--r--target/linux/armvirt/base-files/etc/board.d/02_network18
-rw-r--r--target/linux/armvirt/base-files/etc/board.d/03_gpio_switches23
3 files changed, 60 insertions, 0 deletions
diff --git a/target/linux/armvirt/base-files/etc/board.d/01_led b/target/linux/armvirt/base-files/etc/board.d/01_led
new file mode 100644
index 0000000000..0250a9672f
--- /dev/null
+++ b/target/linux/armvirt/base-files/etc/board.d/01_led
@@ -0,0 +1,19 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+board=$(board_name)
+
+case "$board" in
+traverse,ten64)
+ ucidef_set_led_netdev "sfp1" "SFP 1" "ten64:green:sfp1:down" "eth8" "link tx rx"
+ ucidef_set_led_netdev "sfp2" "SFP 2" "ten64:green:sfp2:up" "eth9" "link tx rx"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/armvirt/base-files/etc/board.d/02_network b/target/linux/armvirt/base-files/etc/board.d/02_network
new file mode 100644
index 0000000000..f58de1c27d
--- /dev/null
+++ b/target/linux/armvirt/base-files/etc/board.d/02_network
@@ -0,0 +1,18 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+. /lib/functions/system.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+ traverse,ten64)
+ ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
+ ucidef_set_interface_wan "eth6"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/armvirt/base-files/etc/board.d/03_gpio_switches b/target/linux/armvirt/base-files/etc/board.d/03_gpio_switches
new file mode 100644
index 0000000000..cf07bc0f54
--- /dev/null
+++ b/target/linux/armvirt/base-files/etc/board.d/03_gpio_switches
@@ -0,0 +1,23 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+board=$(board_name)
+
+case "$board" in
+traverse,ten64)
+ ucidef_add_gpio_switch "lte_reset" "Cell Modem Reset" "376"
+ ucidef_add_gpio_switch "lte_power" "Cell Modem Power" "377"
+ ucidef_add_gpio_switch "lte_disable" "Cell Modem Airplane mode" "378"
+ ucidef_add_gpio_switch "gnss_disable" "Cell Modem Disable GNSS receiver" "379"
+ ucidef_add_gpio_switch "lower_sfp_txidsable" "Lower SFP+ TX Disable" "369"
+ ucidef_add_gpio_switch "upper_sfp_txdisable" "Upper SFP+ TX Disable" "373"
+ ;;
+esac
+
+board_config_flush
+
+exit 0