ipq806x: upgrade: fix RAMFS_COPY_*
[openwrt/openwrt.git] / target / linux / ipq806x / base-files / lib / upgrade / platform.sh
index c3741f9ff242cddb3c185c2f638c7b4dff781e1b..141058f7bae2775397c9fdf8224f8f9d035795fb 100644 (file)
@@ -3,32 +3,26 @@
 PART_NAME=firmware
 REQUIRE_IMAGE_METADATA=1
 
+RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv'
+RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
+
 platform_check_image() {
        return 0;
 }
 
-platform_pre_upgrade() {
+platform_do_upgrade() {
        local board=$(ipq806x_board_name)
 
        case "$board" in
        ap148 |\
+       ap-dk04.1-c1 |\
        d7800 |\
        nbg6817 |\
        r7500 |\
        r7500v2 |\
        r7800)
-               nand_do_upgrade "$1"
-               ;;
-       ea8500)
-               linksys_preupgrade "$1"
+               nand_do_upgrade "$ARGV"
                ;;
-       esac
-}
-
-platform_do_upgrade() {
-       local board=$(ipq806x_board_name)
-
-       case "$board" in
        c2600)
                PART_NAME="os-image:rootfs"
                MTD_CONFIG_ARGS="-s 0x200000"
@@ -42,6 +36,9 @@ platform_do_upgrade() {
                MTD_CONFIG_ARGS="-s 0x200000"
                default_do_upgrade "$ARGV"
                ;;
+       *)
+               default_do_upgrade "$ARGV"
+               ;;
        esac
 }