[adm5120] make image names shorten
[openwrt/svn-archive/archive.git] / target / linux / adm5120 / image / router_le.mk
1 #
2 # Copyright (C) 2007 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 define Image/Build/Compex
9 $(call Image/Build/Loader,$(2),gz,0x80500000,0,y,$(2))
10 $(call Image/Build/TRX,$(call imgname,$(1),$(2)).trx,$(1),$(KDIR)/loader-$(2).gz)
11 endef
12
13 define Image/Build/Edimax
14 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(2))
15 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
16 $(STAGING_DIR_HOST)/bin/mkcsysimg -B $(2) -d -w \
17 -r $(KDIR)/loader-$(2).gz \
18 -x $(call imgname,$(1),$(2)).trx \
19 $(call imgname,$(1),$(2)).bin
20 endef
21
22 define Image/Build/Infineon
23 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(2))
24 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
25 dd if=$(KDIR)/loader-$(2).gz of=$(call imgname,$(1),$(2)).img bs=64k conv=sync
26 cat $(call imgname,$(1),$(2)).trx >> $(call imgname,$(1),$(2)).img
27 endef
28
29 define Image/Build/MyLoader
30 $(call Image/Build/Loader,$(2),gz,0x80500000,0)
31 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
32 $(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) \
33 -p0x20000:0x10000:ahp:0x80001000 \
34 -p0x30000:0 \
35 -b0x20000:0x10000:h:$(KDIR)/loader-$(2).gz \
36 -b0x30000:0::$(call imgname,$(1),$(2)).trx \
37 $(call imgname,$(1),$(2)).bin
38 endef
39
40 #
41 # Cellvision CAS-771
42 #
43 define Image/Build/Board/CAS-771/Initramfs
44 $(call Image/Build/LZMAKernel/Admboot,cas-771,gz)
45 endef
46
47 #
48 # Cellvision CAS-771W
49 #
50 define Image/Build/Board/CAS-771W/Initramfs
51 $(call Image/Build/LZMAKernel/Admboot,cas-771w,gz)
52 endef
53
54 #
55 # Compex NP27G
56 #
57 define Image/Build/Board/NP27G
58 $(call Image/Build/MyLoader,$(1),np27g)
59 endef
60
61 define Image/Build/Board/NP27G/squashfs
62 $(call Image/Build/Board/NP27G,squashfs)
63 endef
64
65 define Image/Build/Board/NP27G/jffs2-64k
66 $(call Image/Build/Board/NP27G,jffs2-64k)
67 endef
68
69 define Image/Build/Board/NP27G/Initramfs
70 $(call Image/Build/LZMAKernel/Generic,np27g,bin)
71 endef
72
73 #
74 # Compex NP28G
75 #
76 define Image/Build/Board/NP28G
77 $(call Image/Build/MyLoader,$(1),np28g)
78 endef
79
80 define Image/Build/Board/NP28G/squashfs
81 $(call Image/Build/Board/NP28G,squashfs)
82 endef
83
84 define Image/Build/Board/NP28G/jffs2-64k
85 $(call Image/Build/Board/NP28G,jffs2-64k)
86 endef
87
88 define Image/Build/Board/NP28G/Initramfs
89 $(call Image/Build/LZMAKernel/Generic,np28g,bin)
90 endef
91
92 #
93 # Compex WP54G
94 #
95 define Image/Build/Board/WP54G
96 $(call Image/Build/MyLoader,$(1),wp54g)
97 endef
98
99 define Image/Build/Board/WP54G/squashfs
100 $(call Image/Build/Board/WP54G,squashfs)
101 endef
102
103 define Image/Build/Board/WP54G/jffs2-64k
104 $(call Image/Build/Board/WP54G,jffs2-64k)
105 endef
106
107 define Image/Build/Board/WP54G/Initramfs
108 $(call Image/Build/LZMAKernel/Generic,wp54g,bin)
109 endef
110
111 #
112 # Compex WP54AG
113 #
114 define Image/Build/Board/WP54AG
115 $(call Image/Build/MyLoader,$(1),wp54ag)
116 endef
117
118 define Image/Build/Board/WP54AG/squashfs
119 $(call Image/Build/Board/WP54AG,squashfs)
120 endef
121
122 define Image/Build/Board/WP54AG/jffs2-64k
123 $(call Image/Build/Board/WP54AG,jffs2-64k)
124 endef
125
126 define Image/Build/Board/WP54AG/Initramfs
127 $(call Image/Build/LZMAKernel/Generic,wp54ag,bin)
128 endef
129
130 #
131 # Compex WPP54G
132 #
133 define Image/Build/Board/WPP54G
134 $(call Image/Build/MyLoader,$(1),wpp54g)
135 endef
136
137 define Image/Build/Board/WPP54G/squashfs
138 $(call Image/Build/Board/WPP54G,squashfs)
139 endef
140
141 define Image/Build/Board/WPP54G/jffs2-64k
142 $(call Image/Build/Board/WPP54G,jffs2-64k)
143 endef
144
145 define Image/Build/Board/WPP54G/Initramfs
146 $(call Image/Build/LZMAKernel/Generic,wpp54g,bin)
147 endef
148
149 #
150 # Compex WPP54AG
151 #
152 define Image/Build/Board/WPP54AG
153 $(call Image/Build/MyLoader,$(1),wpp54ag)
154 endef
155
156 define Image/Build/Board/WPP54AG/squashfs
157 $(call Image/Build/Board/WPP54AG,squashfs)
158 endef
159
160 define Image/Build/Board/WPP54AG/jffs2-64k
161 $(call Image/Build/Board/WPP54AG,jffs2-64k)
162 endef
163
164 define Image/Build/Board/WPP54AG/Initramfs
165 $(call Image/Build/LZMAKernel/Generic,wpp54ag,bin)
166 endef
167
168 #
169 # Compex WP54G-WRT
170 #
171 define Image/Build/Board/WP54G-WRT
172 $(call Image/Build/Compex,$(1),wp54g-wrt)
173 endef
174
175 define Image/Build/Board/WP54G-WRT/squashfs
176 $(call Image/Build/Board/WP54G-WRT,squashfs)
177 endef
178
179 define Image/Build/Board/WP54G-WRT/jffs2-64k
180 $(call Image/Build/Board/WP54G-WRT,jffs2-64k)
181 endef
182
183 define Image/Build/Board/WP54G-WRT/Initramfs
184 $(call Image/Build/LZMAKernel/KArgs,wp54g-wrt,bin)
185 endef
186
187 #
188 # Edimax BR-6104K/KP
189 #
190 define Image/Build/Board/BR-6104K
191 $(call Image/Build/Edimax,$(1),br-6104k)
192 endef
193
194 define Image/Build/Board/BR-6104K/squashfs
195 $(call Image/Build/Board/BR-6104K,squashfs)
196 endef
197
198 define Image/Build/Board/BR-6104K/jffs2-64k
199 $(call Image/Build/Board/BR-6104K,jffs2-64k)
200 endef
201
202 define Image/Build/Board/BR-6104K/Initramfs
203 $(call Image/Build/LZMAKernel/Admboot,br-6104k,gz)
204 endef
205
206 #
207 # Infineon EASY 83000
208 #
209 define Image/Build/Board/EASY-83000
210 $(call Image/Build/Infineon,$(1),easy-83000)
211 endef
212
213 define Image/Build/Board/EASY-83000/squashfs
214 $(call Image/Build/Board/EASY-83000,squashfs)
215 endef
216
217 define Image/Build/Board/EASY-83000/jffs2-64k
218 $(call Image/Build/Board/EASY-83000,jffs2-64k)
219 endef
220
221 define Image/Build/Board/EASY-83000/Initramfs
222 $(call Image/Build/LZMAKernel/Admboot,easy-83000,gz)
223 endef
224
225 #
226 # Mikrotik RB-1xx
227 #
228 define Image/Build/Board/RB1xx/Initramfs
229 $(CP) $(KDIR)/vmlinux.elf $(call imgname,netboot,rb1xx)
230 endef
231
232 #
233 # Groups
234 #
235 define Image/Build/Group/Cellvision
236 $(call Image/Build/Board/CAS-771/$(1))
237 $(call Image/Build/Board/CAS-771W/$(1))
238 endef
239
240 define Image/Build/Group/WP54G
241 $(call Image/Build/Board/WP54G/$(1))
242 $(call Image/Build/Board/WP54AG/$(1))
243 $(call Image/Build/Board/WPP54G/$(1))
244 $(call Image/Build/Board/WPP54AG/$(1))
245 $(call Image/Build/Board/WP54G-WRT/$(1))
246 endef
247
248 define Image/Build/Group/Compex
249 $(call Image/Build/Board/NP27G/$(1))
250 $(call Image/Build/Board/NP28G/$(1))
251
252 $(call Image/Build/Group/WP54G,$(1))
253 endef
254
255 define Image/Build/Group/Edimax
256 $(call Image/Build/Board/BR-6104K/$(1))
257 endef
258
259 define Image/Build/Group/Infineon
260 $(call Image/Build/Board/EASY-83000/$(1))
261 endef
262
263 define Image/Build/Group/All
264 $(call Image/Build/Group/Cellvision,$(1))
265 $(call Image/Build/Group/Compex,$(1))
266 $(call Image/Build/Group/Edimax,$(1))
267 $(call Image/Build/Group/Cellvision,$(1))
268 $(call Image/Build/Group/Infineon,$(1))
269 $(call Image/Build/Board/RB1xx/$(1))
270 endef
271
272 #
273 # Profiles
274 #
275 define Image/Build/Profile/Generic
276 $(call Image/Build/Group/All,$(1))
277 endef
278
279 define Image/Build/Profile/Atheros
280 $(call Image/Build/AllBoards,$(1))
281 endef
282
283 define Image/Build/Profile/Texas
284 $(call Image/Build/AllBoards,$(1))
285 endef
286
287 define Image/Build/Profile/Ralink
288 $(call Image/Build/AllBoards,$(1))
289 endef
290
291 define Image/Build/Profile/WP54G
292 $(call Image/Build/Group/WP54G,$(1))
293 endef
294
295 define Image/Build/Profile/NP27G
296 $(call Image/Build/Board/NP27G/$(1))
297 endef
298
299 define Image/Build/Profile/NP28G
300 $(call Image/Build/Board/NP28G/$(1))
301 endef
302
303 define Image/Build/Profile/CAS-771
304 $(call Image/Build/Board/CAS-771/$(1))
305 endef
306
307 define Image/Build/Profile/CAS-771W
308 $(call Image/Build/Board/CAS-771W/$(1))
309 endef
310
311 define Image/Build/Profile/RouterBoard
312 $(call Image/Build/Board/RB1xx/$(1))
313 endef
314
315 ifeq ($(PROFILE),RouterBoard)
316 define Image/cmdline/yaffs2
317 root=/dev/mtdblock3 rootfstype=yaffs2 init=/etc/preinit
318 endef
319
320 define Image/BuildKernel/RouterBoard
321 $(CP) $(KDIR)/vmlinux.elf $(call imgname,kernel,rb1xx)
322 $(STAGING_DIR_HOST)/bin/patch-cmdline $(call imgname,kernel,rb1xx) \
323 '$(strip $(call Image/cmdline/yaffs2))'
324 endef
325
326 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
327 define Image/BuildKernel
328 $(call Image/BuildKernel/RouterBoard)
329 endef
330 endif
331
332 endif
333