[LEDE-DEV] [PATCH 1/2] brcm2708: order boards and models alphabetically

Stijn Tintel stijn at linux-ipv6.be
Sun Mar 5 12:16:06 PST 2017


Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 .../linux/brcm2708/base-files/etc/board.d/02_network |  6 +++---
 target/linux/brcm2708/base-files/etc/diag.sh         |  8 ++++----
 target/linux/brcm2708/base-files/lib/brcm2708.sh     | 20 ++++++++++----------
 .../lib/preinit/05_set_preinit_iface_brcm2708        |  6 +++---
 4 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/target/linux/brcm2708/base-files/etc/board.d/02_network b/target/linux/brcm2708/base-files/etc/board.d/02_network
index 7642c06..e554b73 100755
--- a/target/linux/brcm2708/base-files/etc/board.d/02_network
+++ b/target/linux/brcm2708/base-files/etc/board.d/02_network
@@ -11,10 +11,10 @@ board_config_update
 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
diff --git a/target/linux/brcm2708/base-files/etc/diag.sh b/target/linux/brcm2708/base-files/etc/diag.sh
index ecc6242..0f34a53 100644
--- a/target/linux/brcm2708/base-files/etc/diag.sh
+++ b/target/linux/brcm2708/base-files/etc/diag.sh
@@ -6,15 +6,15 @@
 
 set_state() {
 	case "$(brcm2708_board_name)" in
+	rpi-2-b |\
+	rpi-b-plus)
+		status_led="led1"
+		;;
 	rpi-b |\
 	rpi-cm |\
 	rpi-zero)
 		status_led="led0"
 		;;
-	rpi-b-plus |\
-	rpi-2-b)
-		status_led="led1"
-		;;
 	esac
 
 	case "$1" in
diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh b/target/linux/brcm2708/base-files/lib/brcm2708.sh
index ab7a23d..3e7c30f 100644
--- a/target/linux/brcm2708/base-files/lib/brcm2708.sh
+++ b/target/linux/brcm2708/base-files/lib/brcm2708.sh
@@ -8,25 +8,25 @@ brcm2708_detect() {
 
 	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"
 		;;
diff --git a/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708 b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
index 578172e..c5756be 100644
--- a/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
+++ b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
@@ -5,10 +5,10 @@
 
 set_preinit_iface() {
 	case "$(brcm2708_board_name)" in
-	rpi-b |\
-	rpi-b-plus |\
 	rpi-2-b |\
-	rpi-3-b)
+	rpi-3-b |\
+	rpi-b |\
+	rpi-b-plus)
 		ifname=eth0
 		;;
 	esac
-- 
2.10.2




More information about the Lede-dev mailing list