uboot-kirkwood: bump to 2014.10
[openwrt/openwrt.git] / package / boot / uboot-kirkwood / Makefile
1 #
2 # Copyright (C) 2010-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=u-boot
11 PKG_VERSION:=2014.10
12 PKG_RELEASE:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=\
17 http://mirror2.openwrt.org/sources \
18 ftp://ftp.denx.de/pub/u-boot
19 PKG_MD5SUM:=3ddcaee2f05b7c464778112ec83664b5
20 PKG_TARGETS:=bin
21
22 PKG_LICENSE:=GPL-2.0 GPL-2.0+
23 PKG_LICENSE_FILES:=Licenses/README
24
25 PKG_BUILD_PARALLEL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define uboot/Default
30 TITLE:=
31 endef
32
33 define uboot/dockstar
34 TITLE:=U-Boot for Seagate DockStar
35 endef
36
37 define uboot/dockstar_second_stage
38 TITLE:=second stage U-Boot for Seagate DockStar
39 endef
40
41 define uboot/goflexhome
42 TITLE:=U-Boot for the Seagate GoFlexHome/GoFlexNet
43 endef
44
45 define uboot/ib62x0
46 TITLE:=U-Boot for RaidSonic ICY BOX NAS6210 and NAS6220
47 endef
48
49 define uboot/ib62x0_second_stage
50 TITLE:=second stage U-Boot for RaidSonic ICY BOX NAS6210 and NAS6220
51 endef
52
53 define uboot/iconnect
54 TITLE:=U-Boot for Iomega iConnect Wireless
55 endef
56
57 define uboot/iconnect_second_stage
58 TITLE:=second stage U-Boot for Iomega iConnect Wireless
59 endef
60
61 define uboot/pogo_e02
62 TITLE:=U-Boot for Cloud Engines Pogoplug E02
63 endef
64
65 define uboot/pogo_e02_second_stage
66 TITLE:=second stage U-Boot for Cloud Engines Pogoplug E02
67 endef
68
69 define uboot/sheevaplug
70 TITLE:=U-Boot for SheevaPlug
71 endef
72
73 UBOOTS:= \
74 dockstar dockstar_second_stage \
75 goflexhome \
76 ib62x0 ib62x0_second_stage \
77 iconnect iconnect_second_stage \
78 pogo_e02 pogo_e02_second_stage \
79 sheevaplug
80
81 define Package/uboot/template
82 define Package/uboot-kirkwood-$(1)
83 SECTION:=boot
84 CATEGORY:=Boot Loaders
85 DEPENDS:=@TARGET_kirkwood
86 TITLE:=$(2)
87 URL:=http://www.denx.de/wiki/U-Boot
88 VARIANT:=$(1)
89 endef
90 endef
91
92 define BuildUBootPackage
93 $(eval $(uboot/Default))
94 $(eval $(uboot/$(1)))
95 $(call Package/uboot/template,$(1),$(TITLE))
96 endef
97
98 define Build/Configure
99 $(if $(findstring _second_stage,$(BUILD_VARIANT)),
100 $(CP) \
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
104 )
105 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
106 $(BUILD_VARIANT)_config V=1
107 endef
108
109 define Build/Compile
110 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
111 u-boot.kwb \
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
117 endef
118
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/
130 endef
131
132 define Package/uboot/install/template
133 define Package/uboot-kirkwood-$(1)/install
134 $(call Package/uboot/install/default,$(2))
135 endef
136 endef
137
138 $(foreach u,$(UBOOTS), \
139 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
140 )
141
142 $(foreach u,$(UBOOTS), \
143 $(eval $(call BuildUBootPackage,$(u))) \
144 $(eval $(call BuildPackage,uboot-kirkwood-$(u))) \
145 )