octeon: Evaluate board names in alphabetical order
authorJonathan Thibault <jonathan@navigue.com>
Tue, 4 Dec 2018 19:59:31 +0000 (14:59 -0500)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:48:23 +0000 (17:48 +0100)
Signed-off-by: Jonathan Thibault <jonathan@navigue.com>
(backported from e93e2b631884e233a0c00b6348e67115aa6f7f9d)

target/linux/octeon/base-files/lib/upgrade/platform.sh

index cd49c0da36ea62443d1367a403655ae1b08929dc..6d258dbb0fd06f756c37967b9c201e6d1da5c793 100755 (executable)
@@ -62,12 +62,12 @@ platform_do_upgrade() {
 
        [ -b "${rootfs}" ] || return 1
        case "$board" in
-       erlite)
-               kernel=sda1
-               ;;
        er)
                kernel=mmcblk0p1
                ;;
+       erlite)
+               kernel=sda1
+               ;;
        *)
                return 1
        esac
@@ -82,8 +82,8 @@ platform_check_image() {
        local board=$(board_name)
 
        case "$board" in
-       erlite | \
-       er)
+       er | \
+       erlite)
                local tar_file="$1"
                local kernel_length=`(tar xf $tar_file sysupgrade-$board/kernel -O | wc -c) 2> /dev/null`
                local rootfs_length=`(tar xf $tar_file sysupgrade-$board/root -O | wc -c) 2> /dev/null`