2 # Copyright (C) 2013-2014 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
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
:=6d2116d1385a66e9a59742caa9d62a54
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 for the A10 OLinuXino LIME
31 define uboot
/A13-OLinuXino
32 TITLE
:=U-Boot for the A13 OlinuXino
35 define uboot
/A20-OLinuXino_MICRO
36 TITLE
:=U-Boot for A20 OLinuXino MICRO
40 TITLE
:=U-Boot for Bananapi
43 define uboot
/Cubieboard
44 TITLE
:=U-Boot for Cubieboard
47 define uboot
/Cubieboard2
48 TITLE
:=U-Boot for Cubieboard2
51 define uboot
/Cubietruck
52 TITLE
:=U-Boot for Cubietruck
55 define uboot
/Hackberry
56 TITLE
:=U-Boot for the Hackbeery
59 define uboot
/OLIMEX-A13-SOM
60 TITLE
:=U-Boot for the Olimex A13 SOM
64 TITLE
:=U-Boot for pcDuino
67 define uboot
/Linksprite_pcDuino3
68 TITLE
:=U-Boot for Linksprite pcDuino3
84 define Package
/uboot
/template
85 define Package
/uboot-sunxi-
$(1)
87 CATEGORY
:=Boot Loaders
88 DEPENDS
:=@TARGET_sunxi
90 URL
:=http
://www.denx.de
/wiki
/U-Boot
92 MAINTAINER
:=Zoltan HERPAI
<wigyori@uid0.hu
>
96 define BuildUBootPackage
97 $(eval
$(uboot
/Default
))
99 $(call Package
/uboot
/template
,$(1),$(TITLE
))
103 $(eval
$(call uboot
/$(BUILD_VARIANT
)))
104 UBOOT_CONFIG
:=$(if
$(CONFIG
),$(CONFIG
),$(BUILD_VARIANT
))
105 UBOOT_IMAGE
:=$(if
$(IMAGE
),$(IMAGE
),openwrt-
$(BOARD
)-$(BUILD_VARIANT
)-u-boot.bin
)
108 define Build
/Configure
109 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
110 USE_PRIVATE_LIBGCC
=yes
$(UBOOT_CONFIG
)_config
114 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
115 CROSS_COMPILE
=$(TARGET_CROSS
)
118 define Package
/uboot
/install/default
119 $(INSTALL_DIR
) $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)
120 $(CP
) $(PKG_BUILD_DIR
)/u-boot.bin \
121 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.bin
122 $(CP
) $(PKG_BUILD_DIR
)/spl
/sunxi-spl.bin \
123 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-spl.bin
124 $(CP
) $(PKG_BUILD_DIR
)/u-boot-sunxi-with-spl.bin \
125 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot-with-spl.bin
127 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-uEnv.txt
130 define Package
/uboot
/install/template
131 define Package
/uboot-sunxi-
$(1)/install
132 $(call Package
/uboot
/install/default
,$(2))
136 $(foreach u
,$(UBOOTS
), \
137 $(eval
$(call Package
/uboot
/install/template
,$(u
),$(u
))) \
140 $(foreach u
,$(UBOOTS
), \
141 $(eval
$(call BuildUBootPackage
,$(u
))) \
142 $(eval
$(call BuildPackage
,uboot-sunxi-
$(u
))) \