[package] uci: update to latest git rev 7289b2d69aaffa9299b47aaaa0da1e9969ace6c1
[openwrt.git] / package / uboot-omap35xx / Makefile
1 #
2 # Copyright (C) 2011 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 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=u-boot
12 PKG_VERSION:=2010.12
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
18 PKG_MD5SUM:=
19 PKG_TARGETS:=bin
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define uboot/Default
24 TITLE:=
25 CONFIG:=
26 IMAGE:=
27 endef
28
29 define uboot/omap3_overo
30 TITLE:=U-boot for the gumstix board
31 endef
32
33 UBOOTS:=omap3_overo
34
35 define Package/uboot/template
36 define Package/uboot-omap35xx-$(1)
37 SECTION:=boot
38 CATEGORY:=Boot Loaders
39 DEPENDS:=@TARGET_omap35xx
40 TITLE:=$(2)
41 URL:=http://www.denx.de/wiki/U-Boot
42 VARIANT:=$(1)
43 endef
44 endef
45
46 define BuildUbootPackage
47 $(eval $(uboot/Default))
48 $(eval $(uboot/$(1)))
49 $(call Package/uboot/template,$(1),$(TITLE))
50 endef
51
52
53 ifdef BUILD_VARIANT
54 $(eval $(call uboot/$(BUILD_VARIANT)))
55 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
56 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
57 endif
58
59 define Build/Prepare
60 $(call Build/Prepare/Default)
61 $(CP) ./files/* $(PKG_BUILD_DIR)
62 find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
63 endef
64
65 define Build/Configure
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 $(UBOOT_CONFIG)_config
68 endef
69
70 define Build/Compile
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 CROSS_COMPILE=$(TARGET_CROSS)
73 endef
74
75 define Package/uboot/install/template
76 define Package/uboot-omap35xx-$(1)/install
77 $(INSTALL_DIR) $$(1)
78 $(CP) $(PKG_BUILD_DIR)/u-boot.bin $(BIN_DIR)/$(2)
79 endef
80 endef
81
82 $(foreach u,$(UBOOTS), \
83 $(eval $(call Package/uboot/install/template,$(u),openwrt-$(BOARD)-$(u)-u-boot.bin)) \
84 )
85
86 $(foreach u,$(UBOOTS), \
87 $(eval $(call BuildUbootPackage,$(u))) \
88 $(eval $(call BuildPackage,uboot-omap35xx-$(u))) \
89 )
This page took 0.043246 seconds and 5 git commands to generate.