aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/socfpga/base-files/etc
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/socfpga/base-files/etc')
-rw-r--r--target/linux/socfpga/base-files/etc/fw_env.config3
-rwxr-xr-xtarget/linux/socfpga/base-files/etc/init.d/sockit_vtcon15
-rw-r--r--target/linux/socfpga/base-files/etc/uci-defaults/01_leds22
-rw-r--r--target/linux/socfpga/base-files/etc/uci-defaults/02_network25
4 files changed, 65 insertions, 0 deletions
diff --git a/target/linux/socfpga/base-files/etc/fw_env.config b/target/linux/socfpga/base-files/etc/fw_env.config
new file mode 100644
index 0000000000..f6fe3f9bea
--- /dev/null
+++ b/target/linux/socfpga/base-files/etc/fw_env.config
@@ -0,0 +1,3 @@
+# MTD device name Device offset Env. size Flash sector size
+/dev/mtd1 0x0 0x1000 0x10000
+/dev/mtd2 0x0 0x1000 0x10000
diff --git a/target/linux/socfpga/base-files/etc/init.d/sockit_vtcon b/target/linux/socfpga/base-files/etc/init.d/sockit_vtcon
new file mode 100755
index 0000000000..6555f5b348
--- /dev/null
+++ b/target/linux/socfpga/base-files/etc/init.d/sockit_vtcon
@@ -0,0 +1,15 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+start() {
+ . /lib/socfpga.sh
+
+ local board=$(socfpga_board_name)
+
+ # Print something nice on the VTcon (the SPI LCD)
+ if [ "${board}" = "socfpga-sockit" ] ; then
+ echo "OpenWRT" > /dev/tty0
+ uci show network.lan.ipaddr > /dev/tty0
+ fi
+}
diff --git a/target/linux/socfpga/base-files/etc/uci-defaults/01_leds b/target/linux/socfpga/base-files/etc/uci-defaults/01_leds
new file mode 100644
index 0000000000..a04de3b40e
--- /dev/null
+++ b/target/linux/socfpga/base-files/etc/uci-defaults/01_leds
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+
+. /lib/functions/uci-defaults.sh
+. /lib/socfpga.sh
+
+board=$(socfpga_board_name)
+
+case "$board" in
+"socfpga-sockit")
+ ucidef_set_led_netdev "lan" "LAN" "hps:blue:led0" "eth0"
+ ucidef_set_led_mmc "mmc" "MMC" "hps:blue:led1" "mmc0"
+ ucidef_set_led_default "health" "health" "hps:blue:led2" "1"
+ ucidef_set_led_default "fault" "fault" "hps:blue:led3" "1"
+ ;;
+esac
+
+ucidef_commit_leds
+
+exit 0
diff --git a/target/linux/socfpga/base-files/etc/uci-defaults/02_network b/target/linux/socfpga/base-files/etc/uci-defaults/02_network
new file mode 100644
index 0000000000..479e8202f7
--- /dev/null
+++ b/target/linux/socfpga/base-files/etc/uci-defaults/02_network
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+
+[ -e /etc/config/network ] && exit 0
+
+touch /etc/config/network
+
+. /lib/functions/uci-defaults.sh
+. /lib/socfpga.sh
+
+board=$(socfpga_board_name)
+
+ucidef_set_interface_loopback
+
+case "$board" in
+"socfpga-sockit")
+ ucidef_set_interface_lan 'eth0'
+ ;;
+esac
+
+uci commit network
+
+exit 0