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
11 PKG_VERSION:=2016.09.01
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_HASH:=95728e89dd476d17428f94080752ab48884be477b6a678941582aeef618b70bb
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 Zyxel NSA310
66 TITLE:=U-Boot for Cloud Engines Pogoplug E02
69 define uboot/pogo_e02_second_stage
70 TITLE:=second stage U-Boot for Cloud Engines Pogoplug E02
73 define uboot/sheevaplug
74 TITLE:=U-Boot for SheevaPlug
78 dockstar dockstar_second_stage \
80 ib62x0 ib62x0_second_stage \
81 iconnect iconnect_second_stage \
83 pogo_e02 pogo_e02_second_stage \
86 define Package/uboot/template
87 define Package/uboot-kirkwood-$(1)
89 CATEGORY:=Boot Loaders
90 DEPENDS:=@TARGET_kirkwood
92 URL:=http://www.denx.de/wiki/U-Boot
97 define BuildUBootPackage
98 $(eval $(uboot/Default))
100 $(call Package/uboot/template,$(1),$(TITLE))
103 define Build/Configure
104 $(if $(findstring _second_stage,$(BUILD_VARIANT)),
106 $(PKG_BUILD_DIR)/configs/$(subst _second_stage,,$(BUILD_VARIANT))_defconfig \
107 $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
108 echo CONFIG_SECOND_STAGE=y >> $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
110 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
111 $(BUILD_VARIANT)_config V=1
115 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
117 CROSS_COMPILE=$(TARGET_CROSS)
118 mkimage -A $(ARCH) -O linux -T kernel -C none \
119 -a 0x600000 -e 0x600000 \
120 -n 'OpenWrt Das U-Boot uImage' \
121 -d $(PKG_BUILD_DIR)/u-boot.bin $(PKG_BUILD_DIR)/u-boot.img
124 define Package/uboot/install/default
125 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
126 $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
127 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
128 $(CP) $(PKG_BUILD_DIR)/u-boot.kwb \
129 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.kwb
130 $(CP) $(PKG_BUILD_DIR)/u-boot.img \
131 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.img
132 $(INSTALL_DIR) $(BIN_DIR)/u-boot-kwboot/
133 $(CP) $(PKG_BUILD_DIR)/tools/kwboot \
134 $(BIN_DIR)/u-boot-kwboot/
137 define Package/uboot/install/template
138 define Package/uboot-kirkwood-$(1)/install
139 $(call Package/uboot/install/default,$(2))
143 $(foreach u,$(UBOOTS), \
144 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
147 $(foreach u,$(UBOOTS), \
148 $(eval $(call BuildUBootPackage,$(u))) \
149 $(eval $(call BuildPackage,uboot-kirkwood-$(u))) \