#!/bin/sh
# Copyright (C) 2014-2016 OpenWrt.org
+# Copyright (C) 2017 LEDE project
. /lib/functions/uci-defaults.sh
. /lib/brcm2708.sh
board=$(brcm2708_board_name)
case "$board" in
-rpi-b |\
-rpi-b-plus |\
rpi-2-b |\
-rpi-3-b)
+rpi-3-b |\
+rpi-b |\
+rpi-b-plus)
ucidef_set_interface_lan "eth0"
;;
esac
#!/bin/sh
# Copyright (C) 2015-2016 OpenWrt.org
+# Copyright (C) 2017 LEDE project
ifname=""
model=$(cat /proc/device-tree/model)
case "$model" in
- "Raspberry Pi Model B Rev"*)
- board_name="rpi-b"
+ "Raspberry Pi 2 Model B Rev"*)
+ board_name="rpi-2-b"
+ ;;
+ "Raspberry Pi 3 Model B Rev"*)
+ board_name="rpi-3-b"
+ ;;
+ "Raspberry Pi Compute Module Rev"*)
+ board_name="rpi-cm"
;;
"Raspberry Pi Model B Plus Rev"* |\
"Raspberry Pi Model B+ Rev"*)
board_name="rpi-b-plus"
;;
- "Raspberry Pi Compute Module Rev"*)
- board_name="rpi-cm"
+ "Raspberry Pi Model B Rev"*)
+ board_name="rpi-b"
;;
"Raspberry Pi Zero Rev"*)
board_name="rpi-zero"
;;
- "Raspberry Pi 2 Model B Rev"*)
- board_name="rpi-2-b"
- ;;
- "Raspberry Pi 3 Model B Rev"*)
- board_name="rpi-3-b"
- ;;
*)
board_name="unknown"
;;