2013-11-13 10:49:22 +00:00
|
|
|
#
|
2016-01-15 20:27:32 +00:00
|
|
|
# Copyright (C) 2013-2016 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
|
2015-07-31 21:58:31 +00:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2013-11-13 10:49:22 +00:00
|
|
|
|
|
|
|
PKG_NAME:=u-boot
|
2016-01-15 20:27:32 +00:00
|
|
|
PKG_VERSION:=2016.01
|
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
|
2015-01-18 16:42:42 +00:00
|
|
|
|
2016-01-15 20:27:32 +00:00
|
|
|
PKG_MD5SUM:=7d4f65fd43d4d706f5c5650e020d899d
|
2015-01-18 16:42:42 +00:00
|
|
|
|
2015-08-15 14:34:42 +00:00
|
|
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
2013-11-13 10:49:22 +00:00
|
|
|
|
2014-11-29 23:45:53 +00:00
|
|
|
PKG_LICENSE:=GPL-2.0 GPL-2.0+
|
|
|
|
PKG_LICENSE_FILES:=Licenses/README
|
|
|
|
|
2013-11-13 10:49:22 +00:00
|
|
|
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
|
|
|
|
|
2015-01-09 19:19:35 +00:00
|
|
|
define uboot/A20-OLinuXino-Lime
|
2014-11-06 00:05:15 +00:00
|
|
|
TITLE:=U-Boot for the A20 OLinuXino LIME
|
|
|
|
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
|
|
|
|
|
2015-01-09 19:19:35 +00:00
|
|
|
define uboot/Bananapro
|
|
|
|
TITLE:=U-Boot for Bananapro
|
|
|
|
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
|
|
|
|
|
2015-12-22 13:04:31 +00:00
|
|
|
define uboot/Hummingbird_A31
|
|
|
|
TITLE:=U-Boot for the Hummingbird A31 board
|
|
|
|
endef
|
|
|
|
|
2015-01-09 19:19:35 +00:00
|
|
|
define uboot/Mele_M9
|
|
|
|
TITLE:=U-Boot for the Mele M9 (A31)
|
|
|
|
endef
|
|
|
|
|
2015-01-18 16:56:08 +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
|
|
|
|
|
2015-01-09 19:19:35 +00:00
|
|
|
define uboot/Linksprite_pcDuino
|
|
|
|
TITLE:=U-Boot for Linksprite 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
|
|
|
|
|
2015-01-20 22:50:52 +00:00
|
|
|
define uboot/Lamobo_R1
|
|
|
|
TITLE:=U-Boot for Lamobo R1
|
|
|
|
endef
|
|
|
|
|
2015-12-22 13:04:31 +00:00
|
|
|
define uboot/orangepi_plus
|
|
|
|
TITLE:=U-Boot for Orange Pi Plus (H3)
|
|
|
|
endef
|
|
|
|
|
2014-11-06 00:05:10 +00:00
|
|
|
UBOOTS:= \
|
|
|
|
A10-OLinuXino-Lime \
|
|
|
|
A13-OLinuXino \
|
2015-01-09 19:19:35 +00:00
|
|
|
A20-OLinuXino-Lime \
|
2014-11-06 00:05:10 +00:00
|
|
|
A20-OLinuXino_MICRO \
|
|
|
|
Bananapi \
|
2015-01-09 19:19:35 +00:00
|
|
|
Bananapro \
|
2014-11-06 00:05:10 +00:00
|
|
|
Cubieboard \
|
|
|
|
Cubieboard2 \
|
|
|
|
Cubietruck \
|
2015-12-22 13:04:31 +00:00
|
|
|
Hummingbird_A31 \
|
2015-01-09 19:19:35 +00:00
|
|
|
Mele_M9 \
|
2015-01-18 16:56:08 +00:00
|
|
|
OLIMEX_A13_SOM \
|
2015-01-09 19:19:35 +00:00
|
|
|
Linksprite_pcDuino \
|
2014-11-06 00:05:10 +00:00
|
|
|
Linksprite_pcDuino3 \
|
2015-01-20 22:50:52 +00:00
|
|
|
Lamobo_R1 \
|
2015-12-22 13:04:31 +00:00
|
|
|
orangepi_plus
|
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) \
|
2015-01-09 19:19:35 +00:00
|
|
|
USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_defconfig
|
2013-11-13 10:49:22 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2015-07-31 21:58:31 +00:00
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
DTCDIR=$(LINUX_DIR)/scripts/dtc/
|
2013-11-13 10:49:22 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uboot/install/default
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/u-boot.bin \
|
2015-08-15 14:34:42 +00:00
|
|
|
$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin
|
2013-11-13 10:49:22 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \
|
2015-08-15 14:34:42 +00:00
|
|
|
$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin
|
2013-11-13 10:49:22 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
|
2015-08-15 14:34:42 +00:00
|
|
|
$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin
|
2014-01-31 15:53:53 +00:00
|
|
|
$(CP) uEnv.txt \
|
2015-08-15 14:34:42 +00: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 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))) \
|
|
|
|
)
|