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
16 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
17 PKG_MD5SUM:=8445162690052e6afd4b8f87af2bb557
19 include $(INCLUDE_DIR)/package.mk
27 define uboot/wandboard_dl
28 TITLE:=U-Boot for the Wandboard Dual Lite
31 define uboot/wandboard_quad
32 TITLE:=U-Boot for the Wandboard Quad
35 define uboot/wandboard_solo
36 TITLE:=U-Boot for the Wandboard Solo
44 define Package/uboot/template
45 define Package/uboot-imx6-$(1)
47 CATEGORY:=Boot Loaders
50 URL:=http://www.denx.de/wiki/U-Boot
52 MAINTAINER:=Luka Perkov <luka@openwrt.org>
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),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
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)
78 define Package/uboot/install/default
79 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
81 $(PKG_BUILD_DIR)/u-boot.imx \
82 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.imx
85 define Package/uboot/install/template
86 define Package/uboot-imx6-$(1)/install
87 $(call Package/uboot/install/default,$(2))
91 $(foreach u,$(UBOOTS), \
92 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
95 $(foreach u,$(UBOOTS), \
96 $(eval $(call BuildUBootPackage,$(u))) \
97 $(eval $(call BuildPackage,uboot-imx6-$(u))) \