return 0
}
+platform_do_upgrade_compex() {
+ local fw_file=$1
+ local fw_part=$PART_NAME
+ local fw_mtd=$(find_mtd_part $fw_part)
+ local fw_length=0x$(dd if="$fw_file" bs=2 skip=1 count=4 2>/dev/null)
+ local fw_blocks=$(($fw_length / 65536))
+
+ if [ -n "$fw_mtd" ] && [ ${fw_blocks:-0} -gt 0 ]; then
+ local append=""
+ [ -f "$CONF_TAR" -a "$SAVE_CONFIG" -eq 1 ] && append="-j $CONF_TAR"
+
+ sync
+ dd if="$fw_file" bs=64k skip=1 count=$fw_blocks 2>/dev/null | \
+ mtd $append write - "$fw_part"
+ fi
+}
+
platform_check_image() {
local board=$(ar71xx_board_name)
local magic="$(get_magic_word "$1")"
eap7660d | \
ja76pf | \
ja76pf2 | \
- jwap003)
+ jwap003 | \
+ wp543 | \
+ wpe72)
[ "$magic" != "4349" ] && {
echo "Invalid image. Use *-sysupgrade.bin files on this board"
return 1
jwap003)
platform_do_upgrade_combined "$ARGV"
;;
+ wp543|\
+ wpe72)
+ platform_do_upgrade_compex "$ARGV"
+ ;;
all0258n )
platform_do_upgrade_allnet "0x9f050000" "$ARGV"
;;