openwrtv3/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
Sven Eckelmann 86e18f6706 ipq806x: add support for OpenMesh A42
* QCA IPQ401x
* 256 MB of RAM
* 32 MB of SPI NOR flash (s25fl256s1)
  - 2x 15 MB available; but one of the 15 MB regions is the recovery image
* 2T2R 2.4 GHz
  - QCA4019 hw1.0 (SoC)
  - requires special BDF in QCA4019/hw1.0/board-2.bin with
    bus=ahb,bmi-chip-id=0,bmi-board-id=16,variant=OM-A42
* 2T2R 5 GHz
  - QCA4019 hw1.0 (SoC)
  - requires special BDF in QCA4019/hw1.0/board-2.bin with
    bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=OM-A42
* multi-color LED (controlled via red/green/blue GPIOs)
* 1x button (reset; kmod-input-gpio-keys compatible)
* external watchdog
  - triggered GPIO
* 1x USB (xHCI)
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 2x gigabit ethernet
* powered only via POE
  - 802.3af POE on Ethernet 1
  - 18-24v passive POE (mode B) on Ethernet 2

The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the factory image to the u-boot when the device boots up.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2018-01-13 08:00:14 +01:00

57 lines
1,015 B
Bash

PART_NAME=firmware
REQUIRE_IMAGE_METADATA=1
RAMFS_COPY_BIN='fw_printenv fw_setenv'
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
platform_check_image() {
return 0;
}
platform_do_upgrade() {
case "$(board_name)" in
linksys,ea8500)
platform_do_upgrade_linksys "$ARGV"
;;
netgear,d7800 |\
netgear,r7500 |\
netgear,r7500v2 |\
netgear,r7800 |\
qcom,ap-dk04.1-c1 |\
qcom,ipq8064-ap148 |\
zyxel,nbg6817)
nand_do_upgrade "$ARGV"
;;
openmesh,a42)
PART_NAME="inactive"
platform_do_upgrade_openmesh "$ARGV"
;;
tplink,c2600)
PART_NAME="os-image:rootfs"
MTD_CONFIG_ARGS="-s 0x200000"
default_do_upgrade "$ARGV"
;;
tplink,vr2600v)
PART_NAME="kernel:rootfs"
MTD_CONFIG_ARGS="-s 0x200000"
default_do_upgrade "$ARGV"
;;
*)
default_do_upgrade "$ARGV"
;;
esac
}
platform_nand_pre_upgrade() {
case "$(board_name)" in
zyxel,nbg6817)
zyxel_do_upgrade "$1"
;;
esac
}
blink_led() {
. /etc/diag.sh; set_state upgrade
}
append sysupgrade_pre_upgrade blink_led