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
:=2013.10-rc2-sunxi
14 PKG_SOURCE_URL
:=git
://github.com
/linux-sunxi
/u-boot-sunxi
15 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_SOURCE_VERSION
:=8a4621c488f33089d831168bfa5bae210a5684c8
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.gz
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
20 include $(INCLUDE_DIR
)/package.mk
28 define uboot
/A13-OLinuXino
29 TITLE
:=U-Boot
2013.10-rc2 for the A13 Olinuxino
32 define uboot
/Hackberry
33 TITLE
:=U-Boot
2013.10-rc2 for the Hackbeery
36 define uboot
/Cubieboard
37 TITLE
:=U-Boot
2013.10-rc2 for Cubieboard
40 define uboot
/Cubieboard2
41 TITLE
:=U-Boot
2013.10-rc2 for Cubieboard2
44 define uboot
/A20-OLinuXino_MICRO
45 TITLE
:=U-Boot
2013.10-rc2 for A20 Olinuxino
48 UBOOTS
:=A13-OLinuXino Cubieboard Cubieboard2 A20-OLinuXino_MICRO Hackberry
50 define Package
/uboot
/template
51 define Package
/uboot-sunxi-
$(1)
53 CATEGORY
:=Boot Loaders
54 DEPENDS
:=@TARGET_sunxi
56 URL
:=http
://www.denx.de
/wiki
/U-Boot
58 MAINTAINER
:=Zoltan HERPAI
<wigyori@uid0.hu
>
62 define BuildUBootPackage
63 $(eval
$(uboot
/Default
))
65 $(call Package
/uboot
/template
,$(1),$(TITLE
))
69 $(eval
$(call uboot
/$(BUILD_VARIANT
)))
70 UBOOT_CONFIG
:=$(if
$(CONFIG
),$(CONFIG
),$(BUILD_VARIANT
))
71 UBOOT_IMAGE
:=$(if
$(IMAGE
),$(IMAGE
),openwrt-
$(BOARD
)-$(BUILD_VARIANT
)-u-boot.bin
)
74 define Build
/Configure
75 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
76 USE_PRIVATE_LIBGCC
=yes
$(UBOOT_CONFIG
)_config
80 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
81 CROSS_COMPILE
=$(TARGET_CROSS
)
84 define Package
/uboot
/install/default
85 $(INSTALL_DIR
) $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)
86 $(CP
) $(PKG_BUILD_DIR
)/u-boot.bin \
87 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.bin
88 $(CP
) $(PKG_BUILD_DIR
)/spl
/sunxi-spl.bin \
89 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-sunxi-spl.bin
90 $(CP
) $(PKG_BUILD_DIR
)/u-boot-sunxi-with-spl.bin \
91 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-sunxi-with-spl.bin
94 define Package
/uboot
/install/template
95 define Package
/uboot-sunxi-
$(1)/install
96 $(call Package
/uboot
/install/default
,$(2))
100 $(foreach u
,$(UBOOTS
), \
101 $(eval
$(call Package
/uboot
/install/template
,$(u
),$(u
))) \
104 $(foreach u
,$(UBOOTS
), \
105 $(eval
$(call BuildUBootPackage
,$(u
))) \
106 $(eval
$(call BuildPackage
,uboot-sunxi-
$(u
))) \