2 # Copyright (C) 2013-2016 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
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 http://mirror2.openwrt.org/sources \
18 ftp://ftp.denx.de/pub/u-boot
19 PKG_MD5SUM:=7d4f65fd43d4d706f5c5650e020d899d
21 PKG_LICENSE:=GPL-2.0 GPL-2.0+
22 PKG_LICENSE_FILES:=Licenses/README
24 include $(INCLUDE_DIR)/package.mk
32 define uboot/mx23_olinuxino
33 TITLE:=U-Boot 2016.01 for the Olinuxino i.MX233
37 TITLE:=U-Boot 2016.01 for the I2SE Duckbill
44 define Package/uboot/template
45 define Package/uboot-mxs-$(1)
47 CATEGORY:=Boot Loaders
50 URL:=http://www.denx.de/wiki/U-Boot
52 MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
56 define BuildUBootPackage
57 $(eval $(uboot/Default))
59 $(call Package/uboot/template,$(1),$(TITLE))
63 $(eval $(call uboot/$(BUILD_VARIANT)))
64 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
65 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),u-boot.sb)
68 define Build/Configure
69 $(MAKE) -C $(PKG_BUILD_DIR) \
70 $(UBOOT_CONFIG)_config
74 $(MAKE) -C $(PKG_BUILD_DIR) \
75 CROSS_COMPILE=$(TARGET_CROSS) $(UBOOT_IMAGE)
78 define Package/uboot/install/default
79 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
80 $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb
83 define Package/uboot/install/template
84 define Package/uboot-mxs-$(1)/install
85 $(call Package/uboot/install/default,$(2))
89 $(foreach u,$(UBOOTS), \
90 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
93 $(foreach u,$(UBOOTS), \
94 $(eval $(call BuildUBootPackage,$(u))) \
95 $(eval $(call BuildPackage,uboot-mxs-$(u))) \