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
37 define uboot
/arv4519pw_ram
38 TITLE
:=U-Boot for Arcadyan arv4519pw
(RAM
)
40 DDR_SETTINGS
:=board
/arcadyan
/arv4519pw
/ddr_settings.h
43 define uboot
/arv4519pw_nor
44 TITLE
:=U-Boot for Arcadyan arv4519pw
(NOR
)
48 define uboot
/arv4519pw_brn
49 TITLE
:=U-Boot for Arcadyan arv4519pw
(BRN
)
53 define uboot
/arv7510pw_ram
54 TITLE
:=U-Boot for Arcadyan arv7510pw
(RAM
)
56 DDR_SETTINGS
:=board
/arcadyan
/arv7510pw
/ddr_settings.h
59 define uboot
/arv7510pw_nor
60 TITLE
:=U-Boot for Arcadyan arv7510pw
(NOR
)
64 define uboot
/arv7510pw_brn
65 TITLE
:=U-Boot for Arcadyan arv7510pw
(BRN
)
69 define uboot
/arv7518pw_ram
70 TITLE
:=U-Boot for Arcadyan arv7518pw
(RAM
)
72 DDR_SETTINGS
:=board
/arcadyan
/arv7518pw
/ddr_settings.h
75 define uboot
/arv7518pw_nor
76 TITLE
:=U-Boot for Arcadyan arv7518pw
(NOR
)
80 define uboot
/arv7518pw_brn
81 TITLE
:=U-Boot for Arcadyan arv7518pw
(BRN
)
85 define uboot
/arv752dpw_ram
86 TITLE
:=U-Boot for Arcadyan arv752dpw
(RAM
)
88 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw
/ddr_settings.h
91 define uboot
/arv752dpw_nor
92 TITLE
:=U-Boot for Arcadyan arv752dpw
(NOR
)
96 define uboot
/arv752dpw_brn
97 TITLE
:=U-Boot for Arcadyan arv752dpw
(BRN
)
101 define uboot
/arv752dpw22_ram
102 TITLE
:=U-Boot for Arcadyan arv752dpw22
(RAM
)
104 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw22
/ddr_settings.h
107 define uboot
/arv752dpw22_nor
108 TITLE
:=U-Boot for Arcadyan arv752dpw22
(NOR
)
112 define uboot
/arv752dpw22_brn
113 TITLE
:=U-Boot for Arcadyan arv752dpw22
(BRN
)
117 define uboot
/gigasx76x_ram
118 TITLE
:=U-Boot for Siemens Gigaset sx76x
(RAM
)
120 DDR_SETTINGS
:=board
/gigaset
/sx76x
/ddr_settings.h
123 define uboot
/gigasx76x_nor
124 TITLE
:=U-Boot for Siemens Gigaset sx76x
(NOR
)
128 define uboot
/acmp252_ram
129 TITLE
:=U-Boot for AudioCodes MP-252
(RAM
)
131 DDR_SETTINGS
:=board
/audiocodes
/acmp252
/ddr_settings.h
134 define uboot
/acmp252_nor
135 TITLE
:=U-Boot for AudioCodes MP-252
(NOR
)
139 define uboot
/easy50712_ram
140 TITLE
:=U-Boot for Lantiq EASY50712
(RAM
)
142 DDR_SETTINGS
:=board
/lantiq
/easy50712
/ddr_settings.h
145 define uboot
/easy50712_nor
146 TITLE
:=U-Boot for Lantiq EASY50712
(NOR
)
150 define uboot
/easy50712_norspl
151 TITLE
:=U-Boot for Lantiq EASY50712
(NOR SPL
)
153 IMAGE
:=u-boot.ltq.lzo.norspl
156 define uboot
/easy80920_ram
157 TITLE
:=U-Boot for Lantiq EASY80920
(RAM
)
159 DDR_SETTINGS
:=board
/lantiq
/easy80920
/ddr_settings.h
162 define uboot
/easy80920_nor
163 TITLE
:=U-Boot for Lantiq EASY80920
(NOR
)
167 define uboot
/easy80920_norspl
168 TITLE
:=U-Boot for Lantiq EASY80920
(NOR SPL
)
170 IMAGE
:=u-boot.ltq.lzo.norspl
173 define uboot
/easy80920_sfspl
174 TITLE
:=U-Boot for Lantiq EASY80920
(SPI SPL
)
176 IMAGE
:=u-boot.ltq.lzo.sfspl
181 arv4519pw_ram arv4519pw_nor arv4519pw_brn \
182 arv7510pw_ram arv7510pw_nor arv7510pw_brn \
183 arv7518pw_ram arv7518pw_nor arv7518pw_brn \
184 arv752dpw_ram arv752dpw_nor arv752dpw_brn \
185 arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
186 gigasx76x_ram gigasx76x_nor \
187 acmp252_ram acmp252_nor \
188 easy50712_ram easy50712_nor easy50712_norspl \
189 easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl
191 define Package
/uboot
/template
192 define Package
/uboot-lantiq-
$(1)
194 CATEGORY
:=Boot Loaders
195 DEPENDS
:=@TARGET_lantiq_xway
197 URL
:=http
://www.denx.de
/wiki
/U-Boot
199 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
203 define BuildUBootPackage
204 $(eval
$(uboot
/Default
))
205 $(eval
$(uboot
/$(1)))
206 $(call Package
/uboot
/template
,$(1),$(TITLE
))
209 define CopyVR9Firmware
210 $(CP
) $(FIRMWARE_LANTIQ_SOURCE
)/vr9_phy
$(1)_a
$(2)x.bin \
211 $(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/fw_phy
$(1)_a
$(2)x.blob
215 $(call Build
/Prepare
/Default
)
216 $(call CopyVR9Firmware
,11g
,1)
217 $(call CopyVR9Firmware
,11g
,2)
218 $(call CopyVR9Firmware
,22f
,1)
219 $(call CopyVR9Firmware
,22f
,2)
222 define Build
/Configure
223 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(BUILD_VARIANT
)_config
227 $(MAKE
) -C
$(PKG_BUILD_DIR
) CROSS_COMPILE
=$(TARGET_CROSS
)
230 define Package
/uboot
/install/default
232 $(PKG_BUILD_DIR
)/$(2) \
233 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.img
236 define Package
/uboot
/install/uart
237 awk
-f
$(PKG_BUILD_DIR
)/tools
/lantiq_ram_init_uart.awk \
238 -v soc
=$(2) $(PKG_BUILD_DIR
)/$(3) \
239 > $(PKG_BUILD_DIR
)/ddr_settings
240 perl
$(PKG_BUILD_DIR
)/tools
/gct.pl \
241 $(PKG_BUILD_DIR
)/ddr_settings
$(PKG_BUILD_DIR
)/u-boot.srec \
242 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.asc
245 define Package
/uboot
/install/template
246 define Package
/uboot-lantiq-
$(1)/install
247 $(call Package
/uboot
/install/default
,$(1),$(if
$(IMAGE
),$(IMAGE
),u-boot.bin
))
248 $(if
$(DDR_SETTINGS
), \
249 $(call Package
/uboot
/install/uart
,$(1),$(SOC
),$(DDR_SETTINGS
)) \
254 $(foreach u
,$(UBOOTS
), \
255 $(eval
$(call BuildUBootPackage
,$(u
))) \
256 $(eval
$(call Package
/uboot
/install/template
,$(u
))) \
257 $(eval
$(call BuildPackage
,uboot-lantiq-
$(u
))) \