Root/package/boot/uboot-kirkwood/Makefile

1#
2# Copyright (C) 2010-2012 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=u-boot
11PKG_VERSION:=2012.10
12PKG_RELEASE:=1
13
14PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
17PKG_MD5SUM:=8655f63b1e5c4647295ac9ce44660be3
18PKG_TARGETS:=bin
19
20include $(INCLUDE_DIR)/package.mk
21
22define uboot/Default
23  TITLE:=
24  CONFIG:=
25  IMAGE:=
26endef
27
28define uboot/sheevaplug
29  TITLE:=U-Boot for the SheevaPlug
30endef
31
32define uboot/dockstar
33  TITLE:=U-Boot for the Seagate DockStar
34endef
35
36define uboot/iconnect
37  TITLE:=U-Boot for the Iomega iConnect Wireless
38endef
39
40define uboot/ib62x0
41  TITLE:=U-Boot for the RaidSonic ICY BOX NAS6210 and NAS6220
42endef
43
44UBOOTS:=sheevaplug dockstar iconnect ib62x0
45
46define Package/uboot/template
47define Package/uboot-kirkwood-$(1)
48  SECTION:=boot
49  CATEGORY:=Boot Loaders
50  DEPENDS:=@TARGET_kirkwood
51  TITLE:=$(2)
52  URL:=http://www.denx.de/wiki/U-Boot
53  VARIANT:=$(1)
54endef
55endef
56
57define BuildUBootPackage
58    $(eval $(uboot/Default))
59    $(eval $(uboot/$(1)))
60    $(call Package/uboot/template,$(1),$(TITLE))
61endef
62
63ifdef BUILD_VARIANT
64$(eval $(call uboot/$(BUILD_VARIANT)))
65UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
66UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
67endif
68
69define Build/Configure
70    $(MAKE) -C $(PKG_BUILD_DIR) \
71        $(UBOOT_CONFIG)_config
72endef
73
74define Build/Compile
75    $(MAKE) -C $(PKG_BUILD_DIR) \
76        u-boot.kwb \
77        CROSS_COMPILE=$(TARGET_CROSS)
78endef
79
80define Package/uboot/install/default
81    $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
82    $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
83        $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
84    $(CP) $(PKG_BUILD_DIR)/u-boot.kwb \
85        $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.kwb
86    $(INSTALL_DIR) $(BIN_DIR)/u-boot-kwboot/
87    $(CP) $(PKG_BUILD_DIR)/tools/kwboot \
88        $(BIN_DIR)/u-boot-kwboot/
89endef
90
91define Package/uboot/install/template
92define Package/uboot-kirkwood-$(1)/install
93    $(call Package/uboot/install/default,$(2))
94endef
95endef
96
97$(foreach u,$(UBOOTS), \
98    $(eval $(call Package/uboot/install/template,$(u),$(u))) \
99)
100
101$(foreach u,$(UBOOTS), \
102    $(eval $(call BuildUBootPackage,$(u))) \
103    $(eval $(call BuildPackage,uboot-kirkwood-$(u))) \
104)
105

Archive Download this file



interactive