source: trunk/package/uboot-lantiq/Makefile @ 27664

Last change on this file since 27664 was 27664, checked in by blogic, 5 years ago

uboot-lantiq

fix arv752DPW and add arv7525PW

File size: 7.2 KB
Line 
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
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=u-boot
12
13PKG_VERSION:=2010.03
14PKG_MD5SUM:=2bf5ebf497dddc52440b1ea386cc1332
15PKG_RELEASE:=1
16
17PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
19PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
20PKG_TARGETS:=bin
21
22include $(INCLUDE_DIR)/package.mk
23
24ifeq ($(DUMP),)
25  STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/.configured
26  STAMP_BUILT:=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/.built
27endif
28
29define Package/uboot-lantiq-template
30  SECTION:=boot
31  CATEGORY:=Boot Loaders
32  DEPENDS:=@TARGET_lantiq_danube
33  URL:=http://www.denx.de/wiki/U-Boot
34  VARIANT:=$(1)
35  TITLE:=$(1) ($(2))
36  MAINTAINER:=John Crispin <blogic@openwrt.org>
37endef
38
39#Lantiq
40Package/uboot-lantiq-easy50712_DDR166M=$(call Package/uboot-lantiq-template,easy50712_DDR166M,NOR)
41Package/uboot-lantiq-easy50712_DDR166M_ramboot=$(call Package/uboot-lantiq-template,easy50712_DDR166M_ramboot,RAM)
42Package/uboot-lantiq-easy50812_DDR166M=$(call Package/uboot-lantiq-template,easy50812_DDR166M,NOR)
43Package/uboot-lantiq-easy50812_DDR166M_ramboot=$(call Package/uboot-lantiq-template,easy50812_DDR166M_ramboot,RAM)
44
45DDR_CONFIG_easy50712_DDR166M_ramboot:=easy50712_DDR166M
46DDR_CONFIG_easy50812_DDR166M_ramboot:=easy50812
47
48#Siemens
49Package/uboot-lantiq-gigaSX76X_DDRsamsung166=$(call Package/uboot-lantiq-template,gigaSX76X_DDRsamsung166,NOR)
50
51#Arcadyan
52Package/uboot-lantiq-arv3527P_flash=$(call Package/uboot-lantiq-template,arv3527P_flash,NOR)
53Package/uboot-lantiq-arv3527P_ramboot=$(call Package/uboot-lantiq-template,arv3527P_ramboot,RAM)
54Package/uboot-lantiq-arv3527P_brnboot=$(call Package/uboot-lantiq-template,arv3527P_brnboot,BRN)
55Package/uboot-lantiq-arv4518PW_flash=$(call Package/uboot-lantiq-template,arv4518PW_flash,NOR)
56Package/uboot-lantiq-arv4518PW_ramboot=$(call Package/uboot-lantiq-template,arv4518PW_ramboot,RAM)
57Package/uboot-lantiq-arv4518PW_brnboot=$(call Package/uboot-lantiq-template,arv4518PW_brnboot,BRN)
58Package/uboot-lantiq-arv4520PW_flash=$(call Package/uboot-lantiq-template,arv4520PW_flash,NOR)
59Package/uboot-lantiq-arv4520PW_ramboot=$(call Package/uboot-lantiq-template,arv4520PW_ramboot,RAM)
60Package/uboot-lantiq-arv4520PW_brnboot=$(call Package/uboot-lantiq-template,arv4520PW_brnboot,BRN)
61Package/uboot-lantiq-arv4525PW_flash=$(call Package/uboot-lantiq-template,arv4525PW_flash,NOR)
62Package/uboot-lantiq-arv4525PW_ramboot=$(call Package/uboot-lantiq-template,arv4525PW_ramboot,RAM)
63Package/uboot-lantiq-arv4525PW_brnboot=$(call Package/uboot-lantiq-template,arv4525PW_brnboot,BRN)
64Package/uboot-lantiq-arv7525PW_flash=$(call Package/uboot-lantiq-template,arv7525PW_flash,NOR)
65Package/uboot-lantiq-arv7525PW_ramboot=$(call Package/uboot-lantiq-template,arv7525PW_ramboot,RAM)
66Package/uboot-lantiq-arv7525PW_brnboot=$(call Package/uboot-lantiq-template,arv7525PW_brnboot,BRN)
67Package/uboot-lantiq-arv452CPW_flash=$(call Package/uboot-lantiq-template,arv452CPW_flash,NOR)
68Package/uboot-lantiq-arv452CPW_ramboot=$(call Package/uboot-lantiq-template,arv452CPW_ramboot,RAM)
69Package/uboot-lantiq-arv452CPW_brnboot=$(call Package/uboot-lantiq-template,arv452CPW_brnboot,BRN)
70Package/uboot-lantiq-arv752DPW_flash=$(call Package/uboot-lantiq-template,arv752DPW_flash,NOR)
71Package/uboot-lantiq-arv752DPW_ramboot=$(call Package/uboot-lantiq-template,arv752DPW_ramboot,RAM)
72Package/uboot-lantiq-arv752DPW_brnboot=$(call Package/uboot-lantiq-template,arv752DPW_brnboot,BRN)
73Package/uboot-lantiq-arv752DPW22_flash=$(call Package/uboot-lantiq-template,arv752DPW22_flash,NOR)
74Package/uboot-lantiq-arv752DPW22_ramboot=$(call Package/uboot-lantiq-template,arv752DPW22_ramboot,RAM)
75Package/uboot-lantiq-arv752DPW22_brnboot=$(call Package/uboot-lantiq-template,arv752DPW22_brnboot,BRN)
76
77DDR_CONFIG_arv3527P_ramboot:=arcadyan_psc166_32
78DDR_CONFIG_arv4518PW_ramboot:=arcadyan_psc166_64
79DDR_CONFIG_arv4520PW_ramboot:=arcadyan_psc166_32
80DDR_CONFIG_arv4525PW_ramboot:=arcadyan_psc166_32
81DDR_CONFIG_arv7525PW_ramboot:=arcadyan_psc166_32
82DDR_CONFIG_arv452CPW_ramboot:=arcadyan_psc166_32
83DDR_CONFIG_arv752DPW_ramboot:=arcadyan_psc166_64
84DDR_CONFIG_arv752DPW22_ramboot:=arcadyan_psc166_64
85
86define Build/Prepare
87        $(PKG_UNPACK)
88        cp -r $(CP_OPTS) $(FILES_DIR)/* $(PKG_BUILD_DIR)/
89        $(Build/Patch)
90        find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
91endef
92
93UBOOT_MAKE_OPTS:= \
94        CROSS_COMPILE=$(TARGET_CROSS) \
95        ENDIANNESS= \
96        V=1
97
98define Build/Configure/Target
99        $(MAKE) -s -C $(PKG_BUILD_DIR) \
100                $(UBOOT_MAKE_OPTS) \
101                O=$(PKG_BUILD_DIR)/$(BUILD_VARIANT) \
102                $(1)_config
103endef
104
105define Build/Configure
106        $(call Build/Configure/Target,$(BUILD_VARIANT))
107endef
108
109define Build/Compile/Target
110        $(MAKE) -s -C $(PKG_BUILD_DIR) \
111                $(UBOOT_MAKE_OPTS) \
112                O=$(PKG_BUILD_DIR)/$(1) \
113                all
114endef
115
116define Build/Compile
117        $(call Build/Compile/Target,$(BUILD_VARIANT))
118endef
119
120define Package/uboot-lantiq-$(BUILD_VARIANT)/install
121        mkdir -p $(1)
122ifneq ($(findstring ramboot,$(BUILD_VARIANT)),)
123        dd \
124                if=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/u-boot.bin \
125                of=$(1)/u-boot.bin \
126                bs=64k conv=sync
127else
128        dd \
129                if=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/u-boot-bootstrap.bin \
130                of=$(1)/u-boot-bootstrap.bin \
131                bs=64k conv=sync
132endif
133ifneq ($(findstring ramboot,$(BUILD_VARIANT)),)
134        if [ -e $(DDR_CONFIG_$(BUILD_VARIANT)).conf ]; then \
135                perl ./gct \
136                        $(DDR_CONFIG_$(BUILD_VARIANT)).conf \
137                        $(PKG_BUILD_DIR)/$(BUILD_VARIANT)/u-boot.srec \
138                        $(1)/u-boot.asc; \
139        fi
140endif
141endef
142
143$(eval $(call BuildPackage,uboot-lantiq-easy50712_DDR166M))
144$(eval $(call BuildPackage,uboot-lantiq-easy50712_DDR166M_ramboot))
145$(eval $(call BuildPackage,uboot-lantiq-easy50812_DDR166M))
146$(eval $(call BuildPackage,uboot-lantiq-easy50812_DDR166M_ramboot))
147$(eval $(call BuildPackage,uboot-lantiq-gigaSX76X_DDRsamsung166))
148#$(eval $(call BuildPackage,uboot-lantiq-arv3527P_flash))
149#$(eval $(call BuildPackage,uboot-lantiq-arv3527P_brnboot))
150#$(eval $(call BuildPackage,uboot-lantiq-arv3527P_ramboot))
151$(eval $(call BuildPackage,uboot-lantiq-arv4518PW_flash))
152$(eval $(call BuildPackage,uboot-lantiq-arv4518PW_brnboot))
153$(eval $(call BuildPackage,uboot-lantiq-arv4518PW_ramboot))
154$(eval $(call BuildPackage,uboot-lantiq-arv4520PW_flash))
155$(eval $(call BuildPackage,uboot-lantiq-arv4520PW_brnboot))
156$(eval $(call BuildPackage,uboot-lantiq-arv4520PW_ramboot))
157$(eval $(call BuildPackage,uboot-lantiq-arv4525PW_flash))
158$(eval $(call BuildPackage,uboot-lantiq-arv4525PW_brnboot))
159$(eval $(call BuildPackage,uboot-lantiq-arv4525PW_ramboot))
160$(eval $(call BuildPackage,uboot-lantiq-arv7525PW_flash))
161$(eval $(call BuildPackage,uboot-lantiq-arv7525PW_brnboot))
162$(eval $(call BuildPackage,uboot-lantiq-arv7525PW_ramboot))
163$(eval $(call BuildPackage,uboot-lantiq-arv452CPW_flash))
164$(eval $(call BuildPackage,uboot-lantiq-arv452CPW_brnboot))
165$(eval $(call BuildPackage,uboot-lantiq-arv452CPW_ramboot))
166$(eval $(call BuildPackage,uboot-lantiq-arv752DPW_flash))
167$(eval $(call BuildPackage,uboot-lantiq-arv752DPW_brnboot))
168$(eval $(call BuildPackage,uboot-lantiq-arv752DPW_ramboot))
169$(eval $(call BuildPackage,uboot-lantiq-arv752DPW22_flash))
170$(eval $(call BuildPackage,uboot-lantiq-arv752DPW22_brnboot))
171$(eval $(call BuildPackage,uboot-lantiq-arv752DPW22_ramboot))
172
Note: See TracBrowser for help on using the repository browser.