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
24 FIRMWARE_LANTIQ_SOURCE
:=$(TOPDIR
)/target
/linux
/lantiq
/files
/firmware
/lantiq
26 include $(INCLUDE_DIR
)/package.mk
36 define uboot
/arv4519pw_ram
37 TITLE
:=U-Boot for Arcadyan arv4519pw
(RAM
)
39 DDR_SETTINGS
:=board
/arcadyan
/arv4519pw
/ddr_settings.h
40 DEPS
:=@TARGET_lantiq_xway_ARV4519PW
43 define uboot
/arv4519pw_nor
44 TITLE
:=U-Boot for Arcadyan arv4519pw
(NOR
)
46 DEPS
:=@TARGET_lantiq_xway_ARV4519PW
49 define uboot
/arv4519pw_brn
50 TITLE
:=U-Boot for Arcadyan arv4519pw
(BRN
)
52 DEPS
:=@TARGET_lantiq_xway_ARV4519PW
55 define uboot
/arv7510pw_ram
56 TITLE
:=U-Boot for Arcadyan arv7510pw
(RAM
)
58 DDR_SETTINGS
:=board
/arcadyan
/arv7510pw
/ddr_settings.h
59 DEPS
:=@TARGET_lantiq_xway_ARV4510PW
62 define uboot
/arv7510pw_nor
63 TITLE
:=U-Boot for Arcadyan arv7510pw
(NOR
)
65 DEPS
:=@TARGET_lantiq_xway_ARV4510PW
68 define uboot
/arv7510pw_brn
69 TITLE
:=U-Boot for Arcadyan arv7510pw
(BRN
)
71 DEPS
:=@TARGET_lantiq_xway_ARV4510PW
74 define uboot
/arv7510pw22_ram
75 TITLE
:=U-Boot for Arcadyan arv7510pw22
(RAM
)
77 DDR_SETTINGS
:=board
/arcadyan
/arv7510pw22
/ddr_settings.h
78 DEPS
:=@TARGET_lantiq_xway_ARV7510PW22
81 define uboot
/arv7510pw22_nor
82 TITLE
:=U-Boot for Arcadyan arv7510pw22
(NOR
)
84 DEPS
:=@TARGET_lantiq_xway_ARV7510PW22
87 define uboot
/arv7510pw22_brn
88 TITLE
:=U-Boot for Arcadyan arv7510pw22
(BRN
)
90 DEPS
:=@TARGET_lantiq_xway_ARV7510PW22
93 define uboot
/arv7518pw_ram
94 TITLE
:=U-Boot for Arcadyan arv7518pw
(RAM
)
96 DDR_SETTINGS
:=board
/arcadyan
/arv7518pw
/ddr_settings.h
97 DEPS
:=@TARGET_lantiq_xway_ARV7518PW
100 define uboot
/arv7518pw_nor
101 TITLE
:=U-Boot for Arcadyan arv7518pw
(NOR
)
103 DEPS
:=@TARGET_lantiq_xway_ARV7518PW
106 define uboot
/arv7518pw_brn
107 TITLE
:=U-Boot for Arcadyan arv7518pw
(BRN
)
109 DEPS
:=@TARGET_lantiq_xway_ARV7518PW
112 define uboot
/arv752dpw_ram
113 TITLE
:=U-Boot for Arcadyan arv752dpw
(RAM
)
115 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw
/ddr_settings.h
116 DEPS
:=@TARGET_lantiq_xway_ARV752DPW
119 define uboot
/arv752dpw_nor
120 TITLE
:=U-Boot for Arcadyan arv752dpw
(NOR
)
122 DEPS
:=@TARGET_lantiq_xway_ARV752DPW
125 define uboot
/arv752dpw_brn
126 TITLE
:=U-Boot for Arcadyan arv752dpw
(BRN
)
128 DEPS
:=@TARGET_lantiq_xway_ARV752DPW
131 define uboot
/arv752dpw22_ram
132 TITLE
:=U-Boot for Arcadyan arv752dpw22
(RAM
)
134 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw22
/ddr_settings.h
135 DEPS
:=@TARGET_lantiq_xway_ARV752DPW22
138 define uboot
/arv752dpw22_nor
139 TITLE
:=U-Boot for Arcadyan arv752dpw22
(NOR
)
141 DEPS
:=@TARGET_lantiq_xway_ARV752DPW22
144 define uboot
/arv752dpw22_brn
145 TITLE
:=U-Boot for Arcadyan arv752dpw22
(BRN
)
147 DEPS
:=@TARGET_lantiq_xway_ARV752DPW22
150 define uboot
/gigasx76x_ram
151 TITLE
:=U-Boot for Siemens Gigaset sx76x
(RAM
)
153 DDR_SETTINGS
:=board
/gigaset
/sx76x
/ddr_settings.h
154 DEPS
:=@TARGET_lantiq_xway_GIGASX76X
157 define uboot
/gigasx76x_nor
158 TITLE
:=U-Boot for Siemens Gigaset sx76x
(NOR
)
160 DEPS
:=@TARGET_lantiq_xway_GIGASX76X
163 define uboot
/acmp252_ram
164 TITLE
:=U-Boot for AudioCodes MP-252
(RAM
)
166 DDR_SETTINGS
:=board
/audiocodes
/acmp252
/ddr_settings.h
167 DEPS
:=@TARGET_lantiq_xway_ACMP252
170 define uboot
/acmp252_nor
171 TITLE
:=U-Boot for AudioCodes MP-252
(NOR
)
173 DEPS
:=@TARGET_lantiq_xway_ACMP252
176 define uboot
/easy50712_ram
177 TITLE
:=U-Boot for Lantiq EASY50712
(RAM
)
179 DDR_SETTINGS
:=board
/lantiq
/easy50712
/ddr_settings.h
180 DEPS
:=@TARGET_lantiq_xway_EASY50712
183 define uboot
/easy50712_nor
184 TITLE
:=U-Boot for Lantiq EASY50712
(NOR
)
186 DEPS
:=@TARGET_lantiq_xway_EASY50712
189 define uboot
/easy50712_norspl
190 TITLE
:=U-Boot for Lantiq EASY50712
(NOR SPL
)
192 IMAGE
:=u-boot.ltq.lzo.norspl
193 DEPS
:=@TARGET_lantiq_xway_EASY50712
196 define uboot
/easy80920_ram
197 TITLE
:=U-Boot for Lantiq EASY80920
(RAM
)
199 DDR_SETTINGS
:=board
/lantiq
/easy80920
/ddr_settings.h
200 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
203 define uboot
/easy80920_nor
204 TITLE
:=U-Boot for Lantiq EASY80920
(NOR
)
206 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
209 define uboot
/easy80920_norspl
210 TITLE
:=U-Boot for Lantiq EASY80920
(NOR SPL
)
212 IMAGE
:=u-boot.ltq.lzo.norspl
213 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
216 define uboot
/easy80920_sfspl
217 TITLE
:=U-Boot for Lantiq EASY80920
(SPI SPL
)
219 IMAGE
:=u-boot.ltq.lzo.sfspl
220 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
223 define uboot
/fb3370_eva
224 TITLE
:=U-Boot for AVM FRITZ3370
(EVA
)
226 DEPS
:=@TARGET_lantiq_xrx200_FRITZ3370
229 define uboot
/fb3370_ram
230 TITLE
:=U-Boot for AVM FRITZ3370
(RAM
)
232 DDR_SETTINGS
:=board
/avm
/fb3370
/ddr_settings.h
233 DEPS
:=@TARGET_lantiq_xrx200_FRITZ3370
236 define uboot
/fb3370_sfspl
237 TITLE
:=U-Boot for AVM FRITZ3370
(SPI SPL
)
239 IMAGE
:=u-boot.ltq.lzo.sfspl
240 DEPS
:=@TARGET_lantiq_xrx200_FRITZ3370
243 define uboot
/p2812hnufx_ram
244 TITLE
:=U-Boot for ZyXEL P-2812HNU-Fx
(RAM
)
246 DDR_SETTINGS
:=board
/zyxel
/p2812hnufx
/ddr_settings.h
247 DEPS
:=@TARGET_lantiq_xrx200_P2812HNUFX
250 define uboot
/p2812hnufx_nandspl
251 TITLE
:=U-Boot for ZyXEL P-2812HNU-Fx
(NAND SPL
)
253 IMAGE
:=u-boot.ltq.lzo.nandspl
254 DEPS
:=@TARGET_lantiq_xrx200_P2812HNUFX
259 arv4519pw_ram arv4519pw_nor arv4519pw_brn \
260 arv7510pw_ram arv7510pw_nor arv7510pw_brn \
261 arv7510pw22_ram arv7510pw22_nor arv7510pw22_brn \
262 arv7518pw_ram arv7518pw_nor arv7518pw_brn \
263 arv752dpw_ram arv752dpw_nor arv752dpw_brn \
264 arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
265 gigasx76x_ram gigasx76x_nor \
266 acmp252_ram acmp252_nor \
267 easy50712_ram easy50712_nor easy50712_norspl \
268 easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl \
269 fb3370_eva fb3370_ram fb3370_sfspl \
270 p2812hnufx_ram p2812hnufx_nandspl
272 define Package
/uboot
/template
273 define Package
/uboot-lantiq-
$(1)
275 CATEGORY
:=Boot Loaders
278 URL
:=http
://www.denx.de
/wiki
/U-Boot
280 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
284 define BuildUBootPackage
285 $(eval
$(uboot
/Default
))
286 $(eval
$(uboot
/$(1)))
287 DEPS
:=$(uboot
/$(1)/DEPS
)
288 $(call Package
/uboot
/template
,$(1),$(TITLE
),$(DEPS
))
291 define CopyVR9Firmware
292 $(CP
) $(FIRMWARE_LANTIQ_SOURCE
)/vr9_phy
$(1)_a
$(2)x.bin \
293 $(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/fw_phy
$(1)_a
$(2)x.blob
297 $(call Build
/Prepare
/Default
)
298 mkdir
-p
$(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/
299 $(call CopyVR9Firmware
,11g
,1)
300 $(call CopyVR9Firmware
,11g
,2)
301 $(call CopyVR9Firmware
,22f
,1)
302 $(call CopyVR9Firmware
,22f
,2)
305 define Build
/Configure
306 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(BUILD_VARIANT
)_config
310 $(MAKE
) -C
$(PKG_BUILD_DIR
) CROSS_COMPILE
=$(TARGET_CROSS
)
313 define Package
/uboot
/install/default
315 $(PKG_BUILD_DIR
)/$(2) \
316 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.img
319 define Package
/uboot
/install/uart
320 awk
-f
$(PKG_BUILD_DIR
)/tools
/lantiq_ram_init_uart.awk \
321 -v soc
=$(2) $(PKG_BUILD_DIR
)/$(3) \
322 > $(PKG_BUILD_DIR
)/ddr_settings
323 perl
$(PKG_BUILD_DIR
)/tools
/gct.pl \
324 $(PKG_BUILD_DIR
)/ddr_settings
$(PKG_BUILD_DIR
)/u-boot.srec \
325 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.asc
328 define Package
/uboot
/install/template
329 define Package
/uboot-lantiq-
$(1)/install
330 $(call Package
/uboot
/install/default
,$(1),$(if
$(IMAGE
),$(IMAGE
),u-boot.bin
))
331 $(if
$(DDR_SETTINGS
), \
332 $(call Package
/uboot
/install/uart
,$(1),$(SOC
),$(DDR_SETTINGS
)) \
337 $(foreach u
,$(UBOOTS
), \
338 $(eval
$(call BuildUBootPackage
,$(u
))) \
339 $(eval
$(call Package
/uboot
/install/template
,$(u
))) \
340 $(eval
$(call BuildPackage
,uboot-lantiq-
$(u
))) \