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
15 PKG_BUILD_DIR:=$(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
21 PKG_MD5SUM:=3ddcaee2f05b7c464778112ec83664b5
23 PKG_LICENSE:=GPL-2.0 GPL-2.0+
24 PKG_LICENSE_FILES:=Licenses/README
26 include $(INCLUDE_DIR)/package.mk
35 TITLE:=U-Boot for the Oxford/PLX NAS7820
40 define Package/uboot/template
41 define Package/uboot-oxnas-$(1)
43 CATEGORY:=Boot Loaders
44 DEPENDS:=@TARGET_oxnas
46 URL:=http://www.denx.de/wiki/U-Boot
48 MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
52 define BuildUBootPackage
53 $(eval $(uboot/Default))
55 $(call Package/uboot/template,$(1),$(TITLE))
59 $(eval $(call uboot/$(BUILD_VARIANT)))
60 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
61 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
65 $(call Build/Prepare/Default)
66 $(CP) ./files/* $(PKG_BUILD_DIR)
67 find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
70 define Build/Configure
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 $(UBOOT_CONFIG)_config
76 $(MAKE) -C $(PKG_BUILD_DIR) \
78 CROSS_COMPILE=$(TARGET_CROSS)
81 define Package/uboot/install/default
82 $(INSTALL_DIR) $(BIN_DIR)
83 $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
84 $(BIN_DIR)/openwrt-$(BOARD)-$(1)-u-boot.bin
87 define Package/uboot/install/template
88 define Package/uboot-oxnas-$(1)/install
89 $(call Package/uboot/install/default,$(2))
93 $(foreach u,$(UBOOTS), \
94 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
97 $(foreach u,$(UBOOTS), \
98 $(eval $(call BuildUBootPackage,$(u))) \
99 $(eval $(call BuildPackage,uboot-oxnas-$(u))) \