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
)
24 FIRMWARE_LANTIQ_SOURCE
:=$(TOPDIR
)/target
/linux
/lantiq
/files
/firmware
/lantiq
26 include $(INCLUDE_DIR
)/package.mk
35 define uboot
/arv4519pw_ram
36 TITLE
:=U-Boot for Arcadyan arv4519pw
(RAM
)
38 DDR_SETTINGS
:=board
/arcadyan
/arv4519pw
/ddr_settings.h
41 define uboot
/arv4519pw_nor
42 TITLE
:=U-Boot for Arcadyan arv4519pw
(NOR
)
46 define uboot
/arv4519pw_brn
47 TITLE
:=U-Boot for Arcadyan arv4519pw
(BRN
)
51 define uboot
/arv7510pw_ram
52 TITLE
:=U-Boot for Arcadyan arv7510pw
(RAM
)
54 DDR_SETTINGS
:=board
/arcadyan
/arv7510pw
/ddr_settings.h
57 define uboot
/arv7510pw_nor
58 TITLE
:=U-Boot for Arcadyan arv7510pw
(NOR
)
62 define uboot
/arv7510pw_brn
63 TITLE
:=U-Boot for Arcadyan arv7510pw
(BRN
)
67 define uboot
/arv7518pw_ram
68 TITLE
:=U-Boot for Arcadyan arv7518pw
(RAM
)
70 DDR_SETTINGS
:=board
/arcadyan
/arv7518pw
/ddr_settings.h
73 define uboot
/arv7518pw_nor
74 TITLE
:=U-Boot for Arcadyan arv7518pw
(NOR
)
78 define uboot
/arv7518pw_brn
79 TITLE
:=U-Boot for Arcadyan arv7518pw
(BRN
)
83 define uboot
/arv752dpw_ram
84 TITLE
:=U-Boot for Arcadyan arv752dpw
(RAM
)
86 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw
/ddr_settings.h
89 define uboot
/arv752dpw_nor
90 TITLE
:=U-Boot for Arcadyan arv752dpw
(NOR
)
94 define uboot
/arv752dpw_brn
95 TITLE
:=U-Boot for Arcadyan arv752dpw
(BRN
)
99 define uboot
/arv752dpw22_ram
100 TITLE
:=U-Boot for Arcadyan arv752dpw22
(RAM
)
102 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw22
/ddr_settings.h
105 define uboot
/arv752dpw22_nor
106 TITLE
:=U-Boot for Arcadyan arv752dpw22
(NOR
)
110 define uboot
/arv752dpw22_brn
111 TITLE
:=U-Boot for Arcadyan arv752dpw22
(BRN
)
115 define uboot
/gigasx76x_ram
116 TITLE
:=U-Boot for Siemens Gigaset sx76x
(RAM
)
118 DDR_SETTINGS
:=board
/gigaset
/sx76x
/ddr_settings.h
121 define uboot
/gigasx76x_nor
122 TITLE
:=U-Boot for Siemens Gigaset sx76x
(NOR
)
126 define uboot
/acmp252_ram
127 TITLE
:=U-Boot for AudioCodes MP-252
(RAM
)
129 DDR_SETTINGS
:=board
/audiocodes
/acmp252
/ddr_settings.h
132 define uboot
/acmp252_nor
133 TITLE
:=U-Boot for AudioCodes MP-252
(NOR
)
137 define uboot
/easy50712_ram
138 TITLE
:=U-Boot for Lantiq EASY50712
(RAM
)
140 DDR_SETTINGS
:=board
/lantiq
/easy50712
/ddr_settings.h
143 define uboot
/easy50712_nor
144 TITLE
:=U-Boot for Lantiq EASY50712
(NOR
)
148 define uboot
/easy50712_norspl
149 TITLE
:=U-Boot for Lantiq EASY50712
(NOR SPL
)
151 IMAGE
:=u-boot.ltq.lzo.norspl
154 define uboot
/easy80920_ram
155 TITLE
:=U-Boot for Lantiq EASY80920
(RAM
)
157 DDR_SETTINGS
:=board
/lantiq
/easy80920
/ddr_settings.h
160 define uboot
/easy80920_nor
161 TITLE
:=U-Boot for Lantiq EASY80920
(NOR
)
165 define uboot
/easy80920_norspl
166 TITLE
:=U-Boot for Lantiq EASY80920
(NOR SPL
)
168 IMAGE
:=u-boot.ltq.lzo.norspl
171 define uboot
/easy80920_sfspl
172 TITLE
:=U-Boot for Lantiq EASY80920
(SPI SPL
)
174 IMAGE
:=u-boot.ltq.lzo.sfspl
179 arv4519pw_ram arv4519pw_nor arv4519pw_brn \
180 arv7510pw_ram arv7510pw_nor arv7510pw_brn \
181 arv7518pw_ram arv7518pw_nor arv7518pw_brn \
182 arv752dpw_ram arv752dpw_nor arv752dpw_brn \
183 arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
184 gigasx76x_ram gigasx76x_nor \
185 acmp252_ram acmp252_nor \
186 easy50712_ram easy50712_nor easy50712_norspl \
187 easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl
189 define Package
/uboot
/template
190 define Package
/uboot-lantiq-
$(1)
192 CATEGORY
:=Boot Loaders
193 DEPENDS
:=@TARGET_lantiq_xway
195 URL
:=http
://www.denx.de
/wiki
/U-Boot
197 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
201 define BuildUBootPackage
202 $(eval
$(uboot
/Default
))
203 $(eval
$(uboot
/$(1)))
204 $(call Package
/uboot
/template
,$(1),$(TITLE
))
207 define CopyVR9Firmware
208 $(CP
) $(FIRMWARE_LANTIQ_SOURCE
)/vr9_phy
$(1)_a
$(2)x.bin \
209 $(PKG_BUILD_DIR
)/arch
/mips
/cpu
/mips32
/vrx200
/fw_phy
$(1)_a
$(2)x.blob
213 $(call Build
/Prepare
/Default
)
214 $(call CopyVR9Firmware
,11g
,1)
215 $(call CopyVR9Firmware
,11g
,2)
216 $(call CopyVR9Firmware
,22f
,1)
217 $(call CopyVR9Firmware
,22f
,2)
220 define Build
/Configure
221 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(BUILD_VARIANT
)_config
225 $(MAKE
) -C
$(PKG_BUILD_DIR
) CROSS_COMPILE
=$(TARGET_CROSS
)
228 define Package
/uboot
/install/default
230 $(PKG_BUILD_DIR
)/$(2) \
231 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.img
234 define Package
/uboot
/install/uart
235 awk
-f
$(PKG_BUILD_DIR
)/tools
/lantiq_ram_init_uart.awk \
236 -v soc
=$(2) $(PKG_BUILD_DIR
)/$(3) \
237 > $(PKG_BUILD_DIR
)/ddr_settings
238 perl
$(PKG_BUILD_DIR
)/tools
/gct.pl \
239 $(PKG_BUILD_DIR
)/ddr_settings
$(PKG_BUILD_DIR
)/u-boot.srec \
240 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.asc
243 define Package
/uboot
/install/template
244 define Package
/uboot-lantiq-
$(1)/install
245 $(call Package
/uboot
/install/default
,$(1),$(if
$(IMAGE
),$(IMAGE
),u-boot.bin
))
246 $(if
$(DDR_SETTINGS
), \
247 $(call Package
/uboot
/install/uart
,$(1),$(SOC
),$(DDR_SETTINGS
)) \
252 $(foreach u
,$(UBOOTS
), \
253 $(eval
$(call BuildUBootPackage
,$(u
))) \
254 $(eval
$(call Package
/uboot
/install/template
,$(u
))) \
255 $(eval
$(call BuildPackage
,uboot-lantiq-
$(u
))) \