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:=3ddcaee2f05b7c464778112ec83664b5
22 PKG_LICENSE:=GPL-2.0 GPL-2.0+
23 PKG_LICENSE_FILES:=Licenses/README
27 include $(INCLUDE_DIR)/package.mk
34 TITLE:=U-Boot for Seagate DockStar
37 define uboot/dockstar_second_stage
38 TITLE:=second stage U-Boot for Seagate DockStar
41 define uboot/goflexhome
42 TITLE:=U-Boot for the Seagate GoFlexHome/GoFlexNet
46 TITLE:=U-Boot for RaidSonic ICY BOX NAS6210 and NAS6220
49 define uboot/ib62x0_second_stage
50 TITLE:=second stage U-Boot for RaidSonic ICY BOX NAS6210 and NAS6220
54 TITLE:=U-Boot for Iomega iConnect Wireless
57 define uboot/iconnect_second_stage
58 TITLE:=second stage U-Boot for Iomega iConnect Wireless
62 TITLE:=U-Boot for Cloud Engines Pogoplug E02
65 define uboot/pogo_e02_second_stage
66 TITLE:=second stage U-Boot for Cloud Engines Pogoplug E02
69 define uboot/sheevaplug
70 TITLE:=U-Boot for SheevaPlug
74 dockstar dockstar_second_stage \
76 ib62x0 ib62x0_second_stage \
77 iconnect iconnect_second_stage \
78 pogo_e02 pogo_e02_second_stage \
81 define Package/uboot/template
82 define Package/uboot-kirkwood-$(1)
84 CATEGORY:=Boot Loaders
85 DEPENDS:=@TARGET_kirkwood
87 URL:=http://www.denx.de/wiki/U-Boot
92 define BuildUBootPackage
93 $(eval $(uboot/Default))
95 $(call Package/uboot/template,$(1),$(TITLE))
98 define Build/Configure
99 $(if $(findstring _second_stage,$(BUILD_VARIANT)),
101 $(PKG_BUILD_DIR)/configs/$(subst _second_stage,,$(BUILD_VARIANT))_defconfig \
102 $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
103 echo CONFIG_SECOND_STAGE=y >> $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
105 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
106 $(BUILD_VARIANT)_config V=1
110 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
112 CROSS_COMPILE=$(TARGET_CROSS)
113 mkimage -A $(ARCH) -O linux -T kernel -C none \
114 -a 0x600000 -e 0x600000 \
115 -n 'OpenWrt Das U-Boot uImage' \
116 -d $(PKG_BUILD_DIR)/u-boot.bin $(PKG_BUILD_DIR)/u-boot.img
119 define Package/uboot/install/default
120 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
121 $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
122 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
123 $(CP) $(PKG_BUILD_DIR)/u-boot.kwb \
124 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.kwb
125 $(CP) $(PKG_BUILD_DIR)/u-boot.img \
126 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.img
127 $(INSTALL_DIR) $(BIN_DIR)/u-boot-kwboot/
128 $(CP) $(PKG_BUILD_DIR)/tools/kwboot \
129 $(BIN_DIR)/u-boot-kwboot/
132 define Package/uboot/install/template
133 define Package/uboot-kirkwood-$(1)/install
134 $(call Package/uboot/install/default,$(2))
138 $(foreach u,$(UBOOTS), \
139 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
142 $(foreach u,$(UBOOTS), \
143 $(eval $(call BuildUBootPackage,$(u))) \
144 $(eval $(call BuildPackage,uboot-kirkwood-$(u))) \