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:=21bf962d69938ed4ed783b792b2b074e
19 include $(INCLUDE_DIR)/package.mk
27 define uboot/wandboard_solo
28 TITLE:=U-Boot for the Wandboard Solo
31 define uboot/wandboard_dl
32 TITLE:=U-Boot for the Wandboard Dual Lite
39 define Package/uboot/template
40 define Package/uboot-imx6-$(1)
42 CATEGORY:=Boot Loaders
45 URL:=http://www.denx.de/wiki/U-Boot
47 MAINTAINER:=Luka Perkov <luka@openwrt.org>
51 define BuildUBootPackage
52 $(eval $(uboot/Default))
54 $(call Package/uboot/template,$(1),$(TITLE))
58 $(eval $(call uboot/$(BUILD_VARIANT)))
59 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
60 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
63 define Build/Configure
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 $(UBOOT_CONFIG)_config
69 $(MAKE) -C $(PKG_BUILD_DIR) \
70 CROSS_COMPILE=$(TARGET_CROSS)
73 define Package/uboot/install/default
74 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
76 $(PKG_BUILD_DIR)/u-boot.imx \
77 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.imx
80 define Package/uboot/install/template
81 define Package/uboot-imx6-$(1)/install
82 $(call Package/uboot/install/default,$(2))
86 $(foreach u,$(UBOOTS), \
87 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
90 $(foreach u,$(UBOOTS), \
91 $(eval $(call BuildUBootPackage,$(u))) \
92 $(eval $(call BuildPackage,uboot-imx6-$(u))) \