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 include $(INCLUDE_DIR
)/package.mk
33 define uboot
/arv4519pw_ram
34 TITLE
:=U-Boot for Arcadyan arv4519pw
(RAM
)
36 DDR_SETTINGS
:=board
/arcadyan
/arv4519pw
/ddr_settings.h
39 define uboot
/arv4519pw_nor
40 TITLE
:=U-Boot for Arcadyan arv4519pw
(NOR
)
44 define uboot
/arv4519pw_brn
45 TITLE
:=U-Boot for Arcadyan arv4519pw
(BRN
)
49 define uboot
/arv7510pw_ram
50 TITLE
:=U-Boot for Arcadyan arv7510pw
(RAM
)
52 DDR_SETTINGS
:=board
/arcadyan
/arv7510pw
/ddr_settings.h
55 define uboot
/arv7510pw_nor
56 TITLE
:=U-Boot for Arcadyan arv7510pw
(NOR
)
60 define uboot
/arv7510pw_brn
61 TITLE
:=U-Boot for Arcadyan arv7510pw
(BRN
)
65 define uboot
/arv7518pw_ram
66 TITLE
:=U-Boot for Arcadyan arv7518pw
(RAM
)
68 DDR_SETTINGS
:=board
/arcadyan
/arv7518pw
/ddr_settings.h
71 define uboot
/arv7518pw_nor
72 TITLE
:=U-Boot for Arcadyan arv7518pw
(NOR
)
76 define uboot
/arv7518pw_brn
77 TITLE
:=U-Boot for Arcadyan arv7518pw
(BRN
)
81 define uboot
/arv752dpw_ram
82 TITLE
:=U-Boot for Arcadyan arv752dpw
(RAM
)
84 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw
/ddr_settings.h
87 define uboot
/arv752dpw_nor
88 TITLE
:=U-Boot for Arcadyan arv752dpw
(NOR
)
92 define uboot
/arv752dpw_brn
93 TITLE
:=U-Boot for Arcadyan arv752dpw
(BRN
)
97 define uboot
/arv752dpw22_ram
98 TITLE
:=U-Boot for Arcadyan arv752dpw22
(RAM
)
100 DDR_SETTINGS
:=board
/arcadyan
/arv752dpw22
/ddr_settings.h
103 define uboot
/arv752dpw22_nor
104 TITLE
:=U-Boot for Arcadyan arv752dpw22
(NOR
)
108 define uboot
/arv752dpw22_brn
109 TITLE
:=U-Boot for Arcadyan arv752dpw22
(BRN
)
113 define uboot
/gigasx76x_ram
114 TITLE
:=U-Boot for Siemens Gigaset sx76x
(RAM
)
116 DDR_SETTINGS
:=board
/gigaset
/sx76x
/ddr_settings.h
119 define uboot
/gigasx76x_nor
120 TITLE
:=U-Boot for Siemens Gigaset sx76x
(NOR
)
124 define uboot
/easy50712_ram
125 TITLE
:=U-Boot for Lantiq EASY50712
(RAM
)
127 DDR_SETTINGS
:=board
/lantiq
/easy50712
/ddr_settings.h
130 define uboot
/easy50712_nor
131 TITLE
:=U-Boot for Lantiq EASY50712
(NOR
)
135 define uboot
/easy50712_norspl
136 TITLE
:=U-Boot for Lantiq EASY50712
(NOR SPL
)
138 IMAGE
:=u-boot.ltq.lzo.norspl
141 define uboot
/easy80920_ram
142 TITLE
:=U-Boot for Lantiq EASY80920
(RAM
)
144 DDR_SETTINGS
:=board
/lantiq
/easy80920
/ddr_settings.h
147 define uboot
/easy80920_nor
148 TITLE
:=U-Boot for Lantiq EASY80920
(NOR
)
152 define uboot
/easy80920_norspl
153 TITLE
:=U-Boot for Lantiq EASY80920
(NOR SPL
)
155 IMAGE
:=u-boot.ltq.lzo.norspl
158 define uboot
/easy80920_sfspl
159 TITLE
:=U-Boot for Lantiq EASY80920
(SPI SPL
)
161 IMAGE
:=u-boot.ltq.lzo.sfspl
166 arv4519pw_ram arv4519pw_nor arv4519pw_brn \
167 arv7510pw_ram arv7510pw_nor arv7510pw_brn \
168 arv7518pw_ram arv7518pw_nor arv7518pw_brn \
169 arv752dpw_ram arv752dpw_nor arv752dpw_brn \
170 arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
171 gigasx76x_ram gigasx76x_nor \
172 easy50712_ram easy50712_nor easy50712_norspl \
173 easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl
175 define Package
/uboot
/template
176 define Package
/uboot-lantiq-
$(1)
178 CATEGORY
:=Boot Loaders
179 DEPENDS
:=@TARGET_lantiq_xway
181 URL
:=http
://www.denx.de
/wiki
/U-Boot
183 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
187 define BuildUBootPackage
188 $(eval
$(uboot
/Default
))
189 $(eval
$(uboot
/$(1)))
190 $(call Package
/uboot
/template
,$(1),$(TITLE
))
193 define Build
/Configure
194 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(BUILD_VARIANT
)_config
198 $(MAKE
) -C
$(PKG_BUILD_DIR
) CROSS_COMPILE
=$(TARGET_CROSS
)
201 define Package
/uboot
/install/default
203 $(PKG_BUILD_DIR
)/$(2) \
204 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.img
207 define Package
/uboot
/install/uart
208 awk
-f
$(PKG_BUILD_DIR
)/tools
/lantiq_ram_init_uart.awk \
209 -v soc
=$(2) $(PKG_BUILD_DIR
)/$(3) \
210 > $(PKG_BUILD_DIR
)/ddr_settings
211 perl
$(PKG_BUILD_DIR
)/tools
/gct.pl \
212 $(PKG_BUILD_DIR
)/ddr_settings
$(PKG_BUILD_DIR
)/u-boot.srec \
213 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.asc
216 define Package
/uboot
/install/template
217 define Package
/uboot-lantiq-
$(1)/install
218 $(call Package
/uboot
/install/default
,$(1),$(if
$(IMAGE
),$(IMAGE
),u-boot.bin
))
219 $(if
$(DDR_SETTINGS
), \
220 $(call Package
/uboot
/install/uart
,$(1),$(SOC
),$(DDR_SETTINGS
)) \
225 $(foreach u
,$(UBOOTS
), \
226 $(eval
$(call BuildUBootPackage
,$(u
))) \
227 $(eval
$(call Package
/uboot
/install/template
,$(u
))) \
228 $(eval
$(call BuildPackage
,uboot-lantiq-
$(u
))) \