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
)
208 arv4519pw_ram arv4519pw_nor arv4519pw_brn \
209 arv7510pw_ram arv7510pw_nor arv7510pw_brn \
210 arv7518pw_ram arv7518pw_nor arv7518pw_brn \
211 arv752dpw_ram arv752dpw_nor arv752dpw_brn \
212 arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
213 gigasx76x_ram gigasx76x_nor \
214 acmp252_ram acmp252_nor \
215 easy50712_ram easy50712_nor easy50712_norspl \
216 easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl
218 define Package
/uboot
/template
219 define Package
/uboot-lantiq-
$(1)
221 CATEGORY
:=Boot Loaders
224 URL
:=http
://www.denx.de
/wiki
/U-Boot
226 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
230 define BuildUBootPackage
231 $(eval
$(uboot
/Default
))
232 $(eval
$(uboot
/$(1)))
233 DEPS
:=$(uboot
/$(1)/DEPS
)
234 $(call Package
/uboot
/template
,$(1),$(TITLE
),$(DEPS
))
237 define CopyVR9Firmware
238 $(CP
) $(FIRMWARE_LANTIQ_SOURCE
)/vr9_phy
$(1)_a
$(2)x.bin \
239 $(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/fw_phy
$(1)_a
$(2)x.blob
243 $(call Build
/Prepare
/Default
)
244 mkdir
-p
$(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/
245 $(call CopyVR9Firmware
,11g
,1)
246 $(call CopyVR9Firmware
,11g
,2)
247 $(call CopyVR9Firmware
,22f
,1)
248 $(call CopyVR9Firmware
,22f
,2)
251 define Build
/Configure
252 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(BUILD_VARIANT
)_config
256 $(MAKE
) -C
$(PKG_BUILD_DIR
) CROSS_COMPILE
=$(TARGET_CROSS
)
259 define Package
/uboot
/install/default
261 $(PKG_BUILD_DIR
)/$(2) \
262 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.img
265 define Package
/uboot
/install/uart
266 awk
-f
$(PKG_BUILD_DIR
)/tools
/lantiq_ram_init_uart.awk \
267 -v soc
=$(2) $(PKG_BUILD_DIR
)/$(3) \
268 > $(PKG_BUILD_DIR
)/ddr_settings
269 perl
$(PKG_BUILD_DIR
)/tools
/gct.pl \
270 $(PKG_BUILD_DIR
)/ddr_settings
$(PKG_BUILD_DIR
)/u-boot.srec \
271 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.asc
274 define Package
/uboot
/install/template
275 define Package
/uboot-lantiq-
$(1)/install
276 $(call Package
/uboot
/install/default
,$(1),$(if
$(IMAGE
),$(IMAGE
),u-boot.bin
))
277 $(if
$(DDR_SETTINGS
), \
278 $(call Package
/uboot
/install/uart
,$(1),$(SOC
),$(DDR_SETTINGS
)) \
283 $(foreach u
,$(UBOOTS
), \
284 $(eval
$(call BuildUBootPackage
,$(u
))) \
285 $(eval
$(call Package
/uboot
/install/template
,$(u
))) \
286 $(eval
$(call BuildPackage
,uboot-lantiq-
$(u
))) \