1 # SPDX-License-Identifier: GPL-2.0-only
3 # Copyright (C) 2009-2013 OpenWrt.org
5 include $(TOPDIR
)/rules.mk
6 include $(INCLUDE_DIR
)/image.mk
8 KERNEL_LOADADDR
:=0x8000
10 # Some info about Ctera firmware:
11 # 1. It's simple tar file (GNU standard), but it must have ".firm" suffix.
12 # 2. It contains two images: kernel and romdisk. Both are required.
13 # 3. Every image has header and trailer file.
14 # 4. The struct of tar firmware is: header kernel trailer header romdisk trailer
15 # 5. In header file are some strings used to describe image. It was decoded from
17 # 6. Version format in header file is restricted by Original FW.
18 # 7. Trailer file contains MD5 sum string of header and image file.
19 # 8. Firmware file must have <=24MB size.
21 define Build
/ctera-firmware
24 # Prepare header and trailer file for kernel
25 echo
"# CTera firmware information file" > $@.tmp
/header
26 echo
"image_type=kernel" >> $@.tmp
/header
27 echo
"arch=Kirkwood" >> $@.tmp
/header
28 echo
"board=Any" >> $@.tmp
/header
29 echo
"version=3.1.22.30669" >> $@.tmp
/header
30 echo
"kernel_cmd=console=ttyS0,115200 earlyprintk" >> $@.tmp
/header
31 echo
"date=$$(date $(if $(SOURCE_DATE_EPOCH),-d@$(SOURCE_DATE_EPOCH)))" \
36 echo
"MD5=$$(cat $@.tmp/header $@.tmp/kernel | $(MKHASH) md5)" \
39 tar $(if
$(SOURCE_DATE_EPOCH
),--mtime
="@$(SOURCE_DATE_EPOCH)") \
40 -H gnu
-C
$@.tmp
-cf
$@.
tar header kernel trailer
42 # Prepare header and trailer file for fake romdisk
43 echo
"# CTera firmware information file" > $@.tmp
/header
44 echo
"image_type=romdisk" >> $@.tmp
/header
45 echo
"initrd=yes" >> $@.tmp
/header
46 echo
"arch=Kirkwood" >> $@.tmp
/header
47 echo
"board=Any" >> $@.tmp
/header
48 echo
"version=3.1.22.30669" >> $@.tmp
/header
49 echo
"date=$$(date $(if $(SOURCE_DATE_EPOCH),-d@$(SOURCE_DATE_EPOCH)))" \
54 $(call Build
/append-uImage-fakehdr
, ramdisk
)
57 echo
"MD5=$$(cat $@.tmp/header $@.tmp/romdisk | $(MKHASH) md5)" \
60 tar $(if
$(SOURCE_DATE_EPOCH
),--mtime
="@$(SOURCE_DATE_EPOCH)") \
61 -H gnu
-C
$@.tmp
-rf
$@.
tar header romdisk trailer
67 define Device
/kernel-size-migration
68 DEVICE_COMPAT_VERSION
:= 2.0
69 DEVICE_COMPAT_MESSAGE
:= Partition design has changed compared to \
70 older versions
(up to
21.02) due to kernel size restrictions. \
71 Upgrade via sysupgrade mechanism is not possible
, so new \
72 installation via factory style image is required.
77 DEVICE_DTS
= kirkwood-
$(lastword
$(subst _
, ,$(1)))
78 KERNEL_DEPENDS
= $$(wildcard $(DTS_DIR
)/$$(DEVICE_DTS
).dts
)
79 KERNEL
:= kernel-bin | append-dtb | uImage none
81 KERNEL_SUFFIX
:= -uImage
87 IMAGES
:= sysupgrade.bin factory.bin
88 IMAGE
/sysupgrade.bin
:= sysupgrade-tar | append-metadata
89 IMAGE
/factory.bin
:= append-ubi
92 define Device
/checkpoint_l-50
93 DEVICE_VENDOR
:= Check Point
95 DEVICE_PACKAGES
:= kmod-ath9k kmod-gpio-button-hotplug kmod-mvsdio \
96 kmod-rtc-s35390a kmod-usb-ledtrig-usbport wpad-basic-wolfssl
97 IMAGES
:= sysupgrade.bin
99 TARGET_DEVICES
+= checkpoint_l-50
101 define Device
/cisco_on100
102 DEVICE_VENDOR
:= Cisco Systems
103 DEVICE_MODEL
:= ON100
107 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-ubi
108 DEVICE_PACKAGES
:= kmod-mvsdio
109 SUPPORTED_DEVICES
+= on100
111 TARGET_DEVICES
+= cisco_on100
113 define Device
/cloudengines_pogoe02
114 DEVICE_VENDOR
:= Cloud Engines
115 DEVICE_MODEL
:= Pogoplug E02
116 DEVICE_DTS
:= kirkwood-pogo_e02
117 SUPPORTED_DEVICES
+= pogo_e02
119 TARGET_DEVICES
+= cloudengines_pogoe02
121 define Device
/cloudengines_pogoplugv4
122 DEVICE_VENDOR
:= Cloud Engines
123 DEVICE_MODEL
:= Pogoplug V4
124 DEVICE_DTS
:= kirkwood-pogoplug-series-4
125 DEVICE_PACKAGES
:= kmod-ata-marvell-sata kmod-fs-ext4 kmod-mvsdio kmod-usb3 \
126 kmod-gpio-button-hotplug
128 TARGET_DEVICES
+= cloudengines_pogoplugv4
130 define Device
/ctera_c200-v1
131 DEVICE_VENDOR
:= Ctera
134 DEVICE_PACKAGES
:= kmod-ata-marvell-sata kmod-gpio-button-hotplug \
135 kmod-hwmon-lm63 kmod-rtc-s35390a kmod-usb-ledtrig-usbport
136 KERNEL
:= kernel-bin | append-dtb | uImage none | ctera-firmware
138 KERNEL_SUFFIX
:= -factory.firm
139 IMAGES
:= sysupgrade.bin
141 TARGET_DEVICES
+= ctera_c200-v1
143 define Device
/globalscale_sheevaplug
144 DEVICE_VENDOR
:= Globalscale
145 DEVICE_MODEL
:= Sheevaplug
146 DEVICE_PACKAGES
:= kmod-mvsdio
148 TARGET_DEVICES
+= globalscale_sheevaplug
150 define Device
/iom_iconnect-1.1
151 DEVICE_VENDOR
:= Iomega
152 DEVICE_MODEL
:= Iconnect
153 DEVICE_DTS
:= kirkwood-iconnect
154 SUPPORTED_DEVICES
+= iconnect
156 TARGET_DEVICES
+= iom_iconnect-1.1
158 define Device
/iom_ix2-200
159 DEVICE_VENDOR
:= Iomega
160 DEVICE_MODEL
:= StorCenter ix2-200
161 DEVICE_DTS
:= kirkwood-iomega_ix2_200
162 DEVICE_PACKAGES
:= kmod-ata-marvell-sata kmod-fs-ext4 \
163 kmod-gpio-button-hotplug kmod-hwmon-lm63
171 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-ubi | \
174 TARGET_DEVICES
+= iom_ix2-200
176 define Device
/linksys
177 DEVICE_VENDOR
:= Linksys
178 DEVICE_PACKAGES
:= kmod-mwl8k wpad-basic-wolfssl kmod-gpio-button-hotplug
181 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-ubi
184 define Device
/linksys_e4200-v2
186 $(Device
/kernel-size-migration
)
187 DEVICE_MODEL
:= E4200
190 SUPPORTED_DEVICES
+= linksys
,viper linksys-viper
192 TARGET_DEVICES
+= linksys_e4200-v2
194 define Device
/linksys_ea3500
196 $(Device
/kernel-size-migration
)
197 DEVICE_MODEL
:= EA3500
202 SUPPORTED_DEVICES
+= linksys
,audi linksys-audi
204 TARGET_DEVICES
+= linksys_ea3500
206 define Device
/linksys_ea4500
208 $(Device
/kernel-size-migration
)
209 DEVICE_MODEL
:= EA4500
211 SUPPORTED_DEVICES
+= linksys
,viper linksys-viper
213 TARGET_DEVICES
+= linksys_ea4500
215 define Device
/raidsonic_ib-nas62x0
216 DEVICE_VENDOR
:= RaidSonic
217 DEVICE_MODEL
:= ICY BOX IB-NAS62x0
218 DEVICE_DTS
:= kirkwood-ib62x0
219 DEVICE_PACKAGES
:= kmod-ata-marvell-sata kmod-fs-ext4
220 SUPPORTED_DEVICES
+= ib62x0
222 TARGET_DEVICES
+= raidsonic_ib-nas62x0
224 define Device
/seagate_blackarmor-nas220
225 DEVICE_VENDOR
:= Seagate
226 DEVICE_MODEL
:= Blackarmor NAS220
227 DEVICE_PACKAGES
:= kmod-hwmon-adt7475 kmod-fs-ext4 kmod-ata-marvell-sata \
228 mdadm kmod-gpio-button-hotplug
234 TARGET_DEVICES
+= seagate_blackarmor-nas220
236 define Device
/seagate_dockstar
237 DEVICE_VENDOR
:= Seagate
238 DEVICE_MODEL
:= FreeAgent Dockstar
239 SUPPORTED_DEVICES
+= dockstar
241 TARGET_DEVICES
+= seagate_dockstar
243 define Device
/seagate_goflexnet
244 DEVICE_VENDOR
:= Seagate
245 DEVICE_MODEL
:= GoFlexNet
246 DEVICE_PACKAGES
:= kmod-ata-marvell-sata kmod-fs-ext4
247 SUPPORTED_DEVICES
+= goflexnet
249 TARGET_DEVICES
+= seagate_goflexnet
251 define Device
/seagate_goflexhome
252 DEVICE_VENDOR
:= Seagate
253 DEVICE_MODEL
:= GoFlexHome
254 DEVICE_PACKAGES
:= kmod-ata-marvell-sata kmod-fs-ext4
255 SUPPORTED_DEVICES
+= goflexhome
257 TARGET_DEVICES
+= seagate_goflexhome
259 define Device
/zyxel_nsa310b
260 DEVICE_VENDOR
:= ZyXEL
261 DEVICE_MODEL
:= NSA310b
262 DEVICE_PACKAGES
:= kmod-ata-marvell-sata kmod-r8169 kmod-fs-ext4 \
263 kmod-gpio-button-hotplug kmod-hwmon-lm85
264 SUPPORTED_DEVICES
+= nsa310b
266 TARGET_DEVICES
+= zyxel_nsa310b
268 define Device
/zyxel_nsa310s
269 DEVICE_VENDOR
:= ZyXEL
270 DEVICE_MODEL
:= NSA310S
271 DEVICE_PACKAGES
:= kmod-ata-marvell-sata kmod-fs-ext4 kmod-gpio-button-hotplug
273 TARGET_DEVICES
+= zyxel_nsa310s
275 define Device
/zyxel_nsa325
276 DEVICE_VENDOR
:= ZyXEL
277 DEVICE_MODEL
:= NSA325
278 DEVICE_VARIANT
:= v1
/v2
279 DEVICE_PACKAGES
:= kmod-ata-marvell-sata kmod-fs-ext4 \
280 kmod-gpio-button-hotplug kmod-rtc-pcf8563 kmod-usb3
281 SUPPORTED_DEVICES
+= nsa325
283 TARGET_DEVICES
+= zyxel_nsa325
285 $(eval
$(call BuildImage
))