2 # Copyright (C) 2013-2014 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:=6d2116d1385a66e9a59742caa9d62a54
23 include $(INCLUDE_DIR)/package.mk
31 define uboot/nitrogen6dl
32 TITLE:=U-Boot for Nitrogen6x i.MX6Dual-Lite 1GB board
35 define uboot/nitrogen6dl2g
36 TITLE:=U-Boot for Nitrogen6x i.MX6Dual-Lite 2GB board
39 define uboot/nitrogen6q
40 TITLE:=U-Boot for Nitrogen6x/SABRE Lite (MX6Q/1GB)
43 define uboot/nitrogen6q2g
44 TITLE:=U-Boot for Nitrogen6x i.MX6Quad 2GB board
47 define uboot/nitrogen6s
48 TITLE:=U-Boot for Nitrogen6x i.MX6Solo 512MB board
51 define uboot/nitrogen6s1g
52 TITLE:=U-Boot for Nitrogen6x i.MX6Solo 1GB board
55 define uboot/wandboard_dl
56 TITLE:=U-Boot for the Wandboard Dual Lite
59 define uboot/wandboard_quad
60 TITLE:=U-Boot for the Wandboard Quad
63 define uboot/wandboard_solo
64 TITLE:=U-Boot for the Wandboard Solo
78 define Package/uboot/template
79 define Package/uboot-imx6-$(1)
81 CATEGORY:=Boot Loaders
84 URL:=http://www.denx.de/wiki/U-Boot
86 MAINTAINER:=Luka Perkov <luka@openwrt.org>
90 define BuildUBootPackage
91 $(eval $(uboot/Default))
93 $(call Package/uboot/template,$(1),$(TITLE))
97 $(eval $(call uboot/$(BUILD_VARIANT)))
98 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
99 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
102 define Build/Configure
103 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
104 $(UBOOT_CONFIG)_config
108 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
109 CROSS_COMPILE=$(TARGET_CROSS)
112 define Package/uboot/install/default
113 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
115 $(PKG_BUILD_DIR)/u-boot.imx \
116 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.imx
119 define Package/uboot/install/template
120 define Package/uboot-imx6-$(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-imx6-$(u))) \