2 # Copyright (C) 2012 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
9 include $(INCLUDE_DIR
)/kernel.mk
16 PKG_SOURCE_URL
:=git
://dev.phrozen.org
/uboot-upstream.git
17 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
18 PKG_SOURCE_VERSION
:=a0342fc87a884a2f60e2849bcd48fe366ccf9366
19 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.gz
22 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
24 include $(INCLUDE_DIR
)/package.mk
32 define uboot
/arv4519pw_ram
33 TITLE
:=U-Boot for Arcadyan arv4519pw
(RAM
)
34 DDR_SETTINGS
:=board
/arcadyan
/arv4519pw
/ddr_settings.h
37 define uboot
/arv4519pw_nor
38 TITLE
:=U-Boot for Arcadyan arv4519pw
(NOR
)
41 define uboot
/arv7518pw_ram
42 TITLE
:=U-Boot for Arcadyan arv7518pw
(RAM
)
43 DDR_SETTINGS
:=board
/arcadyan
/arv7518pw
/ddr_settings.h
46 define uboot
/arv7518pw_nor
47 TITLE
:=U-Boot for Arcadyan arv7518pw
(NOR
)
50 define uboot
/gigasx76x_ram
51 TITLE
:=U-Boot for Siemens Gigaset sx76x
(RAM
)
52 DDR_SETTINGS
:=board
/gigaset
/sx76x
/ddr_settings.h
55 define uboot
/gigasx76x_nor
56 TITLE
:=U-Boot for Siemens Gigaset sx76x
(NOR
)
60 arv4519pw_ram arv4519pw_nor \
61 arv7518pw_ram arv7518pw_nor \
62 gigasx76x_ram gigasx76x_nor
64 define Package
/uboot
/template
65 define Package
/uboot-lantiq-
$(1)
67 CATEGORY
:=Boot Loaders
68 DEPENDS
:=@TARGET_lantiq
70 URL
:=http
://www.denx.de
/wiki
/U-Boot
72 MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
76 define BuildUBootPackage
77 $(eval
$(uboot
/Default
))
79 $(call Package
/uboot
/template
,$(1),$(TITLE
))
82 $(eval
$(call uboot
/$(BUILD_VARIANT
)))
85 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(BUILD_VARIANT
) CROSS_COMPILE
=$(TARGET_CROSS
)
86 ifneq ($(DDR_SETTINGS
),)
87 awk
-f
$(PKG_BUILD_DIR
)/tools
/lantiq_ram_init_uart.awk
$(PKG_BUILD_DIR
)/$(DDR_SETTINGS
) > $(PKG_BUILD_DIR
)/$(BUILD_VARIANT
)_ddr_settings
88 perl
$(PKG_BUILD_DIR
)/tools
/gct.pl
$(PKG_BUILD_DIR
)/$(BUILD_VARIANT
)_ddr_settings
$(PKG_BUILD_DIR
)/u-boot.srec
$(PKG_BUILD_DIR
)/u-boot.asc
92 define Package
/uboot
/install/default
93 $(INSTALL_DIR
) $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)
94 $(CP
) $(PKG_BUILD_DIR
)/u-boot.bin \
95 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.bin
96 ifneq ($(DDR_SETTINGS
),)
97 $(CP
) $(PKG_BUILD_DIR
)/u-boot.asc \
98 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.asc
102 define Package
/uboot
/install/template
103 define Package
/uboot-lantiq-
$(1)/install
104 $(call Package
/uboot
/install/default
,$(2))
108 $(foreach u
,$(UBOOTS
), \
109 $(eval
$(call Package
/uboot
/install/template
,$(u
),$(u
))) \
112 $(foreach u
,$(UBOOTS
), \
113 $(eval
$(call BuildUBootPackage
,$(u
))) \
114 $(eval
$(call BuildPackage
,uboot-lantiq-
$(u
))) \