license info - revert r43155
[openwrt.git] / package / boot / uboot-pxa / Makefile
1 #
2 # Copyright (C) 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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=u-boot
12 PKG_VERSION:=2011.08.25
13 PKG_RELEASE:=1
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=git://github.com/ashcharles/verdex-uboot.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=ca6bf3ef6ac5f5132a359b43dfa31e07076b74b7
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define uboot/Default
24   TITLE:=
25   CONFIG:=
26   IMAGE:=
27 endef
28
29 define uboot/gumstix
30   TITLE:=U-Boot for the Gumstix Verdex
31 endef
32
33 UBOOTS:=gumstix
34
35 define Package/uboot/template
36 define Package/uboot-pxa-$(1)
37   SECTION:=boot
38   CATEGORY:=Boot Loaders
39   DEPENDS:=@TARGET_pxa
40   TITLE:=$(2)
41   URL:=http://www.denx.de/wiki/U-Boot
42   VARIANT:=$(1)
43   MAINTAINER:=Florian Fainelli <florian@openwrt.org>
44 endef
45 endef
46
47 define BuildUBootPackage
48         $(eval $(uboot/Default))
49         $(eval $(uboot/$(1)))
50         $(call Package/uboot/template,$(1),$(TITLE))
51 endef
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/Configure
60         $(MAKE) -C $(PKG_BUILD_DIR) \
61                 $(UBOOT_CONFIG)_config
62 endef
63
64 define Build/Compile
65         $(MAKE) -C $(PKG_BUILD_DIR) \
66                 u-boot.bin \
67                 CROSS_COMPILE=$(TARGET_CROSS)
68 endef
69
70 define Package/uboot/install/default
71         $(INSTALL_DIR) $(BIN_DIR)
72         $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
73                 $(BIN_DIR)/openwrt-$(BOARD)-$(1)-u-boot.bin
74 endef
75
76 define Package/uboot/install/template
77 define Package/uboot-pxa-$(1)/install
78         $(call Package/uboot/install/default,$(2))
79 endef
80 endef
81
82 $(foreach u,$(UBOOTS), \
83         $(eval $(call Package/uboot/install/template,$(u),$(u))) \
84 )
85
86 $(foreach u,$(UBOOTS), \
87         $(eval $(call BuildUBootPackage,$(u))) \
88         $(eval $(call BuildPackage,uboot-pxa-$(u))) \
89 )