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 include $(INCLUDE_DIR)/package.mk
27 define uboot/A10-OLinuXino-Lime
28 TITLE:=U-Boot 2014.04 for the A10 OLinuXino LIME
31 define uboot/A13-OLinuXino
32 TITLE:=U-Boot 2014.04 for the A13 OlinuXino
35 define uboot/A20-OLinuXino_MICRO
36 TITLE:=U-Boot 2014.04 for A20 OLinuXino MICRO
40 TITLE:=U-Boot 2014.04 for Bananapi
43 define uboot/Cubieboard
44 TITLE:=U-Boot 2014.04 for Cubieboard
47 define uboot/Cubieboard2
48 TITLE:=U-Boot 2014.04 for Cubieboard2
51 define uboot/Cubietruck
52 TITLE:=U-Boot 2014.04 for Cubietruck
55 define uboot/Hackberry
56 TITLE:=U-Boot 2014.04 for the Hackbeery
59 define uboot/OLIMEX-A13-SOM
60 TITLE:=U-Boot 2014.04 for the Olimex A13 SOM
64 TITLE:=U-Boot 2014.04 for pcDuino
67 define uboot/Linksprite_pcDuino3
68 TITLE:=U-Boot 2014.04 for Linksprite pcDuino3
71 UBOOTS:=A10-OLinuXino-Lime A13-OLinuXino A20-OLinuXino_MICRO Bananapi Cubieboard Cubieboard2 Cubietruck Hackberry pcDuino Linksprite_pcDuino3 OLIMEX-A13-SOM
73 define Package/uboot/template
74 define Package/uboot-sunxi-$(1)
76 CATEGORY:=Boot Loaders
77 DEPENDS:=@TARGET_sunxi
79 URL:=http://www.denx.de/wiki/U-Boot
81 MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
85 define BuildUBootPackage
86 $(eval $(uboot/Default))
88 $(call Package/uboot/template,$(1),$(TITLE))
92 $(eval $(call uboot/$(BUILD_VARIANT)))
93 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
94 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
97 define Build/Configure
98 $(MAKE) -C $(PKG_BUILD_DIR) \
99 USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_config
103 $(MAKE) -C $(PKG_BUILD_DIR) \
104 CROSS_COMPILE=$(TARGET_CROSS)
107 define Package/uboot/install/default
108 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
109 $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
110 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
111 $(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \
112 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-spl.bin
113 $(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
114 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-with-spl.bin
116 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt
119 define Package/uboot/install/template
120 define Package/uboot-sunxi-$(1)/install
121 $(call Package/uboot/install/default,$(2))
125 $(foreach u,$(UBOOTS), \
126 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
129 $(foreach u,$(UBOOTS), \
130 $(eval $(call BuildUBootPackage,$(u))) \
131 $(eval $(call BuildPackage,uboot-sunxi-$(u))) \