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
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 PKG_LICENSE
:=GPL-2.0 GPL-2.0
+
20 PKG_LICENSE_FILES
:=Licenses
/README
22 include $(INCLUDE_DIR
)/package.mk
30 define uboot
/A10-OLinuXino-Lime
31 TITLE
:=U-Boot
2014.04 for the A10 OLinuXino LIME
34 define uboot
/A13-OLinuXino
35 TITLE
:=U-Boot
2014.04 for the A13 OlinuXino
38 define uboot
/A20-OLinuXino_MICRO
39 TITLE
:=U-Boot
2014.04 for A20 OLinuXino MICRO
43 TITLE
:=U-Boot
2014.04 for Bananapi
46 define uboot
/Cubieboard
47 TITLE
:=U-Boot
2014.04 for Cubieboard
50 define uboot
/Cubieboard2
51 TITLE
:=U-Boot
2014.04 for Cubieboard2
54 define uboot
/Cubietruck
55 TITLE
:=U-Boot
2014.04 for Cubietruck
58 define uboot
/Hackberry
59 TITLE
:=U-Boot
2014.04 for the Hackbeery
62 define uboot
/OLIMEX-A13-SOM
63 TITLE
:=U-Boot
2014.04 for the Olimex A13 SOM
67 TITLE
:=U-Boot
2014.04 for pcDuino
70 define uboot
/Linksprite_pcDuino3
71 TITLE
:=U-Boot
2014.04 for Linksprite pcDuino3
74 UBOOTS
:=A10-OLinuXino-Lime A13-OLinuXino A20-OLinuXino_MICRO Bananapi Cubieboard Cubieboard2 Cubietruck Hackberry pcDuino Linksprite_pcDuino3 OLIMEX-A13-SOM
76 define Package
/uboot
/template
77 define Package
/uboot-sunxi-
$(1)
79 CATEGORY
:=Boot Loaders
80 DEPENDS
:=@TARGET_sunxi
82 URL
:=http
://www.denx.de
/wiki
/U-Boot
84 MAINTAINER
:=Zoltan HERPAI
<wigyori@uid0.hu
>
88 define BuildUBootPackage
89 $(eval
$(uboot
/Default
))
91 $(call Package
/uboot
/template
,$(1),$(TITLE
))
95 $(eval
$(call uboot
/$(BUILD_VARIANT
)))
96 UBOOT_CONFIG
:=$(if
$(CONFIG
),$(CONFIG
),$(BUILD_VARIANT
))
97 UBOOT_IMAGE
:=$(if
$(IMAGE
),$(IMAGE
),openwrt-
$(BOARD
)-$(BUILD_VARIANT
)-u-boot.bin
)
100 define Build
/Configure
101 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
102 USE_PRIVATE_LIBGCC
=yes
$(UBOOT_CONFIG
)_config
106 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
107 CROSS_COMPILE
=$(TARGET_CROSS
)
110 define Package
/uboot
/install/default
111 $(INSTALL_DIR
) $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)
112 $(CP
) $(PKG_BUILD_DIR
)/u-boot.bin \
113 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot.bin
114 $(CP
) $(PKG_BUILD_DIR
)/spl
/sunxi-spl.bin \
115 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-spl.bin
116 $(CP
) $(PKG_BUILD_DIR
)/u-boot-sunxi-with-spl.bin \
117 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-u-boot-with-spl.bin
119 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/openwrt-
$(BOARD
)-$(1)-uEnv.txt
122 define Package
/uboot
/install/template
123 define Package
/uboot-sunxi-
$(1)/install
124 $(call Package
/uboot
/install/default
,$(2))
128 $(foreach u
,$(UBOOTS
), \
129 $(eval
$(call Package
/uboot
/install/template
,$(u
),$(u
))) \
132 $(foreach u
,$(UBOOTS
), \
133 $(eval
$(call BuildUBootPackage
,$(u
))) \
134 $(eval
$(call BuildPackage
,uboot-sunxi-
$(u
))) \