2 # Copyright (C) 2011 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
15 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18 http://mirror2.openwrt.org/sources \
19 ftp://ftp.denx.de/pub/u-boot
23 include $(INCLUDE_DIR)/package.mk
31 define uboot/omap3_overo
32 TITLE:=U-boot for the gumstix board
37 define Package/uboot/template
38 define Package/uboot-omap35xx-$(1)
40 CATEGORY:=Boot Loaders
41 DEPENDS:=@TARGET_omap35xx
43 URL:=http://www.denx.de/wiki/U-Boot
48 define BuildUbootPackage
49 $(eval $(uboot/Default))
51 $(call Package/uboot/template,$(1),$(TITLE))
56 $(eval $(call uboot/$(BUILD_VARIANT)))
57 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
58 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
62 $(call Build/Prepare/Default)
63 $(CP) ./files/* $(PKG_BUILD_DIR)
64 find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
67 define Build/Configure
68 $(MAKE) -C $(PKG_BUILD_DIR) \
69 $(UBOOT_CONFIG)_config
73 $(MAKE) -C $(PKG_BUILD_DIR) \
74 CROSS_COMPILE=$(TARGET_CROSS)
77 define Package/uboot/install/template
78 define Package/uboot-omap35xx-$(1)/install
80 $(CP) $(PKG_BUILD_DIR)/u-boot.bin $(BIN_DIR)/$(2)
84 $(foreach u,$(UBOOTS), \
85 $(eval $(call Package/uboot/install/template,$(u),openwrt-$(BOARD)-$(u)-u-boot.bin)) \
88 $(foreach u,$(UBOOTS), \
89 $(eval $(call BuildUbootPackage,$(u))) \
90 $(eval $(call BuildPackage,uboot-omap35xx-$(u))) \