2 # Copyright (C) 2007-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 define trxedimax
/jffs2-128k
9 -a
0x20000 -f
$(KDIR
)/root.jffs2-128k
12 define trxedimax
/jffs2-64k
13 -a
0x10000 -f
$(KDIR
)/root.jffs2-64k
16 define trxedimax
/squashfs
17 -a
1024 -f
$(KDIR
)/root.squashfs
20 define Image
/Build
/TRXEdimax
21 $(STAGING_DIR_HOST
)/bin
/trx
-o
$(1) -f
$(KDIR
)/vmlinux.lzma \
22 $(call trxedimax
/$(2))
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
)
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
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
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
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
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
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
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 \
101 -b0x20000
:0x10000:h
:$(KDIR
)/loader-
$(2).gz \
102 -b0x30000
:0::$(call imgname
,$(1),$(2)).trx \
103 $(call imgname
,$(1),$(2)).bin
107 # Cellvision CAS-630/630W, CAS-670/670W, NFS-101U/101WU, NFS-202U/202WU
109 define Image
/Build
/Template
/Cellvision
110 $(call Image
/Build
/Cellvision
,$(1),$(2),$(3))
113 define Image
/Build
/Template
/Cellvision
/squashfs
114 $(call Image
/Build
/Template
/Cellvision
,squashfs
,$(1),$(2))
117 define Image
/Build
/Template
/Cellvision
/jffs2-64k
118 $(call Image
/Build
/Template
/Cellvision
,jffs2-64k
,$(1),$(2))
122 # Cellvision CAS-700/700W, CAS-771/771W, CAS-790, CAS-861/861W
124 define Image
/Build
/Template
/Cellvision2
125 $(call Image
/Build
/Cellvision2
,$(1),$(2),$(3))
128 define Image
/Build
/Template
/Cellvision2
/squashfs
129 $(call Image
/Build
/Template
/Cellvision2
,squashfs
,$(1),$(2))
132 define Image
/Build
/Template
/Cellvision2
/jffs2-64k
133 $(call Image
/Build
/Template
/Cellvision2
,jffs2-64k
,$(1),$(2))
136 define Image
/Build
/Template
/Cellvision2
/Initramfs
137 $(call Image
/Build
/LZMAKernel
/Cellvision
,$(1),$(2),gz
)
141 # Compex NP27G, NP28G, WP54G, WP54AG, WPP54G, WPP54AG
143 define Image
/Build
/Template
/Compex
144 $(call Image
/Build
/MyLoader
,$(1),$(2))
147 define Image
/Build
/Template
/Compex
/squashfs
148 $(call Image
/Build
/Template
/Compex
,squashfs
,$(1))
151 define Image
/Build
/Template
/Compex
/jffs2-64k
152 $(call Image
/Build
/Template
/Compex
,jffs2-64k
,$(1))
155 define Image
/Build
/Template
/Compex
/Initramfs
156 $(call Image
/Build
/LZMAKernel
/Generic
,$(1),bin
)
162 define Image
/Build
/Template
/WP54GWRT
163 $(call Image
/Build
/Compex
,$(1),wp54g-wrt
)
166 define Image
/Build
/Template
/WP54GWRT
/squashfs
167 $(call Image
/Build
/Template
/WP54GWRT
,squashfs
)
170 define Image
/Build
/Template
/WP54GWRT
/jffs2-64k
171 $(call Image
/Build
/Template
/WP54GWRT
,jffs2-64k
)
174 define Image
/Build
/Template
/WP54GWRT
/Initramfs
175 $(call Image
/Build
/LZMAKernel
/KArgs
,wp54g-wrt
,bin
)
179 # Edimax BR-6104K, BR-6104KP, BR-6104Wg, BR-6114WG
181 define Image
/Build
/Template
/Edimax
182 $(call Image
/Build
/Edimax
,$(1),$(2))
185 define Image
/Build
/Template
/Edimax
/squashfs
186 $(call Image
/Build
/Template
/Edimax
,squashfs
,$(1))
189 define Image
/Build
/Template
/Edimax
/Initramfs
190 $(call Image
/Build
/LZMAKernel
/Admboot
,$(1),gz
)
194 # Infineon EASY 5120, EASY 83000
196 define Image
/Build
/Template
/Infineon
197 $(call Image
/Build
/Infineon
,$(1),$(2))
200 define Image
/Build
/Template
/Infineon
/squashfs
201 $(call Image
/Build
/Template
/Infineon
,squashfs
,$(1))
204 define Image
/Build
/Template
/Infineon
/jffs2-64k
205 $(call Image
/Build
/Template
/Infineon
,jffs2-64k
,$(1))
208 define Image
/Build
/Template
/Infineon
/Initramfs
209 $(call Image
/Build
/LZMAKernel
/Admboot
,$(1),gz
)
215 define Image
/Build
/Template
/Edimax
/Initramfs
216 $(call Image
/Build
/LZMAKernel
/Admboot
,eb-214a
,bin
)
221 # Mikrotik RouterBOARD 1xx
223 define Image
/Build
/Template
/Mikrotik
/Initramfs
224 $(CP
) $(KDIR
)/vmlinux.elf
$(call imgname
,netboot
,rb1xx
)
230 define Image
/Build
/Template
/Osbridge
231 $(call Image
/Build
/Osbridge
,$(1),$(2))
234 define Image
/Build
/Template
/Osbridge
/squashfs
235 $(call Image
/Build
/Template
/Osbridge
,squashfs
,$(1))
238 define Image
/Build
/Template
/Osbridge
/Initramfs
239 $(call Image
/Build
/LZMAKernel
/Admboot
,$(1),gz
)
245 define Image
/Build
/Profile
/CAS630
246 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-630
,cas-630
)
249 define Image
/Build
/Profile
/CAS630W
250 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-630w
,cas-630
)
253 define Image
/Build
/Profile
/CAS670
254 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-670
,cas-670
)
257 define Image
/Build
/Profile
/CAS670W
258 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-670w
,cas-670
)
261 define 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
)
270 define 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
)
275 define Image
/Build
/Profile
/CAS700
276 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-700
,cas-700
)
279 define Image
/Build
/Profile
/CAS700W
280 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-700w
,cas-700
)
283 define Image
/Build
/Profile
/CAS771
284 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-771
,cas-771
)
287 define Image
/Build
/Profile
/CAS771W
288 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-771w
,cas-771
)
291 define Image
/Build
/Profile
/CAS790
292 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-790
,cas-790
)
295 define Image
/Build
/Profile
/CAS861
296 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-861
,cas-861
)
299 define Image
/Build
/Profile
/CAS861W
300 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-861w
,cas-861
)
303 define Image
/Build
/Profile
/NP27G
304 $(call Image
/Build
/Template
/Compex
/$(1),np27g
)
307 define Image
/Build
/Profile
/NP28G
308 $(call Image
/Build
/Template
/Compex
/$(1),np28g
)
311 define 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))
319 define Image
/Build
/Profile
/BR6104K
320 $(call Image
/Build
/Template
/Edimax
/$(1),br-6104k
)
323 define Image
/Build
/Profile
/BR6104KP
324 $(call Image
/Build
/Template
/Edimax
/$(1),br-6104kp
)
327 define Image
/Build
/Profile
/BR6104WG
328 $(call Image
/Build
/Template
/Edimax
/$(1),br-6104wg
)
331 define Image
/Build
/Profile
/BR6114WG
332 $(call Image
/Build
/Template
/Edimax
/$(1),br-6114wg
)
335 define Image
/Build
/Profile
/EASY83000
336 $(call Image
/Build
/Template
/Infineon
/$(1),easy-83000
)
339 define Image
/Build
/Profile
/EASY5120RT
340 $(call Image
/Build
/Template
/Infineon
/$(1),easy-5120-rt
)
343 define Image
/Build
/Profile
/EASY5120PATA
344 $(call Image
/Build
/Template
/Infineon
/$(1),easy-5120p-ata
)
347 define Image
/Build
/Profile
/PMUGW
348 $(call Image
/Build
/Template
/Infineon
/$(1),powerline-mugw
)
351 define Image
/Build
/Profile
/5GXI
352 $(call Image
/Build
/Template
/Osbridge
/$(1),5gxi
)
355 define Image
/Build
/Profile
/RouterBoard
356 $(call Image
/Build
/Template
/Mikrotik
/$(1))
359 ifeq ($(CONFIG_BROKEN
),y
)
360 define Image
/Build
/Experimental
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))
373 $(call Image
/Build
/Profile
/PMUGW
,$(1))
375 $(call Image
/Build
/Profile
/5GXI
,$(1))
379 define Image
/Build
/Profile
/Generic
381 $(call Image
/Build
/Profile
/NFS101U
,$(1))
382 $(call Image
/Build
/Profile
/NFS101WU
,$(1))
384 $(call Image
/Build
/Profile
/WP54
,$(1))
385 $(call Image
/Build
/Profile
/NP27G
,$(1))
386 $(call Image
/Build
/Profile
/NP28G
,$(1))
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))
394 $(call Image
/Build
/Profile
/EASY83000
,$(1))
395 $(call Image
/Build
/Profile
/EASY5120RT
,$(1))
396 $(call Image
/Build
/Profile
/EASY5120PATA
,$(1))
398 $(call Image
/Build
/Profile
/RB1xx
/$(1))
400 $(call Image
/Build
/Experimental
,$(1))
403 ifeq ($(PROFILE
),RouterBoard
)
404 define Image
/cmdline
/yaffs2
405 root
=/dev
/mtdblock3 rootfstype
=yaffs2
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))'
414 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
415 define Image
/BuildKernel
416 $(call Image
/BuildKernel
/RouterBoard
)