2 # Copyright (C) 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
11 PKG_VERSION
:=2014.01-rc1
12 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
14 http
://mirror2.openwrt.org
/sources \
15 ftp
://ftp.denx.de
/pub
/u-boot
16 PKG_SOURCE_VERSION
:=1552fe43c3e827d56c9cd212fba3dcba
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
19 include $(INCLUDE_DIR
)/package.mk
27 define uboot
/A10-OLinuXino-Lime
28 TITLE
:=U-Boot
2014.01-rc1 for the A10 OLinuXino LIME
31 define uboot
/A13-OLinuXino
32 TITLE
:=U-Boot
2014.01-rc1 for the A13 OlinuXino
35 define uboot
/A20-OLinuXino_MICRO
36 TITLE
:=U-Boot
2014.01-rc1 for A20 OLinuXino MICRO
39 define uboot
/Cubieboard
40 TITLE
:=U-Boot
2014.01-rc1 for Cubieboard
43 define uboot
/Cubieboard2
44 TITLE
:=U-Boot
2014.01-rc1 for Cubieboard2
47 define uboot
/Cubietruck
48 TITLE
:=U-Boot
2014.01-rc1 for Cubietruck
51 define uboot
/Hackberry
52 TITLE
:=U-Boot
2014.01-rc1 for the Hackbeery
56 TITLE
:=U-Boot
2014.01-rc1 for pcDuino
60 TITLE
:=U-Boot
2014.01-rc1 for pcDuino3
63 UBOOTS
:=A10-OLinuXino-Lime A13-OLinuXino A20-OLinuXino_MICRO Cubieboard Cubieboard2 Cubietruck Hackberry pcDuino pcDuino3
65 define Package
/uboot
/template
66 define Package
/uboot-sunxi-
$(1)
68 CATEGORY
:=Boot Loaders
69 DEPENDS
:=@TARGET_sunxi
71 URL
:=http
://www.denx.de
/wiki
/U-Boot
73 MAINTAINER
:=Zoltan HERPAI
<wigyori@uid0.hu
>
77 define BuildUBootPackage
78 $(eval
$(uboot
/Default
))
80 $(call Package
/uboot
/template
,$(1),$(TITLE
))
84 $(eval
$(call uboot
/$(BUILD_VARIANT
)))
85 UBOOT_CONFIG
:=$(if
$(CONFIG
),$(CONFIG
),$(BUILD_VARIANT
))
86 UBOOT_IMAGE
:=$(if
$(IMAGE
),$(IMAGE
),openwrt-
$(BOARD
)-$(BUILD_VARIANT
)-u-boot.bin
)
89 define Build
/Configure
90 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
91 USE_PRIVATE_LIBGCC
=yes
$(UBOOT_CONFIG
)_config
95 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
96 CROSS_COMPILE
=$(TARGET_CROSS
)
99 define Package
/uboot
/install/default
100 $(INSTALL_DIR
) $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)
101 $(CP
) $(PKG_BUILD_DIR
)/u-boot.bin \
102 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.bin
103 $(CP
) $(PKG_BUILD_DIR
)/spl
/sunxi-spl.bin \
104 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-spl.bin
105 $(CP
) $(PKG_BUILD_DIR
)/u-boot-sunxi-with-spl.bin \
106 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot-with-spl.bin
108 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-uEnv.txt
111 define Package
/uboot
/install/template
112 define Package
/uboot-sunxi-
$(1)/install
113 $(call Package
/uboot
/install/default
,$(2))
117 $(foreach u
,$(UBOOTS
), \
118 $(eval
$(call Package
/uboot
/install/template
,$(u
),$(u
))) \
121 $(foreach u
,$(UBOOTS
), \
122 $(eval
$(call BuildUBootPackage
,$(u
))) \
123 $(eval
$(call BuildPackage
,uboot-sunxi-
$(u
))) \