1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
#
# Copyright (C) 2014-2016 OpenWrt.org
# Copyright (C) 2016 LEDE-Project.org
#
RAMFS_COPY_BIN='fw_printenv fw_setenv strings'
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
PART_NAME=firmware
REQUIRE_IMAGE_METADATA=1
platform_check_image() {
case "$(board_name)" in
cznic,turris-omnia|\
kobol,helios4|\
solidrun,clearfog-base-a1|\
solidrun,clearfog-pro-a1)
legacy_sdcard_check_image "$1"
;;
*)
return 0
;;
esac
}
platform_do_upgrade() {
case "$(board_name)" in
buffalo,ls220de)
# Kernel UBI volume name must be "boot"
CI_KERNPART=boot
CI_KERN_UBIPART=ubi_kernel
CI_ROOT_UBIPART=ubi
nand_do_upgrade "$1"
;;
buffalo,ls421de)
nand_do_upgrade "$1"
;;
ctera,c200-v2)
part=$(find_mtd_part "active_bank")
if [ -n "$part" ]; then
CI_KERNPART="$(strings $part | grep bank)"
nand_do_upgrade "$1"
else
echo "active_bank partition missed!"
return 1
fi
;;
cznic,turris-omnia|\
kobol,helios4|\
solidrun,clearfog-base-a1|\
solidrun,clearfog-pro-a1)
legacy_sdcard_do_upgrade "$1"
;;
linksys,wrt1200ac|\
linksys,wrt1900ac-v1|\
linksys,wrt1900ac-v2|\
linksys,wrt1900acs|\
linksys,wrt3200acm|\
linksys,wrt32x)
platform_do_upgrade_linksys "$1"
;;
*)
default_do_upgrade "$1"
;;
esac
}
platform_copy_config() {
case "$(board_name)" in
cznic,turris-omnia|\
kobol,helios4|\
solidrun,clearfog-base-a1|\
solidrun,clearfog-pro-a1)
legacy_sdcard_copy_config
;;
linksys,wrt1200ac|\
linksys,wrt1900ac-v1|\
linksys,wrt1900ac-v2|\
linksys,wrt1900acs|\
linksys,wrt3200acm|\
linksys,wrt32x)
platform_copy_config_linksys
;;
esac
}
|