2 # Copyright (C) 2013 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:=a076a044b64371edc52f7e562b13f6b2
21 include $(INCLUDE_DIR)/package.mk
29 define uboot/nitrogen6dl
30 TITLE:=U-Boot for Nitrogen6x i.MX6Dual-Lite 1GB board
33 define uboot/nitrogen6dl2g
34 TITLE:=U-Boot for Nitrogen6x i.MX6Dual-Lite 2GB board
37 define uboot/nitrogen6q
38 TITLE:=U-Boot for Nitrogen6x/SABRE Lite (MX6Q/1GB)
41 define uboot/nitrogen6q2g
42 TITLE:=U-Boot for Nitrogen6x i.MX6Quad 2GB board
45 define uboot/nitrogen6s
46 TITLE:=U-Boot for Nitrogen6x i.MX6Solo 512MB board
49 define uboot/nitrogen6s1g
50 TITLE:=U-Boot for Nitrogen6x i.MX6Solo 1GB board
53 define uboot/wandboard_dl
54 TITLE:=U-Boot for the Wandboard Dual Lite
57 define uboot/wandboard_quad
58 TITLE:=U-Boot for the Wandboard Quad
61 define uboot/wandboard_solo
62 TITLE:=U-Boot for the Wandboard Solo
76 define Package/uboot/template
77 define Package/uboot-imx6-$(1)
79 CATEGORY:=Boot Loaders
82 URL:=http://www.denx.de/wiki/U-Boot
84 MAINTAINER:=Luka Perkov <luka@openwrt.org>
88 define BuildUBootPackage
89 $(eval $(uboot/Default))
91 $(call Package/uboot/template,$(1),$(TITLE))
95 $(eval $(call uboot/$(BUILD_VARIANT)))
96 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
97 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
100 define Build/Configure
101 $(MAKE) -C $(PKG_BUILD_DIR) $(UBOOT_CONFIG)_config
105 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS)
108 define Package/uboot/install/default
109 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
111 $(PKG_BUILD_DIR)/u-boot.imx \
112 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.imx
115 define Package/uboot/install/template
116 define Package/uboot-imx6-$(1)/install
117 $(call Package/uboot/install/default,$(2))
121 $(foreach u,$(UBOOTS), \
122 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
125 $(foreach u,$(UBOOTS), \
126 $(eval $(call BuildUBootPackage,$(u))) \
127 $(eval $(call BuildPackage,uboot-imx6-$(u))) \