Root/package/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
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=u-boot
12PKG_VERSION:=2011.08.25
13PKG_RELEASE:=1
14
15PKG_SOURCE_PROTO:=git
16PKG_SOURCE_URL:=git://github.com/ashcharles/verdex-uboot.git
17PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18PKG_SOURCE_VERSION:=ca6bf3ef6ac5f5132a359b43dfa31e07076b74b7
19PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
20
21include $(INCLUDE_DIR)/package.mk
22
23define uboot/Default
24  TITLE:=
25  CONFIG:=
26  IMAGE:=
27endef
28
29define uboot/gumstix
30  TITLE:=U-Boot for the Gumstix Verdex
31endef
32
33UBOOTS:=gumstix
34
35define Package/uboot/template
36define 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>
44endef
45endef
46
47define BuildUBootPackage
48    $(eval $(uboot/Default))
49    $(eval $(uboot/$(1)))
50    $(call Package/uboot/template,$(1),$(TITLE))
51endef
52
53ifdef BUILD_VARIANT
54$(eval $(call uboot/$(BUILD_VARIANT)))
55UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
56UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
57endif
58
59define Build/Configure
60    $(MAKE) -C $(PKG_BUILD_DIR) \
61        $(UBOOT_CONFIG)_config
62endef
63
64define Build/Compile
65    $(MAKE) -C $(PKG_BUILD_DIR) \
66        u-boot.bin \
67        CROSS_COMPILE=$(TARGET_CROSS)
68endef
69
70define 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
74endef
75
76define Package/uboot/install/template
77define Package/uboot-pxa-$(1)/install
78    $(call Package/uboot/install/default,$(2))
79endef
80endef
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)
90

Archive Download this file



interactive