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
46 define BuildUBootPackage
47 $(eval $(uboot/Default))
49 $(call Package/uboot/template,$(1),$(TITLE))
53 $(eval $(call uboot/$(BUILD_VARIANT)))
54 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
55 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
58 define Build/Configure
59 $(MAKE) -C $(PKG_BUILD_DIR) \
60 $(UBOOT_CONFIG)_config
64 $(MAKE) -C $(PKG_BUILD_DIR) \
66 CROSS_COMPILE=$(TARGET_CROSS)
69 define Package/uboot/install/default
70 $(INSTALL_DIR) $(BIN_DIR)
71 $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
72 $(BIN_DIR)/openwrt-$(BOARD)-$(1)-u-boot.bin
75 define Package/uboot/install/template
76 define Package/uboot-pxa-$(1)/install
77 $(call Package/uboot/install/default,$(2))
81 $(foreach u,$(UBOOTS), \
82 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
85 $(foreach u,$(UBOOTS), \
86 $(eval $(call BuildUBootPackage,$(u))) \
87 $(eval $(call BuildPackage,uboot-pxa-$(u))) \