diff options
author | Luka Perkov <luka@openwrt.org> | 2016-05-10 22:52:00 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2016-06-19 19:35:42 +0200 |
commit | 9ccd1da444ff320abf069322b6063d7d041cdd20 (patch) | |
tree | 6e4bf314ba8e2ae7ffd68f166a46977aad676ec8 /target/linux/socfpga/base-files/etc | |
parent | c3d9ae93fd2cfb51ae3e843487edad81545afca4 (diff) | |
download | master-187ad058-9ccd1da444ff320abf069322b6063d7d041cdd20.tar.gz master-187ad058-9ccd1da444ff320abf069322b6063d7d041cdd20.tar.bz2 master-187ad058-9ccd1da444ff320abf069322b6063d7d041cdd20.zip |
target: socfpga: Add Altera SoCFPGA support
This patch adds support for the Altera SoCFPGA target.
Both generic target and Terasic SoCkit boards are supported.
Signed-off-by: Marek Vasut <marex@denx.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49367 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/socfpga/base-files/etc')
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 |