2013-11-13 18:49:22 +08:00
|
|
|
#
|
2016-01-16 04:27:32 +08:00
|
|
|
# Copyright (C) 2013-2016 OpenWrt.org
|
2013-11-13 18:49:22 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
2015-08-01 05:58:31 +08:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2013-11-13 18:49:22 +08:00
|
|
|
|
|
|
|
PKG_NAME:=u-boot
|
2016-03-29 19:42:14 +08:00
|
|
|
PKG_VERSION:=2016.03
|
2014-03-06 07:16:18 +08:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:= \
|
|
|
|
http://mirror2.openwrt.org/sources \
|
|
|
|
ftp://ftp.denx.de/pub/u-boot
|
2015-01-19 00:42:42 +08:00
|
|
|
|
2016-03-29 19:42:14 +08:00
|
|
|
PKG_MD5SUM:=973c1d896be751321cc3aafa564f64b2
|
2015-01-19 00:42:42 +08:00
|
|
|
|
2015-08-15 22:34:42 +08:00
|
|
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
2013-11-13 18:49:22 +08:00
|
|
|
|
2014-11-30 07:45:53 +08:00
|
|
|
PKG_LICENSE:=GPL-2.0 GPL-2.0+
|
|
|
|
PKG_LICENSE_FILES:=Licenses/README
|
|
|
|
|
2013-11-13 18:49:22 +08:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define uboot/Default
|
|
|
|
TITLE:=
|
|
|
|
CONFIG:=
|
|
|
|
IMAGE:=
|
|
|
|
endef
|
|
|
|
|
2014-01-12 01:17:17 +08:00
|
|
|
define uboot/A10-OLinuXino-Lime
|
2014-11-06 08:05:10 +08:00
|
|
|
TITLE:=U-Boot for the A10 OLinuXino LIME
|
2014-01-12 01:17:17 +08:00
|
|
|
endef
|
|
|
|
|
2013-11-13 18:49:22 +08:00
|
|
|
define uboot/A13-OLinuXino
|
2014-11-06 08:05:10 +08:00
|
|
|
TITLE:=U-Boot for the A13 OlinuXino
|
2013-11-13 18:49:22 +08:00
|
|
|
endef
|
|
|
|
|
2015-01-10 03:19:35 +08:00
|
|
|
define uboot/A20-OLinuXino-Lime
|
2014-11-06 08:05:15 +08:00
|
|
|
TITLE:=U-Boot for the A20 OLinuXino LIME
|
|
|
|
endef
|
|
|
|
|
2014-01-13 03:16:35 +08:00
|
|
|
define uboot/A20-OLinuXino_MICRO
|
2014-11-06 08:05:10 +08:00
|
|
|
TITLE:=U-Boot for A20 OLinuXino MICRO
|
2013-11-13 18:49:22 +08:00
|
|
|
endef
|
|
|
|
|
2014-09-06 23:18:40 +08:00
|
|
|
define uboot/Bananapi
|
2014-11-06 08:05:10 +08:00
|
|
|
TITLE:=U-Boot for Bananapi
|
2014-06-02 02:47:14 +08:00
|
|
|
endef
|
|
|
|
|
2015-01-10 03:19:35 +08:00
|
|
|
define uboot/Bananapro
|
|
|
|
TITLE:=U-Boot for Bananapro
|
|
|
|
endef
|
|
|
|
|
2013-11-13 18:49:22 +08:00
|
|
|
define uboot/Cubieboard
|
2014-11-06 08:05:10 +08:00
|
|
|
TITLE:=U-Boot for Cubieboard
|
2013-11-13 18:49:22 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define uboot/Cubieboard2
|
2014-11-06 08:05:10 +08:00
|
|
|
TITLE:=U-Boot for Cubieboard2
|
2013-11-13 18:49:22 +08:00
|
|
|
endef
|
|
|
|
|
2014-01-13 03:16:35 +08:00
|
|
|
define uboot/Cubietruck
|
2014-11-06 08:05:10 +08:00
|
|
|
TITLE:=U-Boot for Cubietruck
|
2014-01-13 03:16:35 +08:00
|
|
|
endef
|
|
|
|
|
2015-12-22 21:04:31 +08:00
|
|
|
define uboot/Hummingbird_A31
|
|
|
|
TITLE:=U-Boot for the Hummingbird A31 board
|
|
|
|
endef
|
|
|
|
|
2015-01-10 03:19:35 +08:00
|
|
|
define uboot/Mele_M9
|
|
|
|
TITLE:=U-Boot for the Mele M9 (A31)
|
|
|
|
endef
|
|
|
|
|
2015-01-19 00:56:08 +08:00
|
|
|
define uboot/OLIMEX_A13_SOM
|
2014-11-06 08:05:10 +08:00
|
|
|
TITLE:=U-Boot for the Olimex A13 SOM
|
2014-09-29 07:20:36 +08:00
|
|
|
endef
|
|
|
|
|
2015-01-10 03:19:35 +08:00
|
|
|
define uboot/Linksprite_pcDuino
|
|
|
|
TITLE:=U-Boot for Linksprite pcDuino
|
2014-01-04 18:09:52 +08:00
|
|
|
endef
|
|
|
|
|
2014-09-06 23:18:40 +08:00
|
|
|
define uboot/Linksprite_pcDuino3
|
2014-11-06 08:05:10 +08:00
|
|
|
TITLE:=U-Boot for Linksprite pcDuino3
|
2014-05-01 03:37:56 +08:00
|
|
|
endef
|
|
|
|
|
2015-01-21 06:50:52 +08:00
|
|
|
define uboot/Lamobo_R1
|
|
|
|
TITLE:=U-Boot for Lamobo R1
|
|
|
|
endef
|
|
|
|
|
2016-03-29 19:42:14 +08:00
|
|
|
define uboot/pangolin
|
|
|
|
TITLE:=U-Boot for Theobroma A31-yQ7 devboard
|
|
|
|
endef
|
|
|
|
|
2015-12-22 21:04:31 +08:00
|
|
|
define uboot/orangepi_plus
|
|
|
|
TITLE:=U-Boot for Orange Pi Plus (H3)
|
|
|
|
endef
|
|
|
|
|
2014-11-06 08:05:10 +08:00
|
|
|
UBOOTS:= \
|
|
|
|
A10-OLinuXino-Lime \
|
|
|
|
A13-OLinuXino \
|
2015-01-10 03:19:35 +08:00
|
|
|
A20-OLinuXino-Lime \
|
2014-11-06 08:05:10 +08:00
|
|
|
A20-OLinuXino_MICRO \
|
|
|
|
Bananapi \
|
2015-01-10 03:19:35 +08:00
|
|
|
Bananapro \
|
2014-11-06 08:05:10 +08:00
|
|
|
Cubieboard \
|
|
|
|
Cubieboard2 \
|
|
|
|
Cubietruck \
|
2015-12-22 21:04:31 +08:00
|
|
|
Hummingbird_A31 \
|
2015-01-10 03:19:35 +08:00
|
|
|
Mele_M9 \
|
2015-01-19 00:56:08 +08:00
|
|
|
OLIMEX_A13_SOM \
|
2015-01-10 03:19:35 +08:00
|
|
|
Linksprite_pcDuino \
|
2014-11-06 08:05:10 +08:00
|
|
|
Linksprite_pcDuino3 \
|
2015-01-21 06:50:52 +08:00
|
|
|
Lamobo_R1 \
|
2016-03-29 19:42:14 +08:00
|
|
|
orangepi_plus \
|
|
|
|
pangolin
|
2013-11-13 18:49:22 +08: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
|
|
|
|
|
2016-03-29 19:42:14 +08:00
|
|
|
# check if any specialized uEnv bootconfig is required
|
|
|
|
ifeq ($(UBOOT_CONFIG),pangolin)
|
|
|
|
UENV:=pangolin
|
|
|
|
else
|
|
|
|
UENV:=default
|
|
|
|
endif
|
|
|
|
|
2013-11-13 18:49:22 +08:00
|
|
|
define Build/Configure
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2015-01-10 03:19:35 +08:00
|
|
|
USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_defconfig
|
2013-11-13 18:49:22 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2015-08-01 05:58:31 +08:00
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
DTCDIR=$(LINUX_DIR)/scripts/dtc/
|
2013-11-13 18:49:22 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uboot/install/default
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/u-boot.bin \
|
2015-08-15 22:34:42 +08:00
|
|
|
$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin
|
2013-11-13 18:49:22 +08:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \
|
2015-08-15 22:34:42 +08:00
|
|
|
$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin
|
2013-11-13 18:49:22 +08:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
|
2015-08-15 22:34:42 +08:00
|
|
|
$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin
|
2016-03-29 19:42:14 +08:00
|
|
|
$(CP) uEnv-$(UENV).txt \
|
2015-08-15 22:34:42 +08:00
|
|
|
$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt
|
|
|
|
mkimage -C none -A arm -T script -d $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt \
|
|
|
|
$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr
|
2013-11-13 18:49:22 +08: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))) \
|
|
|
|
)
|