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_MD5SUM:=a076a044b64371edc52f7e562b13f6b2
22 PKG_LICENSE:=GPL-2.0 GPL-2.0+
23 PKG_LICENSE_FILES:=Licenses/README
25 include $(INCLUDE_DIR)/package.mk
33 define uboot/omap4_panda
34 TITLE:=U-Boot for the Pandaboard
37 define uboot/am335x_evm
38 TITLE:=U-Boot for the AM335x EVM
41 define uboot/omap3_overo
42 TITLE:=U-Boot for the Gumstix Overo
45 define uboot/omap3_beagle
46 TITLE:=U-Boot for the BeagleBoard
49 UBOOTS:=omap4_panda am335x_evm omap3_overo omap3_beagle
51 define Package/uboot/template
52 define Package/uboot-omap-$(1)
54 CATEGORY:=Boot Loaders
57 URL:=http://www.denx.de/wiki/U-Boot
63 define BuildUBootPackage
64 $(eval $(uboot/Default))
66 $(call Package/uboot/template,$(1),$(TITLE))
70 $(eval $(call uboot/$(BUILD_VARIANT)))
71 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
72 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.img)
75 define Build/Configure
76 $(MAKE) -C $(PKG_BUILD_DIR) \
77 USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_config
81 $(MAKE) -C $(PKG_BUILD_DIR) \
82 CROSS_COMPILE=$(TARGET_CROSS)
85 define Package/uboot/install/default
86 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
87 $(CP) $(PKG_BUILD_DIR)/u-boot.img $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.img
88 $(CP) $(PKG_BUILD_DIR)/MLO $(BIN_DIR)/uboot-$(BOARD)-$(1)/MLO
91 define Package/uboot/install/template
92 define Package/uboot-omap-$(1)/install
93 $(call Package/uboot/install/default,$(2))
97 $(foreach u,$(UBOOTS), \
98 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
101 $(foreach u,$(UBOOTS), \
102 $(eval $(call BuildUBootPackage,$(u))) \
103 $(eval $(call BuildPackage,uboot-omap-$(u))) \