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:=8445162690052e6afd4b8f87af2bb557
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) \
102 $(UBOOT_CONFIG)_config
106 $(MAKE) -C $(PKG_BUILD_DIR) \
107 CROSS_COMPILE=$(TARGET_CROSS)
110 define Package/uboot/install/default
111 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
113 $(PKG_BUILD_DIR)/u-boot.imx \
114 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.imx
117 define Package/uboot/install/template
118 define Package/uboot-imx6-$(1)/install
119 $(call Package/uboot/install/default,$(2))
123 $(foreach u,$(UBOOTS), \
124 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
127 $(foreach u,$(UBOOTS), \
128 $(eval $(call BuildUBootPackage,$(u))) \
129 $(eval $(call BuildPackage,uboot-imx6-$(u))) \