ramips: add support for the ARC FreeStation5 board, also fix WCR-150GN network setup...
[openwrt.git] / package / uboot-lantiq / 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
13 PKG_VERSION:=2010.03
14 PKG_MD5SUM:=2bf5ebf497dddc52440b1ea386cc1332
15 PKG_RELEASE:=1
16
17 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
19 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
20 PKG_TARGETS:=bin
21
22 include $(INCLUDE_DIR)/package.mk
23
24 ifeq ($(DUMP),)
25 STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/.configured
26 STAMP_BUILT:=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/.built
27 endif
28
29 define 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>
37 endef
38
39 #Lantiq
40 Package/uboot-lantiq-easy50712_DDR166M_flash=$(call Package/uboot-lantiq-template,easy50712_DDR166M_flash,NOR)
41 Package/uboot-lantiq-easy50712_DDR166M_ramboot=$(call Package/uboot-lantiq-template,easy50712_DDR166M_ramboot,RAM)
42 Package/uboot-lantiq-easy50812_DDR166M_flash=$(call Package/uboot-lantiq-template,easy50812_DDR166M_flash,NOR)
43 Package/uboot-lantiq-easy50812_DDR166M_ramboot=$(call Package/uboot-lantiq-template,easy50812_DDR166M_ramboot,RAM)
44
45 DDR_CONFIG_easy50712_DDR166M_ramboot:=easy50712_DDR166M
46 DDR_CONFIG_easy50812_DDR166M_ramboot:=easy50812
47
48 #Siemens
49 Package/uboot-lantiq-gigaSX76X_DDRsamsung166_flash=$(call Package/uboot-lantiq-template,gigaSX76X_DDRsamsung166_flash,NOR)
50 Package/uboot-lantiq-gigaSX76X_DDRsamsung166_ramboot=$(call Package/uboot-lantiq-template,gigaSX76X_DDRsamsung166_ramboot,RAM)
51
52 DDR_CONFIG_gigaSX76X_DDRsamsung166_ramboot:=easy50712_DDR166M
53
54 #Arcadyan
55 Package/uboot-lantiq-arv3527P_flash=$(call Package/uboot-lantiq-template,arv3527P_flash,NOR)
56 Package/uboot-lantiq-arv3527P_ramboot=$(call Package/uboot-lantiq-template,arv3527P_ramboot,RAM)
57 Package/uboot-lantiq-arv3527P_brnboot=$(call Package/uboot-lantiq-template,arv3527P_brnboot,BRN)
58 Package/uboot-lantiq-arv4518PW_flash=$(call Package/uboot-lantiq-template,arv4518PW_flash,NOR)
59 Package/uboot-lantiq-arv4518PW_ramboot=$(call Package/uboot-lantiq-template,arv4518PW_ramboot,RAM)
60 Package/uboot-lantiq-arv4518PW_brnboot=$(call Package/uboot-lantiq-template,arv4518PW_brnboot,BRN)
61 Package/uboot-lantiq-arv4519PW_flash=$(call Package/uboot-lantiq-template,arv4519PW_flash,NOR)
62 Package/uboot-lantiq-arv4519PW_ramboot=$(call Package/uboot-lantiq-template,arv4519PW_ramboot,RAM)
63 Package/uboot-lantiq-arv4519PW_brnboot=$(call Package/uboot-lantiq-template,arv4519PW_brnboot,BRN)
64 Package/uboot-lantiq-arv4520PW_flash=$(call Package/uboot-lantiq-template,arv4520PW_flash,NOR)
65 Package/uboot-lantiq-arv4520PW_ramboot=$(call Package/uboot-lantiq-template,arv4520PW_ramboot,RAM)
66 Package/uboot-lantiq-arv4520PW_brnboot=$(call Package/uboot-lantiq-template,arv4520PW_brnboot,BRN)
67 Package/uboot-lantiq-arv4525PW_flash=$(call Package/uboot-lantiq-template,arv4525PW_flash,NOR)
68 Package/uboot-lantiq-arv4525PW_ramboot=$(call Package/uboot-lantiq-template,arv4525PW_ramboot,RAM)
69 Package/uboot-lantiq-arv4525PW_brnboot=$(call Package/uboot-lantiq-template,arv4525PW_brnboot,BRN)
70 Package/uboot-lantiq-arv7525PW_flash=$(call Package/uboot-lantiq-template,arv7525PW_flash,NOR)
71 Package/uboot-lantiq-arv7525PW_ramboot=$(call Package/uboot-lantiq-template,arv7525PW_ramboot,RAM)
72 Package/uboot-lantiq-arv7525PW_brnboot=$(call Package/uboot-lantiq-template,arv7525PW_brnboot,BRN)
73 Package/uboot-lantiq-arv452CPW_flash=$(call Package/uboot-lantiq-template,arv452CPW_flash,NOR)
74 Package/uboot-lantiq-arv452CPW_ramboot=$(call Package/uboot-lantiq-template,arv452CPW_ramboot,RAM)
75 Package/uboot-lantiq-arv452CPW_brnboot=$(call Package/uboot-lantiq-template,arv452CPW_brnboot,BRN)
76 Package/uboot-lantiq-arv752DPW_flash=$(call Package/uboot-lantiq-template,arv752DPW_flash,NOR)
77 Package/uboot-lantiq-arv752DPW_ramboot=$(call Package/uboot-lantiq-template,arv752DPW_ramboot,RAM)
78 Package/uboot-lantiq-arv752DPW_brnboot=$(call Package/uboot-lantiq-template,arv752DPW_brnboot,BRN)
79 Package/uboot-lantiq-arv752DPW22_flash=$(call Package/uboot-lantiq-template,arv752DPW22_flash,NOR)
80 Package/uboot-lantiq-arv752DPW22_ramboot=$(call Package/uboot-lantiq-template,arv752DPW22_ramboot,RAM)
81 Package/uboot-lantiq-arv752DPW22_brnboot=$(call Package/uboot-lantiq-template,arv752DPW22_brnboot,BRN)
82 Package/uboot-lantiq-arv7518PW_flash=$(call Package/uboot-lantiq-template,arv7518PW_flash,NOR)
83 Package/uboot-lantiq-arv7518PW_ramboot=$(call Package/uboot-lantiq-template,arv7518PW_ramboot,RAM)
84 Package/uboot-lantiq-arv7518PW_brnboot=$(call Package/uboot-lantiq-template,arv7518PW_brnboot,BRN)
85
86 DDR_CONFIG_arv3527P_ramboot:=arcadyan_psc166_32
87 DDR_CONFIG_arv4518PW_ramboot:=arcadyan_psc166_64
88 DDR_CONFIG_arv4519PW_ramboot:=arcadyan_psc166_32
89 DDR_CONFIG_arv4520PW_ramboot:=arcadyan_psc166_32
90 DDR_CONFIG_arv4525PW_ramboot:=arcadyan_psc166_32
91 DDR_CONFIG_arv7525PW_ramboot:=arcadyan_psc166_32
92 DDR_CONFIG_arv452CPW_ramboot:=arcadyan_psc166_32
93 DDR_CONFIG_arv752DPW_ramboot:=arcadyan_psc166_64
94 DDR_CONFIG_arv752DPW22_ramboot:=arcadyan_psc166_64
95 DDR_CONFIG_arv7518PW_ramboot:=arcadyan_psc166_64
96
97 define Build/Prepare
98 $(PKG_UNPACK)
99 cp -r $(CP_OPTS) $(FILES_DIR)/* $(PKG_BUILD_DIR)/
100 $(Build/Patch)
101 find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
102 endef
103
104 UBOOT_MAKE_OPTS:= \
105 CROSS_COMPILE=$(TARGET_CROSS) \
106 ENDIANNESS= \
107 V=1
108
109 define Build/Configure/Target
110 $(MAKE) -s -C $(PKG_BUILD_DIR) \
111 $(UBOOT_MAKE_OPTS) \
112 O=$(PKG_BUILD_DIR)/$(BUILD_VARIANT) \
113 $(1)_config
114 endef
115
116 define Build/Configure
117 $(call Build/Configure/Target,$(BUILD_VARIANT))
118 endef
119
120 define Build/Compile/Target
121 $(MAKE) -s -C $(PKG_BUILD_DIR) \
122 $(UBOOT_MAKE_OPTS) \
123 O=$(PKG_BUILD_DIR)/$(1) \
124 all
125 endef
126
127 define Build/Compile
128 $(call Build/Compile/Target,$(BUILD_VARIANT))
129 endef
130
131 define Package/uboot-lantiq-$(BUILD_VARIANT)/install
132 mkdir -p $(1)
133 ifneq ($(findstring flash,$(BUILD_VARIANT)),)
134 dd \
135 if=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/u-boot-bootstrap.bin \
136 of=$(1)/u-boot-bootstrap.bin \
137 bs=64k conv=sync
138 else
139 dd \
140 if=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/u-boot.bin \
141 of=$(1)/u-boot.bin \
142 bs=64k conv=sync
143 endif
144 ifneq ($(findstring ramboot,$(BUILD_VARIANT)),)
145 if [ -e $(DDR_CONFIG_$(BUILD_VARIANT)).conf ]; then \
146 perl ./gct \
147 $(DDR_CONFIG_$(BUILD_VARIANT)).conf \
148 $(PKG_BUILD_DIR)/$(BUILD_VARIANT)/u-boot.srec \
149 $(1)/u-boot.asc; \
150 fi
151 endif
152 endef
153
154 $(eval $(call BuildPackage,uboot-lantiq-easy50712_DDR166M_flash))
155 $(eval $(call BuildPackage,uboot-lantiq-easy50712_DDR166M_ramboot))
156 $(eval $(call BuildPackage,uboot-lantiq-easy50812_DDR166M_flash))
157 $(eval $(call BuildPackage,uboot-lantiq-easy50812_DDR166M_ramboot))
158 $(eval $(call BuildPackage,uboot-lantiq-gigaSX76X_DDRsamsung166_flash))
159 $(eval $(call BuildPackage,uboot-lantiq-gigaSX76X_DDRsamsung166_ramboot))
160 #$(eval $(call BuildPackage,uboot-lantiq-arv3527P_flash))
161 #$(eval $(call BuildPackage,uboot-lantiq-arv3527P_brnboot))
162 #$(eval $(call BuildPackage,uboot-lantiq-arv3527P_ramboot))
163 $(eval $(call BuildPackage,uboot-lantiq-arv4518PW_flash))
164 $(eval $(call BuildPackage,uboot-lantiq-arv4518PW_brnboot))
165 $(eval $(call BuildPackage,uboot-lantiq-arv4518PW_ramboot))
166 $(eval $(call BuildPackage,uboot-lantiq-arv4519PW_flash))
167 $(eval $(call BuildPackage,uboot-lantiq-arv4519PW_brnboot))
168 $(eval $(call BuildPackage,uboot-lantiq-arv4519PW_ramboot))
169 $(eval $(call BuildPackage,uboot-lantiq-arv4520PW_flash))
170 $(eval $(call BuildPackage,uboot-lantiq-arv4520PW_brnboot))
171 $(eval $(call BuildPackage,uboot-lantiq-arv4520PW_ramboot))
172 $(eval $(call BuildPackage,uboot-lantiq-arv4525PW_flash))
173 $(eval $(call BuildPackage,uboot-lantiq-arv4525PW_brnboot))
174 $(eval $(call BuildPackage,uboot-lantiq-arv4525PW_ramboot))
175 $(eval $(call BuildPackage,uboot-lantiq-arv7525PW_flash))
176 $(eval $(call BuildPackage,uboot-lantiq-arv7525PW_brnboot))
177 $(eval $(call BuildPackage,uboot-lantiq-arv7525PW_ramboot))
178 $(eval $(call BuildPackage,uboot-lantiq-arv452CPW_flash))
179 $(eval $(call BuildPackage,uboot-lantiq-arv452CPW_brnboot))
180 $(eval $(call BuildPackage,uboot-lantiq-arv452CPW_ramboot))
181 $(eval $(call BuildPackage,uboot-lantiq-arv752DPW_flash))
182 $(eval $(call BuildPackage,uboot-lantiq-arv752DPW_brnboot))
183 $(eval $(call BuildPackage,uboot-lantiq-arv752DPW_ramboot))
184 $(eval $(call BuildPackage,uboot-lantiq-arv752DPW22_flash))
185 $(eval $(call BuildPackage,uboot-lantiq-arv752DPW22_brnboot))
186 $(eval $(call BuildPackage,uboot-lantiq-arv752DPW22_ramboot))
187 $(eval $(call BuildPackage,uboot-lantiq-arv7518PW_flash))
188 $(eval $(call BuildPackage,uboot-lantiq-arv7518PW_brnboot))
189 $(eval $(call BuildPackage,uboot-lantiq-arv7518PW_ramboot))
190
This page took 0.062468 seconds and 5 git commands to generate.