brcm2708: order boards and models alphabetically
authorStijn Tintel <stijn@linux-ipv6.be>
Sun, 5 Mar 2017 20:16:06 +0000 (21:16 +0100)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Wed, 8 Mar 2017 08:03:27 +0000 (09:03 +0100)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
target/linux/brcm2708/base-files/etc/board.d/02_network
target/linux/brcm2708/base-files/etc/diag.sh
target/linux/brcm2708/base-files/lib/brcm2708.sh
target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708

index 7642c06c49f5a2b8f5faa6d168c91329c7c01e2b..21e86f4db3697f6b33f41a47b5ea238d60f3e5aa 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 # Copyright (C) 2014-2016 OpenWrt.org
+# Copyright (C) 2017 LEDE project
 
 . /lib/functions/uci-defaults.sh
 . /lib/brcm2708.sh
@@ -11,10 +12,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
index ecc6242d7320004047787b4404ec4395e3cbffc1..010a623d1e4f257d8c795b7569f5bae65f0e28d2 100644 (file)
@@ -1,20 +1,21 @@
 #!/bin/sh
 # Copyright (C) 2015-2016 OpenWrt.org
+# Copyright (C) 2017 LEDE project
 
 . /lib/functions/leds.sh
 . /lib/brcm2708.sh
 
 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
index ab7a23da966631160003308d183c4b80edd0e319..cebec644c00f562d74bc9d02bf00028fd288a056 100644 (file)
@@ -1,5 +1,6 @@
 #!/bin/sh
 # Copyright (C) 2015-2016 OpenWrt.org
+# Copyright (C) 2017 LEDE project
 
 ifname=""
 
@@ -8,25 +9,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"
                ;;
index 578172e1dab4b38a00239cda35107e849c62c8b0..4401c875e4bf1553aaa621b42c5ae51f0f2009c7 100644 (file)
@@ -1,14 +1,15 @@
 #!/bin/sh
 # Copyright (C) 2015-2016 OpenWrt.org
+# Copyright (C) 2017 LEDE project
 
 . /lib/brcm2708.sh
 
 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