2 # Copyright (C) 2012-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
17 http://mirror2.openwrt.org/sources \
18 ftp://ftp.denx.de/pub/u-boot
19 PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
21 PKG_LICENSE:=GPL-2.0 GPL-2.0+
22 PKG_LICENSE_FILES:=Licenses/README
24 include $(INCLUDE_DIR)/package.mk
32 define uboot/omap4_panda
33 TITLE:=U-Boot for the Pandaboard
36 define uboot/am335x_evm
37 TITLE:=U-Boot for the AM335x EVM
40 define uboot/omap3_overo
41 TITLE:=U-Boot for the Gumstix Overo
44 define uboot/omap3_beagle
45 TITLE:=U-Boot for the BeagleBoard
48 UBOOTS:=omap4_panda am335x_evm omap3_overo omap3_beagle
50 define Package/uboot/template
51 define Package/uboot-omap-$(1)
53 CATEGORY:=Boot Loaders
56 URL:=http://www.denx.de/wiki/U-Boot
62 define BuildUBootPackage
63 $(eval $(uboot/Default))
65 $(call Package/uboot/template,$(1),$(TITLE))
69 $(eval $(call uboot/$(BUILD_VARIANT)))
70 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
71 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.img)
74 define Build/Configure
75 $(MAKE) -C $(PKG_BUILD_DIR) \
76 USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_config
80 $(MAKE) -C $(PKG_BUILD_DIR) \
81 CROSS_COMPILE=$(TARGET_CROSS)
84 define Package/uboot/install/default
85 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
86 $(CP) $(PKG_BUILD_DIR)/u-boot.img $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.img
87 $(CP) $(PKG_BUILD_DIR)/MLO $(BIN_DIR)/uboot-$(BOARD)-$(1)/MLO
90 define Package/uboot/install/template
91 define Package/uboot-omap-$(1)/install
92 $(call Package/uboot/install/default,$(2))
96 $(foreach u,$(UBOOTS), \
97 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
100 $(foreach u,$(UBOOTS), \
101 $(eval $(call BuildUBootPackage,$(u))) \
102 $(eval $(call BuildPackage,uboot-omap-$(u))) \