2 # Copyright (C) 2012-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_HASH:=0d71e62beb952b41ebafb20a7ee4df2f960db64c31b054721ceb79ff14014c55
16 FIRMWARE_LANTIQ_SOURCE:=$(TOPDIR)/target/linux/lantiq/files/firmware/lantiq
18 include $(INCLUDE_DIR)/u-boot.mk
19 include $(INCLUDE_DIR)/package.mk
26 define U-Boot/arv4519pw_ram
27 NAME:=Arcadyan arv4519pw (RAM)
29 BUILD_DEVICES:=ARV4519PW
30 DDR_SETTINGS:=board/arcadyan/arv4519pw/ddr_settings.h
33 define U-Boot/arv4519pw_nor
34 NAME:=Arcadyan arv4519pw (NOR)
36 BUILD_DEVICES:=ARV4519PW
39 define U-Boot/arv4519pw_brn
40 NAME:=Arcadyan arv4519pw (BRN)
42 BUILD_DEVICES:=ARV4519PW
45 define U-Boot/arv7506pw11_ram
46 NAME:=Arcadyan ARV7506PW11 (RAM)
48 BUILD_DEVICES:=ARV7506PW11
49 DDR_SETTINGS:=board/arcadyan/arv7506pw11/ddr_settings.h
52 define U-Boot/arv7506pw11_nor
53 NAME:=Arcadyan ARV7506PW11 (NOR)
55 BUILD_DEVICES:=ARV7506PW11
58 define U-Boot/arv7506pw11_brn
59 NAME:=Arcadyan ARV7506PW11 (BRN)
61 BUILD_DEVICES:=ARV7506PW11
64 define U-Boot/arv7510pw_ram
65 NAME:=Arcadyan arv7510pw (RAM)
67 BUILD_DEVICES:=ARV4510PW
68 DDR_SETTINGS:=board/arcadyan/arv7510pw/ddr_settings.h
71 define U-Boot/arv7510pw_nor
72 NAME:=Arcadyan arv7510pw (NOR)
74 BUILD_DEVICES:=ARV4510PW
77 define U-Boot/arv7510pw_brn
78 NAME:=Arcadyan arv7510pw (BRN)
80 BUILD_DEVICES:=ARV4510PW
83 define U-Boot/arv7510pw22_ram
84 NAME:=Arcadyan arv7510pw22 (RAM)
86 BUILD_DEVICES:=ARV7510PW22
87 DDR_SETTINGS:=board/arcadyan/arv7510pw22/ddr_settings.h
90 define U-Boot/arv7510pw22_nor
91 NAME:=Arcadyan arv7510pw22 (NOR)
93 BUILD_DEVICES:=ARV7510PW22
96 define U-Boot/arv7510pw22_brn
97 NAME:=Arcadyan arv7510pw22 (BRN)
99 BUILD_DEVICES:=ARV7510PW22
102 define U-Boot/arv7518pw_ram
103 NAME:=Arcadyan arv7518pw (RAM)
104 BUILD_SUBTARGET:=xway
105 BUILD_DEVICES:=ARV7518PW
106 DDR_SETTINGS:=board/arcadyan/arv7518pw/ddr_settings.h
109 define U-Boot/arv7518pw_nor
110 NAME:=Arcadyan arv7518pw (NOR)
111 BUILD_SUBTARGET:=xway
112 BUILD_DEVICES:=ARV7518PW
115 define U-Boot/arv7518pw_brn
116 NAME:=Arcadyan arv7518pw (BRN)
117 BUILD_SUBTARGET:=xway
118 BUILD_DEVICES:=ARV7518PW
121 define U-Boot/arv752dpw_ram
122 NAME:=Arcadyan arv752dpw (RAM)
123 BUILD_SUBTARGET:=xway
124 DDR_SETTINGS:=board/arcadyan/arv752dpw/ddr_settings.h
125 BUILD_DEVICES:=ARV752DPW
128 define U-Boot/arv752dpw_nor
129 NAME:=Arcadyan arv752dpw (NOR)
130 BUILD_SUBTARGET:=xway
131 BUILD_DEVICES:=ARV752DPW
134 define U-Boot/arv752dpw_brn
135 NAME:=Arcadyan arv752dpw (BRN)
136 BUILD_SUBTARGET:=xway
137 BUILD_DEVICES:=ARV752DPW
140 define U-Boot/arv752dpw22_ram
141 NAME:=Arcadyan arv752dpw22 (RAM)
142 BUILD_SUBTARGET:=xway
143 BUILD_DEVICES:=ARV752DPW22
144 DDR_SETTINGS:=board/arcadyan/arv752dpw22/ddr_settings.h
147 define U-Boot/arv752dpw22_nor
148 NAME:=Arcadyan arv752dpw22 (NOR)
149 BUILD_SUBTARGET:=xway
150 BUILD_DEVICES:=ARV752DPW22
153 define U-Boot/arv752dpw22_brn
154 NAME:=Arcadyan arv752dpw22 (BRN)
155 BUILD_SUBTARGET:=xway
156 BUILD_DEVICES:=ARV752DPW22
159 define U-Boot/arv8539pw22_ram
160 NAME:=Speedport W 504V Typ A (RAM)
161 BUILD_SUBTARGET:=xway
162 BUILD_DEVICES:=ARV8539PW22
163 DDR_SETTINGS:=board/arcadyan/arv8539pw22/ddr_settings.h
166 define U-Boot/arv8539pw22_nor
167 NAME:=Speedport W 504V Typ A (NOR)
168 BUILD_SUBTARGET:=xway
169 BUILD_DEVICES:=ARV8539PW22
172 define U-Boot/arv8539pw22_brn
173 NAME:=Speedport W 504V Typ A (BRN)
174 BUILD_SUBTARGET:=xway
175 BUILD_DEVICES:=ARV8539PW22
178 define U-Boot/gigasx76x_ram
179 NAME:=Siemens Gigaset sx76x (RAM)
180 BUILD_SUBTARGET:=xway
181 BUILD_DEVICES:=GIGASX76X
182 DDR_SETTINGS:=board/gigaset/sx76x/ddr_settings.h
185 define U-Boot/gigasx76x_nor
186 NAME:=Siemens Gigaset sx76x (NOR)
187 BUILD_SUBTARGET:=xway
188 BUILD_DEVICES:=GIGASX76X
191 define U-Boot/acmp252_ram
192 NAME:=AudioCodes MP-252 (RAM)
193 BUILD_SUBTARGET:=xway
194 BUILD_DEVICES:=ACMP252
195 DDR_SETTINGS:=board/audiocodes/acmp252/ddr_settings.h
198 define U-Boot/acmp252_nor
199 NAME:=AudioCodes MP-252 (NOR)
200 BUILD_SUBTARGET:=xway
201 BUILD_DEVICES:=ACMP252
204 define U-Boot/bthomehubv5a_ram
205 NAME:=BT Home Hub 5A (RAM)
206 BUILD_SUBTARGET:=xrx200
207 BUILD_DEVICES:=BTHOMEHUBV5A
208 DDR_SETTINGS:=board/bt/bthomehubv5a/ddr_settings.h
211 define U-Boot/easy50712_ram
212 NAME:=Lantiq EASY50712 (RAM)
213 BUILD_SUBTARGET:=xway
214 BUILD_DEVICES:=EASY50712
215 DDR_SETTINGS:=board/lantiq/easy50712/ddr_settings.h
218 define U-Boot/easy50712_nor
219 NAME:=Lantiq EASY50712 (NOR)
220 BUILD_SUBTARGET:=xway
221 BUILD_DEVICES:=EASY50712
224 define U-Boot/easy50712_norspl
225 NAME:=Lantiq EASY50712 (NOR SPL)
226 BUILD_SUBTARGET:=xway
227 BUILD_DEVICES:=EASY50712
228 UBOOT_IMAGE:=u-boot.ltq.lzo.norspl
231 define U-Boot/easy80920_ram
232 NAME:=Lantiq EASY80920 (RAM)
233 BUILD_SUBTARGET:=xrx200
234 BUILD_DEVICES:=EASY80920NOR EASY80920NAND
235 DDR_SETTINGS:=board/lantiq/easy80920/ddr_settings.h
238 define U-Boot/easy80920_nor
239 NAME:=Lantiq EASY80920 (NOR)
240 BUILD_DEVICES:=EASY80920NOR EASY80920NAND
241 BUILD_SUBTARGET:=xrx200
244 define U-Boot/easy80920_norspl
245 NAME:=Lantiq EASY80920 (NOR SPL)
246 BUILD_SUBTARGET:=xrx200
247 BUILD_DEVICES:=EASY80920NOR EASY80920NAND
248 UBOOT_IMAGE:=u-boot.ltq.lzo.norspl
251 define U-Boot/easy80920_sfspl
252 NAME:=Lantiq EASY80920 (SPI SPL)
253 BUILD_SUBTARGET:=xrx200
254 BUILD_DEVICES:=EASY80920NOR EASY80920NAND
255 UBOOT_IMAGE:=u-boot.ltq.lzo.sfspl
258 define U-Boot/fb3370_eva
259 NAME:=AVM FRITZ3370 (EVA)
260 BUILD_SUBTARGET:=xrx200
261 BUILD_DEVICES:=FRITZ3370
264 define U-Boot/fb3370_ram
265 NAME:=AVM FRITZ3370 (RAM)
266 BUILD_SUBTARGET:=xrx200
267 BUILD_DEVICES:=FRITZ3370
268 DDR_SETTINGS:=board/avm/fb3370/ddr_settings.h
271 define U-Boot/fb3370_sfspl
272 NAME:=AVM FRITZ3370 (SPI SPL)
273 BUILD_SUBTARGET:=xrx200
274 BUILD_DEVICES:=FRITZ3370
275 UBOOT_IMAGE:=u-boot.ltq.lzo.sfspl
278 define U-Boot/p2812hnufx_ram
279 NAME:=ZyXEL P-2812HNU-Fx (RAM)
280 BUILD_SUBTARGET:=xrx200
281 BUILD_DEVICES:=P2812HNUF1
282 DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
285 define U-Boot/p2812hnufx_nandspl
286 NAME:=ZyXEL P-2812HNU-Fx (NAND SPL)
287 BUILD_SUBTARGET:=xrx200
288 BUILD_DEVICES:=P2812HNUF1
289 UBOOT_IMAGE:=u-boot.ltq.lzo.nandspl
292 define U-Boot/vgv7510kw22_brn
293 NAME:=Arcadyan VGV7510KW22 (BRN)
294 BUILD_SUBTARGET:=xrx200
295 BUILD_DEVICES:=VGV7510KW22NOR
298 define U-Boot/vgv7510kw22_nor
299 NAME:=Arcadyan VGV7510KW22 (NOR)
300 BUILD_SUBTARGET:=xrx200
301 BUILD_DEVICES:=VGV7510KW22NOR
304 define U-Boot/vgv7510kw22_ram
305 NAME:=Arcadyan VGV7510KW22 (RAM)
306 BUILD_SUBTARGET:=xrx200
307 BUILD_DEVICES:=VGV7510KW22NOR
308 DDR_SETTINGS:=board/arcadyan/vgv7510kw22/ddr_settings.h
311 define U-Boot/vgv7519_brn
312 NAME:=Arcadyan VGV7519 (BRN)
313 BUILD_SUBTARGET:=xrx200
314 BUILD_DEVICES:=VGV7519NOR VGV7519BRN
317 define U-Boot/vgv7519_nor
318 NAME:=Arcadyan VGV7519 (NOR)
319 BUILD_SUBTARGET:=xrx200
320 BUILD_DEVICES:=VGV7519NOR VGV7519BRN
323 define U-Boot/vgv7519_ram
324 NAME:=Arcadyan VGV7519 (RAM)
325 BUILD_SUBTARGET:=xrx200
326 BUILD_DEVICES:=VGV7519NOR VGV7519BRN
327 DDR_SETTINGS:=board/arcadyan/vgv7519/ddr_settings.h
331 arv4519pw_ram arv4519pw_nor arv4519pw_brn \
332 arv7506pw11_ram arv7506pw11_nor arv7506pw11_brn \
333 arv7510pw_ram arv7510pw_nor arv7510pw_brn \
334 arv7510pw22_ram arv7510pw22_nor arv7510pw22_brn \
335 arv7518pw_ram arv7518pw_nor arv7518pw_brn \
336 arv752dpw_ram arv752dpw_nor arv752dpw_brn \
337 arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
338 arv8539pw22_brn arv8539pw22_nor arv8539pw22_ram \
340 gigasx76x_ram gigasx76x_nor \
341 acmp252_ram acmp252_nor \
342 easy50712_ram easy50712_nor easy50712_norspl \
343 easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl \
344 fb3370_eva fb3370_ram fb3370_sfspl \
345 p2812hnufx_ram p2812hnufx_nandspl \
346 vgv7510kw22_brn vgv7510kw22_nor vgv7510kw22_ram \
347 vgv7519_brn vgv7519_nor vgv7519_ram
349 define CompressVR9Firmware
350 $(STAGING_DIR_HOST)/bin/lzma e \
351 $(FIRMWARE_LANTIQ_SOURCE)/vr9_phy$(1)_a$(2)x.bin \
352 $(PKG_BUILD_DIR)/arch/mips/cpu/mips32/vrx200/fw_phy$(1)_a$(2)x.blob
356 $(call Build/Prepare/Default)
357 mkdir -p $(PKG_BUILD_DIR)/arch/mips/cpu/mips32/vrx200/
358 $(call CompressVR9Firmware,11g,1)
359 $(call CompressVR9Firmware,11g,2)
360 $(call CompressVR9Firmware,22f,1)
361 $(call CompressVR9Firmware,22f,2)
364 ifeq ($(SUBTARGET),xway)
370 define Package/u-boot/install/uart
371 awk -f $(PKG_BUILD_DIR)/tools/lantiq_ram_init_uart.awk \
372 -v soc=$(SOC) $(PKG_BUILD_DIR)/$(DDR_SETTINGS) \
373 > $(PKG_BUILD_DIR)/ddr_settings
374 perl $(PKG_BUILD_DIR)/tools/gct.pl \
375 $(PKG_BUILD_DIR)/ddr_settings $(PKG_BUILD_DIR)/u-boot.srec \
379 define Package/u-boot/install
380 $(Package/u-boot/install/$(if $(DDR_SETTINGS),uart,default))
383 $(eval $(call BuildPackage/U-Boot))