several cleanups for ifxmips. removes all code that has not been cleaned up properly
[openwrt.git] / target / linux / adm5120 / image / router_le.mk
1 #
2 # Copyright (C) 2007-2009 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 trxedimax/jffs2-128k
9 -a 0x20000 -f $(KDIR)/root.jffs2-128k
10 endef
11
12 define trxedimax/jffs2-64k
13 -a 0x10000 -f $(KDIR)/root.jffs2-64k
14 endef
15
16 define trxedimax/squashfs
17 -a 1024 -f $(KDIR)/root.squashfs
18 endef
19
20 define Image/Build/TRXEdimax
21 $(STAGING_DIR_HOST)/bin/trx -o $(1) -f $(KDIR)/vmlinux.lzma \
22 $(call trxedimax/$(2))
23 endef
24
25 define Image/Build/Compex
26 $(call Image/Build/Loader,$(2),gz,0x80500000,0,y,$(2))
27 $(call Image/Build/TRX,$(call imgname,$(1),$(2)).trx,$(1),$(KDIR)/loader-$(2).gz)
28 endef
29
30 define Image/Build/Edimax
31 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(2))
32 $(call Image/Build/TRXEdimax,$(call imgname,$(1),$(2)).trx,$(1))
33 $(STAGING_DIR_HOST)/bin/mkcsysimg -B $(2) -d -w \
34 -r $(KDIR)/loader-$(2).gz::0x1000 \
35 -x $(call imgname,$(1),$(2)).trx:0x10000 \
36 -x $(JFFS2MARK):0x10000 \
37 $(call imgname,$(1),$(2))-webui.bin
38 $(STAGING_DIR_HOST)/bin/mkcsysimg -B $(2) -d \
39 -r $(KDIR)/loader-$(2).gz::0x1000 \
40 -x $(call imgname,$(1),$(2)).trx:0x10000 \
41 -x $(JFFS2MARK):0x10000 \
42 $(call imgname,$(1),$(2))-xmodem.bin
43 rm -f $(call imgname,$(1),$(2)).trx
44 endef
45
46 define Image/Build/Osbridge
47 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(2))
48 $(call Image/Build/TRXEdimax,$(call imgname,$(1),$(2)).trx,$(1))
49 $(STAGING_DIR_HOST)/bin/mkcsysimg -B $(2) -d \
50 -r $(KDIR)/loader-$(2).gz::0x1000 \
51 -x $(call imgname,$(1),$(2)).trx:0x10000 \
52 -x $(JFFS2MARK):0x10000 \
53 $(call imgname,$(1),$(2))-firmware.bin
54 $(STAGING_DIR_HOST)/bin/osbridge-crc \
55 -i $(call imgname,$(1),$(2))-firmware.bin \
56 -o $(call imgname,$(1),$(2))-temp.bin
57 $(STAGING_DIR_HOST)/bin/pc1crypt \
58 -i $(call imgname,$(1),$(2))-temp.bin \
59 -o $(call imgname,$(1),$(2))-webui.bin
60 rm -f $(call imgname,$(1),$(2))-temp.bin
61 rm -f $(call imgname,$(1),$(2)).trx
62 endef
63
64 define Image/Build/Infineon
65 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(2))
66 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
67 dd if=$(KDIR)/loader-$(2).gz of=$(call imgname,$(1),$(2)).img bs=64k conv=sync
68 cat $(call imgname,$(1),$(2)).trx >> $(call imgname,$(1),$(2)).img
69 endef
70
71 define Image/Build/Cellvision
72 $(call Image/Build/Loader,$(2),bin,0x80500000,0x6D8,y,$(3))
73 mkdir -p $(BIN_DIR)/tmp
74 cp $(KDIR)/loader-$(2).bin $(BIN_DIR)/tmp/vmlinux.bin
75 gzip -9 $(BIN_DIR)/tmp/vmlinux.bin
76 dd if=$(BIN_DIR)/tmp/vmlinux.bin.gz of=$(call imgname,$(1),$(2))-xmodem.bin bs=64k conv=sync
77 rm -rf $(BIN_DIR)/tmp
78 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
79 cat $(call imgname,$(1),$(2)).trx >> $(call imgname,$(1),$(2))-xmodem.bin
80 $(STAGING_DIR_HOST)/bin/mkcasfw -B $(2) -d \
81 -K $(call imgname,$(1),$(2))-xmodem.bin \
82 $(call imgname,$(1),$(2))-webui.bin
83 endef
84
85 define Image/Build/Cellvision2
86 # only for CAS-700/771/790/861
87 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(3))
88 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
89 dd if=$(KDIR)/loader-$(2).gz of=$(call imgname,$(1),$(2)).bin bs=64k conv=sync
90 cat $(call imgname,$(1),$(2)).trx >> $(call imgname,$(1),$(2)).bin
91 echo -ne '\x14\x07\x24\x06$(2)' | dd bs=14 count=1 conv=sync >> $(call imgname,$(1),$(2)).bin
92 echo -ne 'OpenWrt\x00\x00\x00' >> $(call imgname,$(1),$(2)).bin
93 endef
94
95 define Image/Build/MyLoader
96 $(call Image/Build/Loader,$(2),gz,0x80500000,0)
97 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
98 $(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) \
99 -p0x20000:0x10000:ahp:0x80001000 \
100 -p0x30000:0 \
101 -b0x20000:0x10000:h:$(KDIR)/loader-$(2).gz \
102 -b0x30000:0::$(call imgname,$(1),$(2)).trx \
103 $(call imgname,$(1),$(2)).bin
104 endef
105
106 #
107 # Cellvision CAS-630/630W, CAS-670/670W, NFS-101U/101WU, NFS-202U/202WU
108 #
109 define Image/Build/Template/Cellvision
110 $(call Image/Build/Cellvision,$(1),$(2),$(3))
111 endef
112
113 define Image/Build/Template/Cellvision/squashfs
114 $(call Image/Build/Template/Cellvision,squashfs,$(1),$(2))
115 endef
116
117 define Image/Build/Template/Cellvision/jffs2-64k
118 $(call Image/Build/Template/Cellvision,jffs2-64k,$(1),$(2))
119 endef
120
121 #
122 # Cellvision CAS-700/700W, CAS-771/771W, CAS-790, CAS-861/861W
123 #
124 define Image/Build/Template/Cellvision2
125 $(call Image/Build/Cellvision2,$(1),$(2),$(3))
126 endef
127
128 define Image/Build/Template/Cellvision2/squashfs
129 $(call Image/Build/Template/Cellvision2,squashfs,$(1),$(2))
130 endef
131
132 define Image/Build/Template/Cellvision2/jffs2-64k
133 $(call Image/Build/Template/Cellvision2,jffs2-64k,$(1),$(2))
134 endef
135
136 define Image/Build/Template/Cellvision2/Initramfs
137 $(call Image/Build/LZMAKernel/Cellvision,$(1),$(2),gz)
138 endef
139
140 #
141 # Compex NP27G, NP28G, WP54G, WP54AG, WPP54G, WPP54AG
142 #
143 define Image/Build/Template/Compex
144 $(call Image/Build/MyLoader,$(1),$(2))
145 endef
146
147 define Image/Build/Template/Compex/squashfs
148 $(call Image/Build/Template/Compex,squashfs,$(1))
149 endef
150
151 define Image/Build/Template/Compex/jffs2-64k
152 $(call Image/Build/Template/Compex,jffs2-64k,$(1))
153 endef
154
155 define Image/Build/Template/Compex/Initramfs
156 $(call Image/Build/LZMAKernel/Generic,$(1),bin)
157 endef
158
159 #
160 # Compex WP54G-WRT
161 #
162 define Image/Build/Template/WP54GWRT
163 $(call Image/Build/Compex,$(1),wp54g-wrt)
164 endef
165
166 define Image/Build/Template/WP54GWRT/squashfs
167 $(call Image/Build/Template/WP54GWRT,squashfs)
168 endef
169
170 define Image/Build/Template/WP54GWRT/jffs2-64k
171 $(call Image/Build/Template/WP54GWRT,jffs2-64k)
172 endef
173
174 define Image/Build/Template/WP54GWRT/Initramfs
175 $(call Image/Build/LZMAKernel/KArgs,wp54g-wrt,bin)
176 endef
177
178 #
179 # Edimax BR-6104K, BR-6104KP, BR-6104Wg, BR-6114WG
180 #
181 define Image/Build/Template/Edimax
182 $(call Image/Build/Edimax,$(1),$(2))
183 endef
184
185 define Image/Build/Template/Edimax/squashfs
186 $(call Image/Build/Template/Edimax,squashfs,$(1))
187 endef
188
189 define Image/Build/Template/Edimax/Initramfs
190 $(call Image/Build/LZMAKernel/Admboot,$(1),gz)
191 endef
192
193 #
194 # Infineon EASY 5120, EASY 83000
195 #
196 define Image/Build/Template/Infineon
197 $(call Image/Build/Infineon,$(1),$(2))
198 endef
199
200 define Image/Build/Template/Infineon/squashfs
201 $(call Image/Build/Template/Infineon,squashfs,$(1))
202 endef
203
204 define Image/Build/Template/Infineon/jffs2-64k
205 $(call Image/Build/Template/Infineon,jffs2-64k,$(1))
206 endef
207
208 define Image/Build/Template/Infineon/Initramfs
209 $(call Image/Build/LZMAKernel/Admboot,$(1),gz)
210 endef
211
212 #
213 # Mikrotik RouterBOARD 1xx
214 #
215 define Image/Build/Template/Mikrotik/Initramfs
216 $(CP) $(KDIR)/vmlinux.elf $(call imgname,netboot,rb1xx)
217 endef
218
219 #
220 # OSBRiDGE 5GXi/5XLi
221 #
222 define Image/Build/Template/Osbridge
223 $(call Image/Build/Osbridge,$(1),$(2))
224 endef
225
226 define Image/Build/Template/Osbridge/squashfs
227 $(call Image/Build/Template/Osbridge,squashfs,$(1))
228 endef
229
230 define Image/Build/Template/Osbridge/Initramfs
231 $(call Image/Build/LZMAKernel/Admboot,$(1),gz)
232 endef
233
234 #
235 # Profiles
236 #
237 define Image/Build/Profile/CAS630
238 $(call Image/Build/Template/Cellvision/$(1),cas-630,cas-630)
239 endef
240
241 define Image/Build/Profile/CAS630W
242 $(call Image/Build/Template/Cellvision/$(1),cas-630w,cas-630)
243 endef
244
245 define Image/Build/Profile/CAS670
246 $(call Image/Build/Template/Cellvision/$(1),cas-670,cas-670)
247 endef
248
249 define Image/Build/Profile/CAS670W
250 $(call Image/Build/Template/Cellvision/$(1),cas-670w,cas-670)
251 endef
252
253 define Image/Build/Profile/NFS101U
254 $(call Image/Build/Template/Cellvision/$(1),nfs-101u,nfs-101u)
255 $(call Image/Build/Template/Cellvision/$(1),dn-7013,nfs-101u)
256 $(call Image/Build/Template/Cellvision/$(1),dns-120,nfs-101u)
257 $(call Image/Build/Template/Cellvision/$(1),mu-5000fs,nfs-101u)
258 $(call Image/Build/Template/Cellvision/$(1),tn-u100,nfs-101u)
259 $(call Image/Build/Template/Cellvision/$(1),cg-nsadp,nfs-101u)
260 endef
261
262 define Image/Build/Profile/NFS101WU
263 $(call Image/Build/Template/Cellvision/$(1),nfs-101wu,nfs-101u)
264 $(call Image/Build/Template/Cellvision/$(1),dns-g120,nfs-101u)
265 endef
266
267 define Image/Build/Profile/CAS700
268 $(call Image/Build/Template/Cellvision2/$(1),cas-700,cas-700)
269 endef
270
271 define Image/Build/Profile/CAS700W
272 $(call Image/Build/Template/Cellvision2/$(1),cas-700w,cas-700)
273 endef
274
275 define Image/Build/Profile/CAS771
276 $(call Image/Build/Template/Cellvision2/$(1),cas-771,cas-771)
277 endef
278
279 define Image/Build/Profile/CAS771W
280 $(call Image/Build/Template/Cellvision2/$(1),cas-771w,cas-771)
281 endef
282
283 define Image/Build/Profile/CAS790
284 $(call Image/Build/Template/Cellvision2/$(1),cas-790,cas-790)
285 endef
286
287 define Image/Build/Profile/CAS861
288 $(call Image/Build/Template/Cellvision2/$(1),cas-861,cas-861)
289 endef
290
291 define Image/Build/Profile/CAS861W
292 $(call Image/Build/Template/Cellvision2/$(1),cas-861w,cas-861)
293 endef
294
295 define Image/Build/Profile/NP27G
296 $(call Image/Build/Template/Compex/$(1),np27g)
297 endef
298
299 define Image/Build/Profile/NP28G
300 $(call Image/Build/Template/Compex/$(1),np28g)
301 endef
302
303 define Image/Build/Profile/WP54
304 $(call Image/Build/Template/Compex/$(1),wp54g)
305 $(call Image/Build/Template/Compex/$(1),wp54ag)
306 $(call Image/Build/Template/Compex/$(1),wpp54g)
307 $(call Image/Build/Template/Compex/$(1),wpp54ag)
308 $(call Image/Build/Template/WP54GWRT/$(1))
309 endef
310
311 define Image/Build/Profile/BR6104K
312 $(call Image/Build/Template/Edimax/$(1),br-6104k)
313 endef
314
315 define Image/Build/Profile/BR6104KP
316 $(call Image/Build/Template/Edimax/$(1),br-6104kp)
317 endef
318
319 define Image/Build/Profile/BR6104WG
320 $(call Image/Build/Template/Edimax/$(1),br-6104wg)
321 endef
322
323 define Image/Build/Profile/BR6114WG
324 $(call Image/Build/Template/Edimax/$(1),br-6114wg)
325 endef
326
327 define Image/Build/Profile/EASY83000
328 $(call Image/Build/Template/Infineon/$(1),easy-83000)
329 endef
330
331 define Image/Build/Profile/EASY5120RT
332 $(call Image/Build/Template/Infineon/$(1),easy-5120-rt)
333 endef
334
335 define Image/Build/Profile/EASY5120PATA
336 $(call Image/Build/Template/Infineon/$(1),easy-5120p-ata)
337 endef
338
339 define Image/Build/Profile/PMUGW
340 $(call Image/Build/Template/Infineon/$(1),powerline-mugw)
341 endef
342
343 define Image/Build/Profile/5GXI
344 $(call Image/Build/Template/Osbridge/$(1),5gxi)
345 endef
346
347 define Image/Build/Profile/RouterBoard
348 $(call Image/Build/Template/Mikrotik/$(1))
349 endef
350
351 ifeq ($(CONFIG_BROKEN),y)
352 define Image/Build/Experimental
353 # Cellvison
354 $(call Image/Build/Profile/CAS630,$(1))
355 $(call Image/Build/Profile/CAS630W,$(1))
356 $(call Image/Build/Profile/CAS670,$(1))
357 $(call Image/Build/Profile/CAS670W,$(1))
358 $(call Image/Build/Profile/CAS700,$(1))
359 $(call Image/Build/Profile/CAS700W,$(1))
360 $(call Image/Build/Profile/CAS771,$(1))
361 $(call Image/Build/Profile/CAS771W,$(1))
362 $(call Image/Build/Profile/CAS861,$(1))
363 $(call Image/Build/Profile/CAS861W,$(1))
364 # Motorola
365 $(call Image/Build/Profile/PMUGW,$(1))
366 # OSBRiDGE
367 $(call Image/Build/Profile/5GXI,$(1))
368 endef
369 endif
370
371 define Image/Build/Profile/Generic
372 # Cellvision
373 $(call Image/Build/Profile/NFS101U,$(1))
374 $(call Image/Build/Profile/NFS101WU,$(1))
375 # Compex
376 $(call Image/Build/Profile/WP54,$(1))
377 $(call Image/Build/Profile/NP27G,$(1))
378 $(call Image/Build/Profile/NP28G,$(1))
379 # Edimax
380 $(call Image/Build/Profile/BR6104K,$(1))
381 $(call Image/Build/Profile/BR6104KP,$(1))
382 $(call Image/Build/Profile/BR6104WG,$(1))
383 $(call Image/Build/Profile/BR6114WG,$(1))
384 # Infineon
385 $(call Image/Build/Profile/EASY83000,$(1))
386 $(call Image/Build/Profile/EASY5120RT,$(1))
387 $(call Image/Build/Profile/EASY5120PATA,$(1))
388 # Mikrotik
389 $(call Image/Build/Profile/RB1xx/$(1))
390
391 $(call Image/Build/Experimental,$(1))
392 endef
393
394 ifeq ($(PROFILE),RouterBoard)
395 define Image/cmdline/yaffs2
396 root=/dev/mtdblock3 rootfstype=yaffs2
397 endef
398
399 define Image/BuildKernel/RouterBoard
400 $(CP) $(KDIR)/vmlinux.elf $(call imgname,kernel,rb1xx)
401 $(STAGING_DIR_HOST)/bin/patch-cmdline $(call imgname,kernel,rb1xx) \
402 '$(strip $(call Image/cmdline/yaffs2))'
403 endef
404
405 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
406 define Image/BuildKernel
407 $(call Image/BuildKernel/RouterBoard)
408 endef
409 endif
410
411 endif
412
This page took 0.049659 seconds and 5 git commands to generate.