aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/sunxi/base-files
diff options
context:
space:
mode:
authorJayantajit Gogoi <jayanta.gogoi525@gmail.com>2020-10-12 18:51:34 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2020-10-18 15:46:42 +0200
commite6d9f6fdffc6730cfa2019788afa411828eac816 (patch)
treef3b4127aee433b0373d1490e7a96f121186fe5a2 /target/linux/sunxi/base-files
parent4ff7bdfeebd4c974b74df74f779fc10891898f5d (diff)
downloadupstream-e6d9f6fdffc6730cfa2019788afa411828eac816.tar.gz
upstream-e6d9f6fdffc6730cfa2019788afa411828eac816.tar.bz2
upstream-e6d9f6fdffc6730cfa2019788afa411828eac816.zip
sunxi: add support for FriendlyARM NanoPi R1
Specification: - CPU: Allwinner H3, Quad-core Cortex-A7 Up to 1.2GHz - DDR3 RAM: 512MB/1GB - Network: 10/100/1000M Ethernet x 1, 10/100M Ethernet x 1 - WiFi: 802.11b/g/n, with SMA antenna interface - USB Host: Type-A x2 - MicroSD Slot x 1 - MicroUSB: for OTG and power input - Debug Serial Port: 3Pin 2.54mm pitch pin-header - LED: nanopi:red:status nanopi:green:wan nanopi:green:lan - KEY: reset - Power Supply: DC 5V/2A Installation: - Write the image to SD Card with dd - Boot NanoPi from the SD Card Signed-off-by: Jayantajit Gogoi <jayanta.gogoi525@gmail.com>
Diffstat (limited to 'target/linux/sunxi/base-files')
-rw-r--r--target/linux/sunxi/base-files/etc/board.d/01_leds20
-rwxr-xr-xtarget/linux/sunxi/base-files/etc/board.d/02_network3
2 files changed, 23 insertions, 0 deletions
diff --git a/target/linux/sunxi/base-files/etc/board.d/01_leds b/target/linux/sunxi/base-files/etc/board.d/01_leds
new file mode 100644
index 0000000000..514b8d1796
--- /dev/null
+++ b/target/linux/sunxi/base-files/etc/board.d/01_leds
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+. /lib/functions/leds.sh
+. /lib/functions/uci-defaults.sh
+
+board=$(board_name)
+boardname="${board##*,}"
+
+board_config_update
+
+case $board in
+friendlyarm,nanopi-r1)
+ ucidef_set_led_netdev "wan" "WAN" "nanopi:green:wan" "eth0"
+ ucidef_set_led_netdev "lan" "LAN" "nanopi:green:lan" "eth1"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network b/target/linux/sunxi/base-files/etc/board.d/02_network
index 5cf000cccf..08d31caadc 100755
--- a/target/linux/sunxi/base-files/etc/board.d/02_network
+++ b/target/linux/sunxi/base-files/etc/board.d/02_network
@@ -8,6 +8,9 @@
board_config_update
case $(board_name) in
+friendlyarm,nanopi-r1)
+ ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ;;
lamobo,lamobo-r1)
ucidef_add_switch "switch0" \
"4:lan:1" "0:lan:2" "1:lan:3" "2:lan:4" "3:wan" "8@eth0"