source: trunk/target/linux/adm5120/image/router_le.mk @ 22275

Last change on this file since 22275 was 22275, checked in by florian, 6 years ago

[adm5120] add support for generic eb214a, thanks cezary (#7027)

  • Property svn:eol-style set to native
File size: 11.6 KB
Line 
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
8define trxedimax/jffs2-128k
9-a 0x20000 -f $(KDIR)/root.jffs2-128k
10endef
11
12define trxedimax/jffs2-64k
13-a 0x10000 -f $(KDIR)/root.jffs2-64k
14endef
15
16define trxedimax/squashfs
17-a 1024 -f $(KDIR)/root.squashfs
18endef
19
20define Image/Build/TRXEdimax
21        $(STAGING_DIR_HOST)/bin/trx -o $(1) -f $(KDIR)/vmlinux.lzma \
22                $(call trxedimax/$(2))
23endef
24
25define 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)
28endef
29
30define 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
44endef
45
46define 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
62endef
63
64define 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
69endef
70
71define 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
83endef
84
85define 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
93endef
94
95define 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
104endef
105
106#
107# Cellvision CAS-630/630W, CAS-670/670W, NFS-101U/101WU, NFS-202U/202WU
108#
109define Image/Build/Template/Cellvision
110        $(call Image/Build/Cellvision,$(1),$(2),$(3))
111endef
112
113define Image/Build/Template/Cellvision/squashfs
114        $(call Image/Build/Template/Cellvision,squashfs,$(1),$(2))
115endef
116
117define Image/Build/Template/Cellvision/jffs2-64k
118        $(call Image/Build/Template/Cellvision,jffs2-64k,$(1),$(2))
119endef
120
121#
122# Cellvision CAS-700/700W, CAS-771/771W, CAS-790, CAS-861/861W
123#
124define Image/Build/Template/Cellvision2
125        $(call Image/Build/Cellvision2,$(1),$(2),$(3))
126endef
127
128define Image/Build/Template/Cellvision2/squashfs
129        $(call Image/Build/Template/Cellvision2,squashfs,$(1),$(2))
130endef
131
132define Image/Build/Template/Cellvision2/jffs2-64k
133        $(call Image/Build/Template/Cellvision2,jffs2-64k,$(1),$(2))
134endef
135
136define Image/Build/Template/Cellvision2/Initramfs
137        $(call Image/Build/LZMAKernel/Cellvision,$(1),$(2),gz)
138endef
139
140#
141# Compex NP27G, NP28G, WP54G, WP54AG, WPP54G, WPP54AG
142#
143define Image/Build/Template/Compex
144        $(call Image/Build/MyLoader,$(1),$(2))
145endef
146
147define Image/Build/Template/Compex/squashfs
148        $(call Image/Build/Template/Compex,squashfs,$(1))
149endef
150
151define Image/Build/Template/Compex/jffs2-64k
152        $(call Image/Build/Template/Compex,jffs2-64k,$(1))
153endef
154
155define Image/Build/Template/Compex/Initramfs
156        $(call Image/Build/LZMAKernel/Generic,$(1),bin)
157endef
158
159#
160# Compex WP54G-WRT
161#
162define Image/Build/Template/WP54GWRT
163        $(call Image/Build/Compex,$(1),wp54g-wrt)
164endef
165
166define Image/Build/Template/WP54GWRT/squashfs
167        $(call Image/Build/Template/WP54GWRT,squashfs)
168endef
169
170define Image/Build/Template/WP54GWRT/jffs2-64k
171        $(call Image/Build/Template/WP54GWRT,jffs2-64k)
172endef
173
174define Image/Build/Template/WP54GWRT/Initramfs
175        $(call Image/Build/LZMAKernel/KArgs,wp54g-wrt,bin)
176endef
177
178#
179# Edimax BR-6104K, BR-6104KP, BR-6104Wg, BR-6114WG
180#
181define Image/Build/Template/Edimax
182        $(call Image/Build/Edimax,$(1),$(2))
183endef
184
185define Image/Build/Template/Edimax/squashfs
186        $(call Image/Build/Template/Edimax,squashfs,$(1))
187endef
188
189define Image/Build/Template/Edimax/Initramfs
190        $(call Image/Build/LZMAKernel/Admboot,$(1),gz)
191endef
192
193#
194# Infineon EASY 5120, EASY 83000
195#
196define Image/Build/Template/Infineon
197        $(call Image/Build/Infineon,$(1),$(2))
198endef
199
200define Image/Build/Template/Infineon/squashfs
201        $(call Image/Build/Template/Infineon,squashfs,$(1))
202endef
203
204define Image/Build/Template/Infineon/jffs2-64k
205        $(call Image/Build/Template/Infineon,jffs2-64k,$(1))
206endef
207
208define Image/Build/Template/Infineon/Initramfs
209        $(call Image/Build/LZMAKernel/Admboot,$(1),gz)
210endef
211
212#
213# Generic EB-214A
214#
215define Image/Build/Template/Edimax/Initramfs
216        $(call Image/Build/LZMAKernel/Admboot,eb-214a,bin)
217endef
218
219
220#
221# Mikrotik RouterBOARD 1xx
222#
223define Image/Build/Template/Mikrotik/Initramfs
224        $(CP) $(KDIR)/vmlinux.elf $(call imgname,netboot,rb1xx)
225endef
226
227#
228# OSBRiDGE 5GXi/5XLi
229#
230define Image/Build/Template/Osbridge
231        $(call Image/Build/Osbridge,$(1),$(2))
232endef
233
234define Image/Build/Template/Osbridge/squashfs
235        $(call Image/Build/Template/Osbridge,squashfs,$(1))
236endef
237
238define Image/Build/Template/Osbridge/Initramfs
239        $(call Image/Build/LZMAKernel/Admboot,$(1),gz)
240endef
241
242#
243# Profiles
244#
245define Image/Build/Profile/CAS630
246        $(call Image/Build/Template/Cellvision/$(1),cas-630,cas-630)
247endef
248
249define Image/Build/Profile/CAS630W
250        $(call Image/Build/Template/Cellvision/$(1),cas-630w,cas-630)
251endef
252
253define Image/Build/Profile/CAS670
254        $(call Image/Build/Template/Cellvision/$(1),cas-670,cas-670)
255endef
256
257define Image/Build/Profile/CAS670W
258        $(call Image/Build/Template/Cellvision/$(1),cas-670w,cas-670)
259endef
260
261define Image/Build/Profile/NFS101U
262        $(call Image/Build/Template/Cellvision/$(1),nfs-101u,nfs-101u)
263        $(call Image/Build/Template/Cellvision/$(1),dn-7013,nfs-101u)
264        $(call Image/Build/Template/Cellvision/$(1),dns-120,nfs-101u)
265        $(call Image/Build/Template/Cellvision/$(1),mu-5000fs,nfs-101u)
266        $(call Image/Build/Template/Cellvision/$(1),tn-u100,nfs-101u)
267        $(call Image/Build/Template/Cellvision/$(1),cg-nsadp,nfs-101u)
268endef
269
270define Image/Build/Profile/NFS101WU
271        $(call Image/Build/Template/Cellvision/$(1),nfs-101wu,nfs-101u)
272        $(call Image/Build/Template/Cellvision/$(1),dns-g120,nfs-101u)
273endef
274
275define Image/Build/Profile/CAS700
276        $(call Image/Build/Template/Cellvision2/$(1),cas-700,cas-700)
277endef
278
279define Image/Build/Profile/CAS700W
280        $(call Image/Build/Template/Cellvision2/$(1),cas-700w,cas-700)
281endef
282
283define Image/Build/Profile/CAS771
284        $(call Image/Build/Template/Cellvision2/$(1),cas-771,cas-771)
285endef
286
287define Image/Build/Profile/CAS771W
288        $(call Image/Build/Template/Cellvision2/$(1),cas-771w,cas-771)
289endef
290
291define Image/Build/Profile/CAS790
292        $(call Image/Build/Template/Cellvision2/$(1),cas-790,cas-790)
293endef
294
295define Image/Build/Profile/CAS861
296        $(call Image/Build/Template/Cellvision2/$(1),cas-861,cas-861)
297endef
298
299define Image/Build/Profile/CAS861W
300        $(call Image/Build/Template/Cellvision2/$(1),cas-861w,cas-861)
301endef
302
303define Image/Build/Profile/NP27G
304        $(call Image/Build/Template/Compex/$(1),np27g)
305endef
306
307define Image/Build/Profile/NP28G
308        $(call Image/Build/Template/Compex/$(1),np28g)
309endef
310
311define Image/Build/Profile/WP54
312        $(call Image/Build/Template/Compex/$(1),wp54g)
313        $(call Image/Build/Template/Compex/$(1),wp54ag)
314        $(call Image/Build/Template/Compex/$(1),wpp54g)
315        $(call Image/Build/Template/Compex/$(1),wpp54ag)
316        $(call Image/Build/Template/WP54GWRT/$(1))
317endef
318
319define Image/Build/Profile/BR6104K
320        $(call Image/Build/Template/Edimax/$(1),br-6104k)
321endef
322
323define Image/Build/Profile/BR6104KP
324        $(call Image/Build/Template/Edimax/$(1),br-6104kp)
325endef
326
327define Image/Build/Profile/BR6104WG
328        $(call Image/Build/Template/Edimax/$(1),br-6104wg)
329endef
330
331define Image/Build/Profile/BR6114WG
332        $(call Image/Build/Template/Edimax/$(1),br-6114wg)
333endef
334
335define Image/Build/Profile/EASY83000
336        $(call Image/Build/Template/Infineon/$(1),easy-83000)
337endef
338
339define Image/Build/Profile/EASY5120RT
340        $(call Image/Build/Template/Infineon/$(1),easy-5120-rt)
341endef
342
343define Image/Build/Profile/EASY5120PATA
344        $(call Image/Build/Template/Infineon/$(1),easy-5120p-ata)
345endef
346
347define Image/Build/Profile/PMUGW
348        $(call Image/Build/Template/Infineon/$(1),powerline-mugw)
349endef
350
351define Image/Build/Profile/5GXI
352        $(call Image/Build/Template/Osbridge/$(1),5gxi)
353endef
354
355define Image/Build/Profile/RouterBoard
356        $(call Image/Build/Template/Mikrotik/$(1))
357endef
358
359ifeq ($(CONFIG_BROKEN),y)
360  define Image/Build/Experimental
361        # Cellvison
362        $(call Image/Build/Profile/CAS630,$(1))
363        $(call Image/Build/Profile/CAS630W,$(1))
364        $(call Image/Build/Profile/CAS670,$(1))
365        $(call Image/Build/Profile/CAS670W,$(1))
366        $(call Image/Build/Profile/CAS700,$(1))
367        $(call Image/Build/Profile/CAS700W,$(1))
368        $(call Image/Build/Profile/CAS771,$(1))
369        $(call Image/Build/Profile/CAS771W,$(1))
370        $(call Image/Build/Profile/CAS861,$(1))
371        $(call Image/Build/Profile/CAS861W,$(1))
372        # Motorola
373        $(call Image/Build/Profile/PMUGW,$(1))
374        # OSBRiDGE
375        $(call Image/Build/Profile/5GXI,$(1))
376  endef
377endif
378
379define Image/Build/Profile/Generic
380        # Cellvision
381        $(call Image/Build/Profile/NFS101U,$(1))
382        $(call Image/Build/Profile/NFS101WU,$(1))
383        # Compex
384        $(call Image/Build/Profile/WP54,$(1))
385        $(call Image/Build/Profile/NP27G,$(1))
386        $(call Image/Build/Profile/NP28G,$(1))
387        # Edimax
388        $(call Image/Build/Profile/BR6104K,$(1))
389        $(call Image/Build/Profile/BR6104KP,$(1))
390        $(call Image/Build/Profile/BR6104WG,$(1))
391        $(call Image/Build/Profile/BR6114WG,$(1))
392        $(call Image/Build/Profile/EB214A,$(1))
393        # Infineon
394        $(call Image/Build/Profile/EASY83000,$(1))
395        $(call Image/Build/Profile/EASY5120RT,$(1))
396        $(call Image/Build/Profile/EASY5120PATA,$(1))
397        # Mikrotik
398        $(call Image/Build/Profile/RB1xx/$(1))
399
400        $(call Image/Build/Experimental,$(1))
401endef
402
403ifeq ($(PROFILE),RouterBoard)
404  define Image/cmdline/yaffs2
405        root=/dev/mtdblock3 rootfstype=yaffs2
406  endef
407
408  define Image/BuildKernel/RouterBoard
409        $(CP) $(KDIR)/vmlinux.elf $(call imgname,kernel,rb1xx)
410        $(STAGING_DIR_HOST)/bin/patch-cmdline $(call imgname,kernel,rb1xx) \
411                '$(strip $(call Image/cmdline/yaffs2))'
412  endef
413
414  ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
415    define Image/BuildKernel
416        $(call Image/BuildKernel/RouterBoard)
417    endef
418  endif
419
420endif
421
Note: See TracBrowser for help on using the repository browser.