2 # Copyright (C) 2010-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
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:=8655f63b1e5c4647295ac9ce44660be3
22 include $(INCLUDE_DIR)/package.mk
30 define uboot/sheevaplug
31 TITLE:=U-Boot for the SheevaPlug
35 TITLE:=U-Boot for the Seagate DockStar
39 TITLE:=U-Boot for the Iomega iConnect Wireless
43 TITLE:=U-Boot for the RaidSonic ICY BOX NAS6210 and NAS6220
46 UBOOTS:=sheevaplug dockstar iconnect ib62x0
48 define Package/uboot/template
49 define Package/uboot-kirkwood-$(1)
51 CATEGORY:=Boot Loaders
52 DEPENDS:=@TARGET_kirkwood
54 URL:=http://www.denx.de/wiki/U-Boot
59 define BuildUBootPackage
60 $(eval $(uboot/Default))
62 $(call Package/uboot/template,$(1),$(TITLE))
66 $(eval $(call uboot/$(BUILD_VARIANT)))
67 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
68 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
71 define Build/Configure
72 $(MAKE) -C $(PKG_BUILD_DIR) \
73 $(UBOOT_CONFIG)_config
77 $(MAKE) -C $(PKG_BUILD_DIR) \
79 CROSS_COMPILE=$(TARGET_CROSS)
82 define Package/uboot/install/default
83 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
84 $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
85 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
86 $(CP) $(PKG_BUILD_DIR)/u-boot.kwb \
87 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.kwb
88 $(INSTALL_DIR) $(BIN_DIR)/u-boot-kwboot/
89 $(CP) $(PKG_BUILD_DIR)/tools/kwboot \
90 $(BIN_DIR)/u-boot-kwboot/
93 define Package/uboot/install/template
94 define Package/uboot-kirkwood-$(1)/install
95 $(call Package/uboot/install/default,$(2))
99 $(foreach u,$(UBOOTS), \
100 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
103 $(foreach u,$(UBOOTS), \
104 $(eval $(call BuildUBootPackage,$(u))) \
105 $(eval $(call BuildPackage,uboot-kirkwood-$(u))) \