Root/package/uboot-xburst/Makefile

Source at commit b51c58b created 13 years 4 months ago.
By Xiangfu Liu, this patch add uboot-xburst package uboot-xburst-avt2 uboot-xburst-n516 uboot-xburst-qi_lb60 uboot-xburst-sakc
1#
2# Copyright (C) 2008 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:=2010.06
13PKG_RELEASE:=1
14
15PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
18PKG_MD5SUM:=
19PKG_TARGETS:=bin
20
21include $(INCLUDE_DIR)/package.mk
22
23define uboot/Default
24  TITLE:=
25  CONFIG:=
26  IMAGE:=
27endef
28
29define uboot/qi_lb60
30  TITLE:=U-boot for the qi_lb60 board
31endef
32
33define uboot/avt2
34  TITLE:=U-boot for the avt2 board
35endef
36
37define uboot/sakc
38  TITLE:=U-boot for the sakc board
39endef
40
41define uboot/n516
42  TITLE:=U-boot for the N516 e-book reader
43  CONFIG:=n516_nand
44endef
45
46UBOOTS:=qi_lb60 n516 avt2 sakc
47
48define Package/uboot/template
49define 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/UBoot/WebHome
55  VARIANT:=$(1)
56endef
57endef
58
59define BuildUbootPackage
60    $(eval $(uboot/Default))
61    $(eval $(uboot/$(1)))
62    $(call Package/uboot/template,$(1),$(TITLE))
63endef
64
65
66ifdef BUILD_VARIANT
67$(eval $(call uboot/$(BUILD_VARIANT)))
68UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
69UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_BARIANT)-u-boot.bin)
70endif
71
72define Build/Prepare
73    $(call Build/Prepare/Default)
74    $(CP) ./files/* $(PKG_BUILD_DIR)
75    find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
76endef
77
78define Build/Configure
79    $(MAKE) -C $(PKG_BUILD_DIR) \
80        $(UBOOT_CONFIG)_config
81endef
82
83define Build/Compile
84    $(MAKE) -C $(PKG_BUILD_DIR) \
85        CROSS_COMPILE=$(TARGET_CROSS)
86endef
87
88define Package/uboot/install/template
89define Package/uboot-xburst-$(1)/install
90    $(CP) $(PKG_BUILD_DIR)/u-boot-nand.bin $(BIN_DIR)/$(2)
91    rmdir $$(1)
92endef
93endef
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)
103

Archive Download this file



interactive