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|\
43 engenius
,ens202ext-v1|\
44 engenius
,enstationac-v1|\
49 ENV_SCRIPT
="/tmp/fw_env"
50 IMAGE_LIST
="tar tzf $1"
51 IMAGE_CMD
="tar xzOf $1"
53 ROOTFS_PART
="fwconcat0"
54 KERNEL_FILE
="uImage-lzma.bin"
55 ROOTFS_FILE
="root.squashfs"
56 platform_do_upgrade_failsafe_datachk
"$1"
61 ENV_SCRIPT
="/dev/null"
62 IMAGE_LIST
="tar tzf $1"
63 IMAGE_CMD
="tar xzOf $1"
65 ROOTFS_PART
="fwconcat0"
66 KERNEL_FILE
="uImage-lzma.bin"
67 ROOTFS_FILE
="root.squashfs"
68 platform_do_upgrade_failsafe_datachk
"$1"
71 # Store beginning address of the "firmware" partition
72 # as KernelA address and KernelB address, each to BootupA & BootupB
73 # This is the address from which the bootloader will try to load the kernel.
74 echo -n -e "\x9e\x10\x00\x00\x9e\x10\x00\x00" |
dd of
=$
(find_mtd_part BootupA
) bs
=1 seek
=$
((0x254)) conv
=notrunc
75 echo -n -e "\x9e\x10\x00\x00\x9e\x10\x00\x00" |
dd of
=$
(find_mtd_part BootupB
) bs
=1 seek
=$
((0x254)) conv
=notrunc
76 default_do_upgrade
"$1"
79 platform_do_upgrade_redboot_fis
"$1" linux
102 platform_do_upgrade_openmesh
"$1"
107 platform_do_upgrade_dualboot_datachk
"$1"
110 ubnt
,routerstation-pro
)
111 platform_do_upgrade_redboot_fis
"$1" kernel
114 default_do_upgrade
"$1"