mvebu: add sysupgrade support for clearfog
[openwrt/openwrt.git] / target / linux / mvebu / base-files / lib / upgrade / platform.sh
index 55807f5..5652e98 100755 (executable)
@@ -13,13 +13,17 @@ platform_check_image() {
        [ "$#" -gt 1 ] && return 1
 
        case "$board" in
        [ "$#" -gt 1 ] && return 1
 
        case "$board" in
-       armada-xp-linksys-mamba )
+       armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-xp-linksys-mamba)
                [ "$magic_long" != "27051956" -a "$magic_long" != "73797375" ] && {
                        echo "Invalid image type."
                        return 1
                }
                return 0;
                ;;
                [ "$magic_long" != "27051956" -a "$magic_long" != "73797375" ] && {
                        echo "Invalid image type."
                        return 1
                }
                return 0;
                ;;
+       armada-388-clearfog)
+               platform_check_image_clearfog "$ARGV"
+               return $?
+               ;;
        esac
 
        echo "Sysupgrade is not yet supported on $board."
        esac
 
        echo "Sysupgrade is not yet supported on $board."
@@ -30,14 +34,26 @@ platform_do_upgrade() {
        local board=$(mvebu_board_name)
 
        case "$board" in
        local board=$(mvebu_board_name)
 
        case "$board" in
-       armada-xp-linksys-mamba)
+       armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-xp-linksys-mamba)
                platform_do_upgrade_linksys "$ARGV"
                ;;
                platform_do_upgrade_linksys "$ARGV"
                ;;
+       armada-388-clearfog)
+               platform_do_upgrade_clearfog "$ARGV"
+               ;;
        *)
                default_do_upgrade "$ARGV"
                ;;
        esac
 }
        *)
                default_do_upgrade "$ARGV"
                ;;
        esac
 }
+platform_copy_config() {
+       local board=$(mvebu_board_name)
+
+       case "$board" in
+       armada-388-clearfog)
+               platform_copy_config_clearfog "$ARGV"
+               ;;
+       esac
+}
 
 disable_watchdog() {
        killall watchdog
 
 disable_watchdog() {
        killall watchdog