2 # Copyright (C) 2010-2014 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:=36d4bad687edcafa396fee607e505d4e
24 include $(INCLUDE_DIR)/package.mk
33 TITLE:=U-Boot for Seagate DockStar
36 define uboot/dockstar_second_stage
37 TITLE:=second stage U-Boot for Seagate DockStar
40 define uboot/goflexhome
41 TITLE:=U-Boot for the Seagate GoFlexHome/GoFlexNet
45 TITLE:=U-Boot for RaidSonic ICY BOX NAS6210 and NAS6220
48 define uboot/ib62x0_second_stage
49 TITLE:=second stage U-Boot for RaidSonic ICY BOX NAS6210 and NAS6220
53 TITLE:=U-Boot for Iomega iConnect Wireless
56 define uboot/iconnect_second_stage
57 TITLE:=second stage U-Boot for Iomega iConnect Wireless
61 TITLE:=U-Boot for Cloud Engines Pogoplug E02
64 define uboot/pogo_e02_second_stage
65 TITLE:=second stage U-Boot for Cloud Engines Pogoplug E02
68 define uboot/sheevaplug
69 TITLE:=U-Boot for SheevaPlug
73 dockstar dockstar_second_stage \
75 ib62x0 ib62x0_second_stage \
76 iconnect iconnect_second_stage \
77 pogo_e02 pogo_e02_second_stage \
80 define Package/uboot/template
81 define Package/uboot-kirkwood-$(1)
83 CATEGORY:=Boot Loaders
84 DEPENDS:=@TARGET_kirkwood
86 URL:=http://www.denx.de/wiki/U-Boot
91 define BuildUBootPackage
92 $(eval $(uboot/Default))
94 $(call Package/uboot/template,$(1),$(TITLE))
98 $(eval $(call uboot/$(BUILD_VARIANT)))
99 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
100 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
103 define Build/Configure
104 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
105 $(UBOOT_CONFIG)_config
109 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
111 CROSS_COMPILE=$(TARGET_CROSS)
112 mkimage -A $(ARCH) -O linux -T kernel -C none \
113 -a 0x600000 -e 0x600000 \
114 -n 'OpenWrt Das U-Boot uImage' \
115 -d $(PKG_BUILD_DIR)/u-boot.bin $(PKG_BUILD_DIR)/u-boot.img
118 define Package/uboot/install/default
119 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
120 $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
121 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
122 $(CP) $(PKG_BUILD_DIR)/u-boot.kwb \
123 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.kwb
124 $(CP) $(PKG_BUILD_DIR)/u-boot.img \
125 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.img
126 $(INSTALL_DIR) $(BIN_DIR)/u-boot-kwboot/
127 $(CP) $(PKG_BUILD_DIR)/tools/kwboot \
128 $(BIN_DIR)/u-boot-kwboot/
131 define Package/uboot/install/template
132 define Package/uboot-kirkwood-$(1)/install
133 $(call Package/uboot/install/default,$(2))
137 $(foreach u,$(UBOOTS), \
138 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
141 $(foreach u,$(UBOOTS), \
142 $(eval $(call BuildUBootPackage,$(u))) \
143 $(eval $(call BuildPackage,uboot-kirkwood-$(u))) \