Refresh patch
[openwrt.git] / package / uboot-xburst / Makefile
1 #
2 # Copyright (C) 2010 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:=2009.11
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/qi_lb60
30 TITLE:=U-boot for the qi_lb60 board
31 endef
32
33 define uboot/avt2
34 TITLE:=U-boot for the avt2 board
35 endef
36
37 define uboot/sakc
38 TITLE:=U-boot for the sakc board
39 endef
40
41 define uboot/n516
42 TITLE:=U-boot for the N516 e-book reader
43 CONFIG:=n516_nand
44 endef
45
46 UBOOTS:=qi_lb60 n516 avt2 sakc
47
48 define Package/uboot/template
49 define Package/uboot-xburst-$(1)
50 SECTION:=boot
51 CATEGORY:=Boot Loaders
52 DEPENDS:=@TARGET_xburst
53 TITLE:=$(2)
54 URL:=http://www.denx.de/wiki/U-Boot
55 VARIANT:=$(1)
56 endef
57 endef
58
59 define BuildUbootPackage
60 $(eval $(uboot/Default))
61 $(eval $(uboot/$(1)))
62 $(call Package/uboot/template,$(1),$(TITLE))
63 endef
64
65
66 ifdef BUILD_VARIANT
67 $(eval $(call uboot/$(BUILD_VARIANT)))
68 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
69 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_BARIANT)-u-boot.bin)
70 endif
71
72 define Build/Prepare
73 $(call Build/Prepare/Default)
74 $(CP) ./files/* $(PKG_BUILD_DIR)
75 find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
76 endef
77
78 define Build/Configure
79 $(MAKE) -C $(PKG_BUILD_DIR) \
80 $(UBOOT_CONFIG)_config
81 endef
82
83 define Build/Compile
84 $(MAKE) -C $(PKG_BUILD_DIR) \
85 CROSS_COMPILE=$(TARGET_CROSS)
86 endef
87
88 define Package/uboot/install/template
89 define Package/uboot-xburst-$(1)/install
90 $(INSTALL_DIR) $$(1)
91 $(CP) $(PKG_BUILD_DIR)/u-boot-nand.bin $(BIN_DIR)/$(2)
92 endef
93 endef
94
95 $(foreach u,$(UBOOTS), \
96 $(eval $(call Package/uboot/install/template,$(u),openwrt-$(BOARD)-$(u)-u-boot.bin)) \
97 )
98
99 $(foreach u,$(UBOOTS), \
100 $(eval $(call BuildUbootPackage,$(u))) \
101 $(eval $(call BuildPackage,uboot-xburst-$(u))) \
102 )
This page took 0.048479 seconds and 5 git commands to generate.