octeon: add new target and support for Ubiquiti EdgeRouter 6P
[openwrt/openwrt.git] / target / linux / octeon / base-files / lib / upgrade / platform.sh
index ad5baef4a19fd95a747f5739abdf93c6d4bd1681..255699bb31978725f1d213907b68bb535dee1ba6 100755 (executable)
@@ -29,7 +29,8 @@ platform_copy_config() {
                cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE"
                umount /mnt
                ;;
-       ubnt,edgerouter-4)
+       ubnt,edgerouter-4 | \
+       ubnt,edgerouter-6p)
                mount -t vfat /dev/mmcblk0p1 /mnt
                cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE"
                umount /mnt
@@ -84,7 +85,8 @@ platform_do_upgrade() {
        [ -b "${rootfs}" ] || return 1
        case "$board" in
        er | \
-       ubnt,edgerouter-4)
+       ubnt,edgerouter-4 | \
+       ubnt,edgerouter-6p)
                kernel=mmcblk0p1
                ;;
        erlite)
@@ -114,7 +116,8 @@ platform_check_image() {
        er | \
        erlite | \
        itus,shield-router | \
-       ubnt,edgerouter-4)
+       ubnt,edgerouter-4 | \
+       ubnt,edgerouter-6p)
                local kernel_length=$(tar xf $tar_file $board_dir/kernel -O | wc -c 2> /dev/null)
                local rootfs_length=$(tar xf $tar_file $board_dir/root -O | wc -c 2> /dev/null)
                [ "$kernel_length" = 0 -o "$rootfs_length" = 0 ] && {