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_MD5SUM
:=a076a044b64371edc52f7e562b13f6b2
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_ARV4519PW
46 define uboot
/arv4519pw_nor
47 TITLE
:=U-Boot for Arcadyan arv4519pw
(NOR
)
49 DEPS
:=@TARGET_lantiq_xway_ARV4519PW
52 define uboot
/arv4519pw_brn
53 TITLE
:=U-Boot for Arcadyan arv4519pw
(BRN
)
55 DEPS
:=@TARGET_lantiq_xway_ARV4519PW
58 define uboot
/arv7510pw_ram
59 TITLE
:=U-Boot for Arcadyan arv7510pw
(RAM
)
61 DDR_SETTINGS
:=board
/arcadyan
/arv7510pw
/ddr_settings.h
62 DEPS
:=@TARGET_lantiq_xway_ARV4510PW
65 define uboot
/arv7510pw_nor
66 TITLE
:=U-Boot for Arcadyan arv7510pw
(NOR
)
68 DEPS
:=@TARGET_lantiq_xway_ARV4510PW
71 define uboot
/arv7510pw_brn
72 TITLE
:=U-Boot for Arcadyan arv7510pw
(BRN
)
74 DEPS
:=@TARGET_lantiq_xway_ARV4510PW
77 define uboot
/arv7510pw22_ram
78 TITLE
:=U-Boot for Arcadyan arv7510pw22
(RAM
)
80 DDR_SETTINGS
:=board
/arcadyan
/arv7510pw22
/ddr_settings.h
81 DEPS
:=@TARGET_lantiq_xway_ARV7510PW22
84 define uboot
/arv7510pw22_nor
85 TITLE
:=U-Boot for Arcadyan arv7510pw22
(NOR
)
87 DEPS
:=@TARGET_lantiq_xway_ARV7510PW22
90 define uboot
/arv7510pw22_brn
91 TITLE
:=U-Boot for Arcadyan arv7510pw22
(BRN
)
93 DEPS
:=@TARGET_lantiq_xway_ARV7510PW22
96 define uboot
/arv7518pw_ram
97 TITLE
:=U-Boot for Arcadyan arv7518pw
(RAM
)
99 DDR_SETTINGS
:=board
/arcadyan
/arv7518pw
/ddr_settings.h
100 DEPS
:=@TARGET_lantiq_xway_ARV7518PW
103 define uboot
/arv7518pw_nor
104 TITLE
:=U-Boot for Arcadyan arv7518pw
(NOR
)
106 DEPS
:=@TARGET_lantiq_xway_ARV7518PW
109 define uboot
/arv7518pw_brn
110 TITLE
:=U-Boot for Arcadyan arv7518pw
(BRN
)
112 DEPS
:=@TARGET_lantiq_xway_ARV7518PW
115 define uboot
/arv752dpw_ram
116 TITLE
:=U-Boot for Arcadyan arv752dpw
(RAM
)
118 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw
/ddr_settings.h
119 DEPS
:=@TARGET_lantiq_xway_ARV752DPW
122 define uboot
/arv752dpw_nor
123 TITLE
:=U-Boot for Arcadyan arv752dpw
(NOR
)
125 DEPS
:=@TARGET_lantiq_xway_ARV752DPW
128 define uboot
/arv752dpw_brn
129 TITLE
:=U-Boot for Arcadyan arv752dpw
(BRN
)
131 DEPS
:=@TARGET_lantiq_xway_ARV752DPW
134 define uboot
/arv752dpw22_ram
135 TITLE
:=U-Boot for Arcadyan arv752dpw22
(RAM
)
137 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw22
/ddr_settings.h
138 DEPS
:=@TARGET_lantiq_xway_ARV752DPW22
141 define uboot
/arv752dpw22_nor
142 TITLE
:=U-Boot for Arcadyan arv752dpw22
(NOR
)
144 DEPS
:=@TARGET_lantiq_xway_ARV752DPW22
147 define uboot
/arv752dpw22_brn
148 TITLE
:=U-Boot for Arcadyan arv752dpw22
(BRN
)
150 DEPS
:=@TARGET_lantiq_xway_ARV752DPW22
153 define uboot
/arv8539pw22_ram
154 TITLE
:=U-Boot for Speedport W
504V Typ A
(RAM
)
156 DDR_SETTINGS
:=board
/arcadyan
/arv8539pw22
/ddr_settings.h
157 DEPS
:=@TARGET_lantiq_xway_ARV8539PW22
160 define uboot
/arv8539pw22_nor
161 TITLE
:=U-Boot for Speedport W
504V Typ A
(NOR
)
163 DEPS
:=@TARGET_lantiq_xway_ARV8539PW22
166 define uboot
/arv8539pw22_brn
167 TITLE
:=U-Boot for Speedport W
504V Typ A
(BRN
)
169 DEPS
:=@TARGET_lantiq_xway_ARV8539PW22
172 define uboot
/gigasx76x_ram
173 TITLE
:=U-Boot for Siemens Gigaset sx76x
(RAM
)
175 DDR_SETTINGS
:=board
/gigaset
/sx76x
/ddr_settings.h
176 DEPS
:=@TARGET_lantiq_xway_GIGASX76X
179 define uboot
/gigasx76x_nor
180 TITLE
:=U-Boot for Siemens Gigaset sx76x
(NOR
)
182 DEPS
:=@TARGET_lantiq_xway_GIGASX76X
185 define uboot
/acmp252_ram
186 TITLE
:=U-Boot for AudioCodes MP-252
(RAM
)
188 DDR_SETTINGS
:=board
/audiocodes
/acmp252
/ddr_settings.h
189 DEPS
:=@TARGET_lantiq_xway_ACMP252
192 define uboot
/acmp252_nor
193 TITLE
:=U-Boot for AudioCodes MP-252
(NOR
)
195 DEPS
:=@TARGET_lantiq_xway_ACMP252
198 define uboot
/easy50712_ram
199 TITLE
:=U-Boot for Lantiq EASY50712
(RAM
)
201 DDR_SETTINGS
:=board
/lantiq
/easy50712
/ddr_settings.h
202 DEPS
:=@TARGET_lantiq_xway_EASY50712
205 define uboot
/easy50712_nor
206 TITLE
:=U-Boot for Lantiq EASY50712
(NOR
)
208 DEPS
:=@TARGET_lantiq_xway_EASY50712
211 define uboot
/easy50712_norspl
212 TITLE
:=U-Boot for Lantiq EASY50712
(NOR SPL
)
214 IMAGE
:=u-boot.ltq.lzo.norspl
215 DEPS
:=@TARGET_lantiq_xway_EASY50712
218 define uboot
/easy80920_ram
219 TITLE
:=U-Boot for Lantiq EASY80920
(RAM
)
221 DDR_SETTINGS
:=board
/lantiq
/easy80920
/ddr_settings.h
222 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
225 define uboot
/easy80920_nor
226 TITLE
:=U-Boot for Lantiq EASY80920
(NOR
)
228 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
231 define uboot
/easy80920_norspl
232 TITLE
:=U-Boot for Lantiq EASY80920
(NOR SPL
)
234 IMAGE
:=u-boot.ltq.lzo.norspl
235 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
238 define uboot
/easy80920_sfspl
239 TITLE
:=U-Boot for Lantiq EASY80920
(SPI SPL
)
241 IMAGE
:=u-boot.ltq.lzo.sfspl
242 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
245 define uboot
/fb3370_eva
246 TITLE
:=U-Boot for AVM FRITZ3370
(EVA
)
248 DEPS
:=@TARGET_lantiq_xrx200_FRITZ3370
251 define uboot
/fb3370_ram
252 TITLE
:=U-Boot for AVM FRITZ3370
(RAM
)
254 DDR_SETTINGS
:=board
/avm
/fb3370
/ddr_settings.h
255 DEPS
:=@TARGET_lantiq_xrx200_FRITZ3370
258 define uboot
/fb3370_sfspl
259 TITLE
:=U-Boot for AVM FRITZ3370
(SPI SPL
)
261 IMAGE
:=u-boot.ltq.lzo.sfspl
262 DEPS
:=@TARGET_lantiq_xrx200_FRITZ3370
265 define uboot
/p2812hnufx_ram
266 TITLE
:=U-Boot for ZyXEL P-2812HNU-Fx
(RAM
)
268 DDR_SETTINGS
:=board
/zyxel
/p2812hnufx
/ddr_settings.h
269 DEPS
:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
272 define uboot
/p2812hnufx_nandspl
273 TITLE
:=U-Boot for ZyXEL P-2812HNU-Fx
(NAND SPL
)
275 IMAGE
:=u-boot.ltq.lzo.nandspl
276 DEPS
:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
279 define uboot
/vgv7510kw22_brn
280 TITLE
:=U-Boot for Arcadyan VGV7510KW22
(BRN
)
282 DEPS
:=@TARGET_lantiq_xrx200_VGV7510KW22NOR||@TARGET_lantiq_xrx200_VGV7510KW22BRN
285 define uboot
/vgv7510kw22_nor
286 TITLE
:=U-Boot for Arcadyan VGV7510KW22
(NOR
)
288 DEPS
:=@TARGET_lantiq_xrx200_VGV7510KW22NOR||@TARGET_lantiq_xrx200_VGV7510KW22BRN
291 define uboot
/vgv7510kw22_ram
292 TITLE
:=U-Boot for Arcadyan VGV7510KW22
(RAM
)
294 DDR_SETTINGS
:=board
/arcadyan
/vgv7510kw22
/ddr_settings.h
295 DEPS
:=@TARGET_lantiq_xrx200_VGV7510KW22NOR||@TARGET_lantiq_xrx200_VGV7510KW22BRN
299 arv4519pw_ram arv4519pw_nor arv4519pw_brn \
300 arv7510pw_ram arv7510pw_nor arv7510pw_brn \
301 arv7510pw22_ram arv7510pw22_nor arv7510pw22_brn \
302 arv7518pw_ram arv7518pw_nor arv7518pw_brn \
303 arv752dpw_ram arv752dpw_nor arv752dpw_brn \
304 arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
305 arv8539pw22_brn arv8539pw22_nor arv8539pw22_ram \
306 gigasx76x_ram gigasx76x_nor \
307 acmp252_ram acmp252_nor \
308 easy50712_ram easy50712_nor easy50712_norspl \
309 easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl \
310 fb3370_eva fb3370_ram fb3370_sfspl \
311 p2812hnufx_ram p2812hnufx_nandspl \
312 vgv7510kw22_brn vgv7510kw22_nor vgv7510kw22_ram
314 define Package
/uboot
/template
315 define Package
/uboot-lantiq-
$(1)
317 CATEGORY
:=Boot Loaders
320 URL
:=http
://www.denx.de
/wiki
/U-Boot
322 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
326 define BuildUBootPackage
327 $(eval
$(uboot
/Default
))
328 $(eval
$(uboot
/$(1)))
329 DEPS
:=$(uboot
/$(1)/DEPS
)
330 $(call Package
/uboot
/template
,$(1),$(TITLE
),$(DEPS
))
333 define CopyVR9Firmware
334 $(CP
) $(FIRMWARE_LANTIQ_SOURCE
)/vr9_phy
$(1)_a
$(2)x.bin \
335 $(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/fw_phy
$(1)_a
$(2)x.blob
339 $(call Build
/Prepare
/Default
)
340 mkdir
-p
$(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/
341 $(call CopyVR9Firmware
,11g
,1)
342 $(call CopyVR9Firmware
,11g
,2)
343 $(call CopyVR9Firmware
,22f
,1)
344 $(call CopyVR9Firmware
,22f
,2)
347 define Build
/Configure
348 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(BUILD_VARIANT
)_config
352 $(MAKE
) -C
$(PKG_BUILD_DIR
) CROSS_COMPILE
=$(TARGET_CROSS
)
355 define Package
/uboot
/install/default
357 $(PKG_BUILD_DIR
)/$(2) \
358 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.img
361 define Package
/uboot
/install/uart
362 awk
-f
$(PKG_BUILD_DIR
)/tools
/lantiq_ram_init_uart.awk \
363 -v soc
=$(2) $(PKG_BUILD_DIR
)/$(3) \
364 > $(PKG_BUILD_DIR
)/ddr_settings
365 perl
$(PKG_BUILD_DIR
)/tools
/gct.pl \
366 $(PKG_BUILD_DIR
)/ddr_settings
$(PKG_BUILD_DIR
)/u-boot.srec \
367 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.asc
370 define Package
/uboot
/install/template
371 define Package
/uboot-lantiq-
$(1)/install
372 $(call Package
/uboot
/install/default
,$(1),$(if
$(IMAGE
),$(IMAGE
),u-boot.bin
))
373 $(if
$(DDR_SETTINGS
), \
374 $(call Package
/uboot
/install/uart
,$(1),$(SOC
),$(DDR_SETTINGS
)) \
379 $(foreach u
,$(UBOOTS
), \
380 $(eval
$(call BuildUBootPackage
,$(u
))) \
381 $(eval
$(call Package
/uboot
/install/template
,$(u
))) \
382 $(eval
$(call BuildPackage
,uboot-lantiq-
$(u
))) \