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_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 http
://mirror2.openwrt.org
/sources \
18 ftp
://ftp.denx.de
/pub
/u-boot
19 PKG_HASH
:=0d71e62beb952b41ebafb20a7ee4df2f960db64c31b054721ceb79ff14014c55
22 PKG_LICENSE
:=GPL-2.0 GPL-2.0
+
23 PKG_LICENSE_FILES
:=Licenses
/README
27 FIRMWARE_LANTIQ_SOURCE
:=$(TOPDIR
)/target
/linux
/lantiq
/files
/firmware
/lantiq
29 include $(INCLUDE_DIR
)/package.mk
39 define uboot
/arv4519pw_ram
40 TITLE
:=U-Boot for Arcadyan arv4519pw
(RAM
)
42 DDR_SETTINGS
:=board
/arcadyan
/arv4519pw
/ddr_settings.h
43 DEPS
:=@TARGET_lantiq_xway
46 define uboot
/arv4519pw_nor
47 TITLE
:=U-Boot for Arcadyan arv4519pw
(NOR
)
49 DEPS
:=@TARGET_lantiq_xway
52 define uboot
/arv4519pw_brn
53 TITLE
:=U-Boot for Arcadyan arv4519pw
(BRN
)
55 DEPS
:=@TARGET_lantiq_xway
58 define uboot
/arv7506pw11_ram
59 TITLE
:=U-Boot for Arcadyan ARV7506PW11
(RAM
)
61 DDR_SETTINGS
:=board
/arcadyan
/arv7506pw11
/ddr_settings.h
62 DEPS
:=@TARGET_lantiq_xway
65 define uboot
/arv7506pw11_nor
66 TITLE
:=U-Boot for Arcadyan ARV7506PW11
(NOR
)
68 DEPS
:=@TARGET_lantiq_xway
71 define uboot
/arv7506pw11_brn
72 TITLE
:=U-Boot for Arcadyan ARV7506PW11
(BRN
)
74 DEPS
:=@TARGET_lantiq_xway
77 define uboot
/arv7510pw_ram
78 TITLE
:=U-Boot for Arcadyan arv7510pw
(RAM
)
80 DDR_SETTINGS
:=board
/arcadyan
/arv7510pw
/ddr_settings.h
81 DEPS
:=@TARGET_lantiq_xway
84 define uboot
/arv7510pw_nor
85 TITLE
:=U-Boot for Arcadyan arv7510pw
(NOR
)
87 DEPS
:=@TARGET_lantiq_xway
90 define uboot
/arv7510pw_brn
91 TITLE
:=U-Boot for Arcadyan arv7510pw
(BRN
)
93 DEPS
:=@TARGET_lantiq_xway
96 define uboot
/arv7510pw22_ram
97 TITLE
:=U-Boot for Arcadyan arv7510pw22
(RAM
)
99 DDR_SETTINGS
:=board
/arcadyan
/arv7510pw22
/ddr_settings.h
100 DEPS
:=@TARGET_lantiq_xway
103 define uboot
/arv7510pw22_nor
104 TITLE
:=U-Boot for Arcadyan arv7510pw22
(NOR
)
106 DEPS
:=@TARGET_lantiq_xway
109 define uboot
/arv7510pw22_brn
110 TITLE
:=U-Boot for Arcadyan arv7510pw22
(BRN
)
112 DEPS
:=@TARGET_lantiq_xway
115 define uboot
/arv7518pw_ram
116 TITLE
:=U-Boot for Arcadyan arv7518pw
(RAM
)
118 DDR_SETTINGS
:=board
/arcadyan
/arv7518pw
/ddr_settings.h
119 DEPS
:=@TARGET_lantiq_xway
122 define uboot
/arv7518pw_nor
123 TITLE
:=U-Boot for Arcadyan arv7518pw
(NOR
)
125 DEPS
:=@TARGET_lantiq_xway
128 define uboot
/arv7518pw_brn
129 TITLE
:=U-Boot for Arcadyan arv7518pw
(BRN
)
131 DEPS
:=@TARGET_lantiq_xway
134 define uboot
/arv752dpw_ram
135 TITLE
:=U-Boot for Arcadyan arv752dpw
(RAM
)
137 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw
/ddr_settings.h
138 DEPS
:=@TARGET_lantiq_xway
141 define uboot
/arv752dpw_nor
142 TITLE
:=U-Boot for Arcadyan arv752dpw
(NOR
)
144 DEPS
:=@TARGET_lantiq_xway
147 define uboot
/arv752dpw_brn
148 TITLE
:=U-Boot for Arcadyan arv752dpw
(BRN
)
150 DEPS
:=@TARGET_lantiq_xway
153 define uboot
/arv752dpw22_ram
154 TITLE
:=U-Boot for Arcadyan arv752dpw22
(RAM
)
156 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw22
/ddr_settings.h
157 DEPS
:=@TARGET_lantiq_xway
160 define uboot
/arv752dpw22_nor
161 TITLE
:=U-Boot for Arcadyan arv752dpw22
(NOR
)
163 DEPS
:=@TARGET_lantiq_xway
166 define uboot
/arv752dpw22_brn
167 TITLE
:=U-Boot for Arcadyan arv752dpw22
(BRN
)
169 DEPS
:=@TARGET_lantiq_xway
172 define uboot
/arv8539pw22_ram
173 TITLE
:=U-Boot for Speedport W
504V Typ A
(RAM
)
175 DDR_SETTINGS
:=board
/arcadyan
/arv8539pw22
/ddr_settings.h
176 DEPS
:=@TARGET_lantiq_xway
179 define uboot
/arv8539pw22_nor
180 TITLE
:=U-Boot for Speedport W
504V Typ A
(NOR
)
182 DEPS
:=@TARGET_lantiq_xway
185 define uboot
/arv8539pw22_brn
186 TITLE
:=U-Boot for Speedport W
504V Typ A
(BRN
)
188 DEPS
:=@TARGET_lantiq_xway
191 define uboot
/gigasx76x_ram
192 TITLE
:=U-Boot for Siemens Gigaset sx76x
(RAM
)
194 DDR_SETTINGS
:=board
/gigaset
/sx76x
/ddr_settings.h
195 DEPS
:=@TARGET_lantiq_xway
198 define uboot
/gigasx76x_nor
199 TITLE
:=U-Boot for Siemens Gigaset sx76x
(NOR
)
201 DEPS
:=@TARGET_lantiq_xway
204 define uboot
/acmp252_ram
205 TITLE
:=U-Boot for AudioCodes MP-252
(RAM
)
207 DDR_SETTINGS
:=board
/audiocodes
/acmp252
/ddr_settings.h
208 DEPS
:=@TARGET_lantiq_xway
211 define uboot
/acmp252_nor
212 TITLE
:=U-Boot for AudioCodes MP-252
(NOR
)
214 DEPS
:=@TARGET_lantiq_xway
217 define uboot
/bthomehubv5a_ram
218 TITLE
:=U-Boot for BT Home Hub
5A
(RAM
)
220 DDR_SETTINGS
:=board
/bt
/bthomehubv5a
/ddr_settings.h
221 DEPS
:=@TARGET_lantiq_xrx200
224 define uboot
/easy50712_ram
225 TITLE
:=U-Boot for Lantiq EASY50712
(RAM
)
227 DDR_SETTINGS
:=board
/lantiq
/easy50712
/ddr_settings.h
228 DEPS
:=@TARGET_lantiq_xway
231 define uboot
/easy50712_nor
232 TITLE
:=U-Boot for Lantiq EASY50712
(NOR
)
234 DEPS
:=@TARGET_lantiq_xway
237 define uboot
/easy50712_norspl
238 TITLE
:=U-Boot for Lantiq EASY50712
(NOR SPL
)
240 IMAGE
:=u-boot.ltq.lzo.norspl
241 DEPS
:=@TARGET_lantiq_xway
244 define uboot
/easy80920_ram
245 TITLE
:=U-Boot for Lantiq EASY80920
(RAM
)
247 DDR_SETTINGS
:=board
/lantiq
/easy80920
/ddr_settings.h
248 DEPS
:=@TARGET_lantiq_xrx200
251 define uboot
/easy80920_nor
252 TITLE
:=U-Boot for Lantiq EASY80920
(NOR
)
254 DEPS
:=@TARGET_lantiq_xrx200
257 define uboot
/easy80920_norspl
258 TITLE
:=U-Boot for Lantiq EASY80920
(NOR SPL
)
260 IMAGE
:=u-boot.ltq.lzo.norspl
261 DEPS
:=@TARGET_lantiq_xrx200
264 define uboot
/easy80920_sfspl
265 TITLE
:=U-Boot for Lantiq EASY80920
(SPI SPL
)
267 IMAGE
:=u-boot.ltq.lzo.sfspl
268 DEPS
:=@TARGET_lantiq_xrx200
271 define uboot
/fb3370_eva
272 TITLE
:=U-Boot for AVM FRITZ3370
(EVA
)
274 DEPS
:=@TARGET_lantiq_xrx200
277 define uboot
/fb3370_ram
278 TITLE
:=U-Boot for AVM FRITZ3370
(RAM
)
280 DDR_SETTINGS
:=board
/avm
/fb3370
/ddr_settings.h
281 DEPS
:=@TARGET_lantiq_xrx200
284 define uboot
/fb3370_sfspl
285 TITLE
:=U-Boot for AVM FRITZ3370
(SPI SPL
)
287 IMAGE
:=u-boot.ltq.lzo.sfspl
288 DEPS
:=@TARGET_lantiq_xrx200
291 define uboot
/p2812hnufx_ram
292 TITLE
:=U-Boot for ZyXEL P-2812HNU-Fx
(RAM
)
294 DDR_SETTINGS
:=board
/zyxel
/p2812hnufx
/ddr_settings.h
295 DEPS
:=@TARGET_lantiq_xrx200
298 define uboot
/p2812hnufx_nandspl
299 TITLE
:=U-Boot for ZyXEL P-2812HNU-Fx
(NAND SPL
)
301 IMAGE
:=u-boot.ltq.lzo.nandspl
302 DEPS
:=@TARGET_lantiq_xrx200
305 define uboot
/vgv7510kw22_brn
306 TITLE
:=U-Boot for Arcadyan VGV7510KW22
(BRN
)
308 DEPS
:=@TARGET_lantiq_xrx200
311 define uboot
/vgv7510kw22_nor
312 TITLE
:=U-Boot for Arcadyan VGV7510KW22
(NOR
)
314 DEPS
:=@TARGET_lantiq_xrx200
317 define uboot
/vgv7510kw22_ram
318 TITLE
:=U-Boot for Arcadyan VGV7510KW22
(RAM
)
320 DDR_SETTINGS
:=board
/arcadyan
/vgv7510kw22
/ddr_settings.h
321 DEPS
:=@TARGET_lantiq_xrx200
324 define uboot
/vgv7519_brn
325 TITLE
:=U-Boot for Arcadyan VGV7519
(BRN
)
327 DEPS
:=@TARGET_lantiq_xrx200
330 define uboot
/vgv7519_nor
331 TITLE
:=U-Boot for Arcadyan VGV7519
(NOR
)
333 DEPS
:=@TARGET_lantiq_xrx200
336 define uboot
/vgv7519_ram
337 TITLE
:=U-Boot for Arcadyan VGV7519
(RAM
)
339 DDR_SETTINGS
:=board
/arcadyan
/vgv7519
/ddr_settings.h
340 DEPS
:=@TARGET_lantiq_xrx200
344 arv4519pw_ram arv4519pw_nor arv4519pw_brn \
345 arv7506pw11_ram arv7506pw11_nor arv7506pw11_brn \
346 arv7510pw_ram arv7510pw_nor arv7510pw_brn \
347 arv7510pw22_ram arv7510pw22_nor arv7510pw22_brn \
348 arv7518pw_ram arv7518pw_nor arv7518pw_brn \
349 arv752dpw_ram arv752dpw_nor arv752dpw_brn \
350 arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
351 arv8539pw22_brn arv8539pw22_nor arv8539pw22_ram \
353 gigasx76x_ram gigasx76x_nor \
354 acmp252_ram acmp252_nor \
355 easy50712_ram easy50712_nor easy50712_norspl \
356 easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl \
357 fb3370_eva fb3370_ram fb3370_sfspl \
358 p2812hnufx_ram p2812hnufx_nandspl \
359 vgv7510kw22_brn vgv7510kw22_nor vgv7510kw22_ram \
360 vgv7519_brn vgv7519_nor vgv7519_ram
362 define Package
/uboot
/template
363 define Package
/uboot-lantiq-
$(1)
365 CATEGORY
:=Boot Loaders
366 DEPENDS
:=$(3) @
!IN_SDK
368 URL
:=http
://www.denx.de
/wiki
/U-Boot
370 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
374 define BuildUBootPackage
375 $(eval
$(uboot
/Default
))
376 $(eval
$(uboot
/$(1)))
377 DEPS
:=$(uboot
/$(1)/DEPS
)
378 $(call Package
/uboot
/template
,$(1),$(TITLE
),$(DEPS
))
381 define CompressVR9Firmware
382 $(STAGING_DIR_HOST
)/bin
/lzma e \
383 $(FIRMWARE_LANTIQ_SOURCE
)/vr9_phy
$(1)_a
$(2)x.bin \
384 $(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/fw_phy
$(1)_a
$(2)x.blob
388 $(call Build
/Prepare
/Default
)
389 mkdir
-p
$(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/
390 $(call CompressVR9Firmware
,11g
,1)
391 $(call CompressVR9Firmware
,11g
,2)
392 $(call CompressVR9Firmware
,22f
,1)
393 $(call CompressVR9Firmware
,22f
,2)
396 define Build
/Configure
397 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(BUILD_VARIANT
)_config
401 $(MAKE
) -C
$(PKG_BUILD_DIR
) CROSS_COMPILE
=$(TARGET_CROSS
)
404 define Package
/uboot
/install/default
407 $(PKG_BUILD_DIR
)/$(2) \
408 $$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.img
411 define Package
/uboot
/install/uart
412 awk
-f
$(PKG_BUILD_DIR
)/tools
/lantiq_ram_init_uart.awk \
413 -v soc
=$(2) $(PKG_BUILD_DIR
)/$(3) \
414 > $(PKG_BUILD_DIR
)/ddr_settings
415 perl
$(PKG_BUILD_DIR
)/tools
/gct.pl \
416 $(PKG_BUILD_DIR
)/ddr_settings
$(PKG_BUILD_DIR
)/u-boot.srec \
417 $$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.asc
420 define Package
/uboot
/install/template
421 define Package
/uboot-lantiq-
$(1)/install
422 $(call Package
/uboot
/install/default
,$(1),$(if
$(IMAGE
),$(IMAGE
),u-boot.bin
))
423 $(if
$(DDR_SETTINGS
), \
424 $(call Package
/uboot
/install/uart
,$(1),$(SOC
),$(DDR_SETTINGS
)) \
429 $(foreach u
,$(UBOOTS
), \
430 $(eval
$(call BuildUBootPackage
,$(u
))) \
431 $(eval
$(call Package
/uboot
/install/template
,$(u
))) \
432 $(eval
$(call BuildPackage
,uboot-lantiq-
$(u
))) \