2 REQUIRE_IMAGE_METADATA
=1
4 RAMFS_COPY_BIN
='fw_printenv fw_setenv'
5 RAMFS_COPY_DATA
='/etc/fw_env.config /var/lock/fw_printenv.lock'
7 platform_check_image
() {
8 case "$(board_name)" in
11 local ubidev
=$
(nand_find_ubi
$CI_UBIPART)
12 local asus_root
=$
(nand_find_volume
$ubidev jffs2
)
14 [ -n "$asus_root" ] ||
return 0
17 jffs2 partition is still present.
18 There's probably no space left
19 to install the filesystem.
21 You need to delete the jffs2 partition first:
22 # ubirmvol /dev/ubi0 --name=jffs2
24 Once this is done. Retry.
35 local board_dir
=$
(tar tf
$tar_file |
grep -m 1 '^sysupgrade-.*/$')
36 board_dir
=${board_dir%/}
38 tar Oxf
$tar_file ${board_dir}/kernel | mtd
write - kernel
40 if [ "$SAVE_CONFIG" -eq 1 ]; then
41 tar Oxf
$tar_file ${board_dir}/root | mtd
-j "$CONF_TAR" write - rootfs
43 tar Oxf
$tar_file ${board_dir}/root | mtd
write - rootfs
47 platform_do_upgrade
() {
48 case "$(board_name)" in
50 alfa-network
,ap120c-ac |\
52 nand_do_upgrade
"$ARGV"
64 platform_do_upgrade_linksys
"$ARGV"
69 platform_do_upgrade_openmesh
"$ARGV"
72 CI_KERNPART
="part.safe"
79 default_do_upgrade
"$ARGV"
84 platform_nand_pre_upgrade
() {
85 case "$(board_name)" in
86 alfa-network
,ap120c-ac
)
87 part
="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')"
88 if [ "$part" = "rootfs1" ]; then
89 fw_setenv active
2 ||
exit 1
92 fw_setenv active
1 ||
exit 1
101 CI_KERNPART
="part.safe"