2 # Copyright (C) 2011 OpenWrt.org
6 REQUIRE_IMAGE_METADATA
=1
8 RAMFS_COPY_BIN
='fw_printenv fw_setenv'
9 RAMFS_COPY_DATA
='/etc/fw_env.config /var/lock/fw_printenv.lock'
11 platform_check_image
() {
12 local board
=$
(board_name
)
17 ubnt
,routerstation-pro
)
18 platform_check_image_redboot_fis
"$1"
26 platform_do_upgrade
() {
27 local board
=$
(board_name
)
32 platform_do_upgrade_redboot_fis
"$1" vmlinux_2
34 allnet
,all-wap02860ac|\
35 araknis
,an-300-ap-i-n|\
36 araknis
,an-500-ap-i-ac|\
37 araknis
,an-700-ap-i-ac|\
44 engenius
,ens202ext-v1|\
45 engenius
,enstationac-v1|\
50 ENV_SCRIPT
="/tmp/fw_env"
51 IMAGE_LIST
="tar tzf $1"
52 IMAGE_CMD
="tar xzOf $1"
54 ROOTFS_PART
="fwconcat0"
55 KERNEL_FILE
="uImage-lzma.bin"
56 ROOTFS_FILE
="root.squashfs"
57 platform_do_upgrade_failsafe_datachk
"$1"
62 ENV_SCRIPT
="/dev/null"
63 IMAGE_LIST
="tar tzf $1"
64 IMAGE_CMD
="tar xzOf $1"
66 ROOTFS_PART
="fwconcat0"
67 KERNEL_FILE
="uImage-lzma.bin"
68 ROOTFS_FILE
="root.squashfs"
69 platform_do_upgrade_failsafe_datachk
"$1"
72 # Store beginning address of the "firmware" partition
73 # as KernelA address and KernelB address, each to BootupA & BootupB
74 # This is the address from which the bootloader will try to load the kernel.
75 echo -n -e "\x9e\x10\x00\x00\x9e\x10\x00\x00" |
dd of
=$
(find_mtd_part BootupA
) bs
=1 seek
=$
((0x254)) conv
=notrunc
76 echo -n -e "\x9e\x10\x00\x00\x9e\x10\x00\x00" |
dd of
=$
(find_mtd_part BootupB
) bs
=1 seek
=$
((0x254)) conv
=notrunc
77 default_do_upgrade
"$1"
80 platform_do_upgrade_redboot_fis
"$1" linux
100 openmesh
,om5p-ac-v2|\
103 platform_do_upgrade_openmesh
"$1"
108 platform_do_upgrade_dualboot_datachk
"$1"
111 ubnt
,routerstation-pro
)
112 platform_do_upgrade_redboot_fis
"$1" kernel
115 default_do_upgrade
"$1"