2 # Copyright (C) 2012 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
9 include $(INCLUDE_DIR)/kernel.mk
12 PKG_VERSION:=2011.08.25
16 PKG_SOURCE_URL:=git://github.com/ashcharles/verdex-uboot.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=ca6bf3ef6ac5f5132a359b43dfa31e07076b74b7
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
21 include $(INCLUDE_DIR)/package.mk
30 TITLE:=U-Boot for the Gumstix Verdex
35 define Package/uboot/template
36 define Package/uboot-pxa-$(1)
38 CATEGORY:=Boot Loaders
41 URL:=http://www.denx.de/wiki/U-Boot
43 MAINTAINER:=Florian Fainelli <florian@openwrt.org>
47 define BuildUBootPackage
48 $(eval $(uboot/Default))
50 $(call Package/uboot/template,$(1),$(TITLE))
54 $(eval $(call uboot/$(BUILD_VARIANT)))
55 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
56 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
59 define Build/Configure
60 $(MAKE) -C $(PKG_BUILD_DIR) \
61 $(UBOOT_CONFIG)_config
65 $(MAKE) -C $(PKG_BUILD_DIR) \
67 CROSS_COMPILE=$(TARGET_CROSS)
70 define Package/uboot/install/default
71 $(INSTALL_DIR) $(BIN_DIR)
72 $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
73 $(BIN_DIR)/openwrt-$(BOARD)-$(1)-u-boot.bin
76 define Package/uboot/install/template
77 define Package/uboot-pxa-$(1)/install
78 $(call Package/uboot/install/default,$(2))
82 $(foreach u,$(UBOOTS), \
83 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
86 $(foreach u,$(UBOOTS), \
87 $(eval $(call BuildUBootPackage,$(u))) \
88 $(eval $(call BuildPackage,uboot-pxa-$(u))) \