2013-11-13 10:49:22 +00:00
|
|
|
#
|
2014-11-06 00:05:10 +00:00
|
|
|
# Copyright (C) 2013-2014 OpenWrt.org
|
2013-11-13 10:49:22 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=u-boot
|
2014-09-06 15:18:40 +00:00
|
|
|
PKG_VERSION:=2014.04
|
2014-03-05 23:16:18 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:= \
|
|
|
|
http://mirror2.openwrt.org/sources \
|
|
|
|
ftp://ftp.denx.de/pub/u-boot
|
2014-09-06 15:18:40 +00:00
|
|
|
PKG_SOURCE_VERSION:=6d2116d1385a66e9a59742caa9d62a54
|
2013-11-13 10:49:22 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define uboot/Default
|
|
|
|
TITLE:=
|
|
|
|
CONFIG:=
|
|
|
|
IMAGE:=
|
|
|
|
endef
|
|
|
|
|
2014-01-11 17:17:17 +00:00
|
|
|
define uboot/A10-OLinuXino-Lime
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for the A10 OLinuXino LIME
|
2014-01-11 17:17:17 +00:00
|
|
|
endef
|
|
|
|
|
2013-11-13 10:49:22 +00:00
|
|
|
define uboot/A13-OLinuXino
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for the A13 OlinuXino
|
2013-11-13 10:49:22 +00:00
|
|
|
endef
|
|
|
|
|
2014-01-12 19:16:35 +00:00
|
|
|
define uboot/A20-OLinuXino_MICRO
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for A20 OLinuXino MICRO
|
2013-11-13 10:49:22 +00:00
|
|
|
endef
|
|
|
|
|
2014-09-06 15:18:40 +00:00
|
|
|
define uboot/Bananapi
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for Bananapi
|
2014-06-01 18:47:14 +00:00
|
|
|
endef
|
|
|
|
|
2013-11-13 10:49:22 +00:00
|
|
|
define uboot/Cubieboard
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for Cubieboard
|
2013-11-13 10:49:22 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define uboot/Cubieboard2
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for Cubieboard2
|
2013-11-13 10:49:22 +00:00
|
|
|
endef
|
|
|
|
|
2014-01-12 19:16:35 +00:00
|
|
|
define uboot/Cubietruck
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for Cubietruck
|
2014-01-12 19:16:35 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define uboot/Hackberry
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for the Hackbeery
|
2013-11-13 10:49:22 +00:00
|
|
|
endef
|
|
|
|
|
2014-09-28 23:20:36 +00:00
|
|
|
define uboot/OLIMEX-A13-SOM
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for the Olimex A13 SOM
|
2014-09-28 23:20:36 +00:00
|
|
|
endef
|
|
|
|
|
2014-01-04 10:09:52 +00:00
|
|
|
define uboot/pcDuino
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for pcDuino
|
2014-01-04 10:09:52 +00:00
|
|
|
endef
|
|
|
|
|
2014-09-06 15:18:40 +00:00
|
|
|
define uboot/Linksprite_pcDuino3
|
2014-11-06 00:05:10 +00:00
|
|
|
TITLE:=U-Boot for Linksprite pcDuino3
|
2014-04-30 19:37:56 +00:00
|
|
|
endef
|
|
|
|
|
2014-11-06 00:05:10 +00:00
|
|
|
UBOOTS:= \
|
|
|
|
A10-OLinuXino-Lime \
|
|
|
|
A13-OLinuXino \
|
|
|
|
A20-OLinuXino_MICRO \
|
|
|
|
Bananapi \
|
|
|
|
Cubieboard \
|
|
|
|
Cubieboard2 \
|
|
|
|
Cubietruck \
|
|
|
|
Hackberry \
|
|
|
|
OLIMEX-A13-SOM \
|
|
|
|
pcDuino \
|
|
|
|
Linksprite_pcDuino3 \
|
2013-11-13 10:49:22 +00:00
|
|
|
|
|
|
|
define Package/uboot/template
|
|
|
|
define Package/uboot-sunxi-$(1)
|
|
|
|
SECTION:=boot
|
|
|
|
CATEGORY:=Boot Loaders
|
|
|
|
DEPENDS:=@TARGET_sunxi
|
|
|
|
TITLE:=$(2)
|
|
|
|
URL:=http://www.denx.de/wiki/U-Boot
|
|
|
|
VARIANT:=$(1)
|
|
|
|
MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
|
|
|
|
endef
|
|
|
|
endef
|
|
|
|
|
|
|
|
define BuildUBootPackage
|
|
|
|
$(eval $(uboot/Default))
|
|
|
|
$(eval $(uboot/$(1)))
|
|
|
|
$(call Package/uboot/template,$(1),$(TITLE))
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifdef BUILD_VARIANT
|
|
|
|
$(eval $(call uboot/$(BUILD_VARIANT)))
|
|
|
|
UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
|
|
|
|
UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
|
|
|
|
endif
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2013-11-29 10:59:51 +00:00
|
|
|
USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_config
|
2013-11-13 10:49:22 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
CROSS_COMPILE=$(TARGET_CROSS)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uboot/install/default
|
|
|
|
$(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/u-boot.bin \
|
|
|
|
$(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \
|
2014-01-31 15:53:53 +00:00
|
|
|
$(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-spl.bin
|
2013-11-13 10:49:22 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
|
2014-01-31 15:53:53 +00:00
|
|
|
$(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-with-spl.bin
|
|
|
|
$(CP) uEnv.txt \
|
|
|
|
$(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt
|
2013-11-13 10:49:22 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uboot/install/template
|
|
|
|
define Package/uboot-sunxi-$(1)/install
|
|
|
|
$(call Package/uboot/install/default,$(2))
|
|
|
|
endef
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach u,$(UBOOTS), \
|
|
|
|
$(eval $(call Package/uboot/install/template,$(u),$(u))) \
|
|
|
|
)
|
|
|
|
|
|
|
|
$(foreach u,$(UBOOTS), \
|
|
|
|
$(eval $(call BuildUBootPackage,$(u))) \
|
|
|
|
$(eval $(call BuildPackage,uboot-sunxi-$(u))) \
|
|
|
|
)
|