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_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
26 FIRMWARE_LANTIQ_SOURCE
:=$(TOPDIR
)/target
/linux
/lantiq
/files
/firmware
/lantiq
28 include $(INCLUDE_DIR
)/package.mk
38 define uboot
/arv4519pw_ram
39 TITLE
:=U-Boot for Arcadyan arv4519pw
(RAM
)
41 DDR_SETTINGS
:=board
/arcadyan
/arv4519pw
/ddr_settings.h
42 DEPS
:=@TARGET_lantiq_xway_ARV4519PW
45 define uboot
/arv4519pw_nor
46 TITLE
:=U-Boot for Arcadyan arv4519pw
(NOR
)
48 DEPS
:=@TARGET_lantiq_xway_ARV4519PW
51 define uboot
/arv4519pw_brn
52 TITLE
:=U-Boot for Arcadyan arv4519pw
(BRN
)
54 DEPS
:=@TARGET_lantiq_xway_ARV4519PW
57 define uboot
/arv7510pw_ram
58 TITLE
:=U-Boot for Arcadyan arv7510pw
(RAM
)
60 DDR_SETTINGS
:=board
/arcadyan
/arv7510pw
/ddr_settings.h
61 DEPS
:=@TARGET_lantiq_xway_ARV4510PW
64 define uboot
/arv7510pw_nor
65 TITLE
:=U-Boot for Arcadyan arv7510pw
(NOR
)
67 DEPS
:=@TARGET_lantiq_xway_ARV4510PW
70 define uboot
/arv7510pw_brn
71 TITLE
:=U-Boot for Arcadyan arv7510pw
(BRN
)
73 DEPS
:=@TARGET_lantiq_xway_ARV4510PW
76 define uboot
/arv7518pw_ram
77 TITLE
:=U-Boot for Arcadyan arv7518pw
(RAM
)
79 DDR_SETTINGS
:=board
/arcadyan
/arv7518pw
/ddr_settings.h
80 DEPS
:=@TARGET_lantiq_xway_ARV7518PW
83 define uboot
/arv7518pw_nor
84 TITLE
:=U-Boot for Arcadyan arv7518pw
(NOR
)
86 DEPS
:=@TARGET_lantiq_xway_ARV7518PW
89 define uboot
/arv7518pw_brn
90 TITLE
:=U-Boot for Arcadyan arv7518pw
(BRN
)
92 DEPS
:=@TARGET_lantiq_xway_ARV7518PW
95 define uboot
/arv752dpw_ram
96 TITLE
:=U-Boot for Arcadyan arv752dpw
(RAM
)
98 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw
/ddr_settings.h
99 DEPS
:=@TARGET_lantiq_xway_ARV752DPW
102 define uboot
/arv752dpw_nor
103 TITLE
:=U-Boot for Arcadyan arv752dpw
(NOR
)
105 DEPS
:=@TARGET_lantiq_xway_ARV752DPW
108 define uboot
/arv752dpw_brn
109 TITLE
:=U-Boot for Arcadyan arv752dpw
(BRN
)
111 DEPS
:=@TARGET_lantiq_xway_ARV752DPW
114 define uboot
/arv752dpw22_ram
115 TITLE
:=U-Boot for Arcadyan arv752dpw22
(RAM
)
117 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw22
/ddr_settings.h
118 DEPS
:=@TARGET_lantiq_xway_ARV752DPW22
121 define uboot
/arv752dpw22_nor
122 TITLE
:=U-Boot for Arcadyan arv752dpw22
(NOR
)
124 DEPS
:=@TARGET_lantiq_xway_ARV752DPW22
127 define uboot
/arv752dpw22_brn
128 TITLE
:=U-Boot for Arcadyan arv752dpw22
(BRN
)
130 DEPS
:=@TARGET_lantiq_xway_ARV752DPW22
133 define uboot
/gigasx76x_ram
134 TITLE
:=U-Boot for Siemens Gigaset sx76x
(RAM
)
136 DDR_SETTINGS
:=board
/gigaset
/sx76x
/ddr_settings.h
137 DEPS
:=@TARGET_lantiq_xway_GIGASX76X
140 define uboot
/gigasx76x_nor
141 TITLE
:=U-Boot for Siemens Gigaset sx76x
(NOR
)
143 DEPS
:=@TARGET_lantiq_xway_GIGASX76X
146 define uboot
/acmp252_ram
147 TITLE
:=U-Boot for AudioCodes MP-252
(RAM
)
149 DDR_SETTINGS
:=board
/audiocodes
/acmp252
/ddr_settings.h
150 DEPS
:=@TARGET_lantiq_xway_ACMP252
153 define uboot
/acmp252_nor
154 TITLE
:=U-Boot for AudioCodes MP-252
(NOR
)
156 DEPS
:=@TARGET_lantiq_xway_ACMP252
159 define uboot
/easy50712_ram
160 TITLE
:=U-Boot for Lantiq EASY50712
(RAM
)
162 DDR_SETTINGS
:=board
/lantiq
/easy50712
/ddr_settings.h
163 DEPS
:=@TARGET_lantiq_xway_EASY50712
166 define uboot
/easy50712_nor
167 TITLE
:=U-Boot for Lantiq EASY50712
(NOR
)
169 DEPS
:=@TARGET_lantiq_xway_EASY50712
172 define uboot
/easy50712_norspl
173 TITLE
:=U-Boot for Lantiq EASY50712
(NOR SPL
)
175 IMAGE
:=u-boot.ltq.lzo.norspl
176 DEPS
:=@TARGET_lantiq_xway_EASY50712
179 define uboot
/easy80920_ram
180 TITLE
:=U-Boot for Lantiq EASY80920
(RAM
)
182 DDR_SETTINGS
:=board
/lantiq
/easy80920
/ddr_settings.h
183 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
186 define uboot
/easy80920_nor
187 TITLE
:=U-Boot for Lantiq EASY80920
(NOR
)
189 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
192 define uboot
/easy80920_norspl
193 TITLE
:=U-Boot for Lantiq EASY80920
(NOR SPL
)
195 IMAGE
:=u-boot.ltq.lzo.norspl
196 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
199 define uboot
/easy80920_sfspl
200 TITLE
:=U-Boot for Lantiq EASY80920
(SPI SPL
)
202 IMAGE
:=u-boot.ltq.lzo.sfspl
203 DEPS
:=@
(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND
)
206 define uboot
/fb3370_eva
207 TITLE
:=U-Boot for AVM FRITZ3370
(EVA
)
209 DEPS
:=@TARGET_lantiq_xrx200_FRITZ3370
212 define uboot
/fb3370_ram
213 TITLE
:=U-Boot for AVM FRITZ3370
(RAM
)
215 DDR_SETTINGS
:=board
/avm
/fb3370
/ddr_settings.h
216 DEPS
:=@TARGET_lantiq_xrx200_FRITZ3370
219 define uboot
/fb3370_sfspl
220 TITLE
:=U-Boot for AVM FRITZ3370
(SPI SPL
)
222 IMAGE
:=u-boot.ltq.lzo.sfspl
223 DEPS
:=@TARGET_lantiq_xrx200_FRITZ3370
226 define uboot
/p2812hnufx_ram
227 TITLE
:=U-Boot for ZyXEL P-2812HNU-Fx
(RAM
)
229 DDR_SETTINGS
:=board
/zyxel
/p2812hnufx
/ddr_settings.h
230 DEPS
:=@TARGET_lantiq_xrx200_P2812HNUFX
233 define uboot
/p2812hnufx_nandspl
234 TITLE
:=U-Boot for ZyXEL P-2812HNU-Fx
(NAND SPL
)
236 IMAGE
:=u-boot.ltq.lzo.nandspl
237 DEPS
:=@TARGET_lantiq_xrx200_P2812HNUFX
242 arv4519pw_ram arv4519pw_nor arv4519pw_brn \
243 arv7510pw_ram arv7510pw_nor arv7510pw_brn \
244 arv7518pw_ram arv7518pw_nor arv7518pw_brn \
245 arv752dpw_ram arv752dpw_nor arv752dpw_brn \
246 arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
247 gigasx76x_ram gigasx76x_nor \
248 acmp252_ram acmp252_nor \
249 easy50712_ram easy50712_nor easy50712_norspl \
250 easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl \
251 fb3370_eva fb3370_ram fb3370_sfspl \
252 p2812hnufx_ram p2812hnufx_nandspl
254 define Package
/uboot
/template
255 define Package
/uboot-lantiq-
$(1)
257 CATEGORY
:=Boot Loaders
260 URL
:=http
://www.denx.de
/wiki
/U-Boot
262 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
266 define BuildUBootPackage
267 $(eval
$(uboot
/Default
))
268 $(eval
$(uboot
/$(1)))
269 DEPS
:=$(uboot
/$(1)/DEPS
)
270 $(call Package
/uboot
/template
,$(1),$(TITLE
),$(DEPS
))
273 define CopyVR9Firmware
274 $(CP
) $(FIRMWARE_LANTIQ_SOURCE
)/vr9_phy
$(1)_a
$(2)x.bin \
275 $(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/fw_phy
$(1)_a
$(2)x.blob
279 $(call Build
/Prepare
/Default
)
280 mkdir
-p
$(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/
281 $(call CopyVR9Firmware
,11g
,1)
282 $(call CopyVR9Firmware
,11g
,2)
283 $(call CopyVR9Firmware
,22f
,1)
284 $(call CopyVR9Firmware
,22f
,2)
287 define Build
/Configure
288 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(BUILD_VARIANT
)_config
292 $(MAKE
) -C
$(PKG_BUILD_DIR
) CROSS_COMPILE
=$(TARGET_CROSS
)
295 define Package
/uboot
/install/default
297 $(PKG_BUILD_DIR
)/$(2) \
298 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.img
301 define Package
/uboot
/install/uart
302 awk
-f
$(PKG_BUILD_DIR
)/tools
/lantiq_ram_init_uart.awk \
303 -v soc
=$(2) $(PKG_BUILD_DIR
)/$(3) \
304 > $(PKG_BUILD_DIR
)/ddr_settings
305 perl
$(PKG_BUILD_DIR
)/tools
/gct.pl \
306 $(PKG_BUILD_DIR
)/ddr_settings
$(PKG_BUILD_DIR
)/u-boot.srec \
307 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.asc
310 define Package
/uboot
/install/template
311 define Package
/uboot-lantiq-
$(1)/install
312 $(call Package
/uboot
/install/default
,$(1),$(if
$(IMAGE
),$(IMAGE
),u-boot.bin
))
313 $(if
$(DDR_SETTINGS
), \
314 $(call Package
/uboot
/install/uart
,$(1),$(SOC
),$(DDR_SETTINGS
)) \
319 $(foreach u
,$(UBOOTS
), \
320 $(eval
$(call BuildUBootPackage
,$(u
))) \
321 $(eval
$(call Package
/uboot
/install/template
,$(u
))) \
322 $(eval
$(call BuildPackage
,uboot-lantiq-
$(u
))) \