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