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
)
213 # Mikrotik RouterBOARD 1xx
215 define Image
/Build
/Template
/Mikrotik
/Initramfs
216 $(CP
) $(KDIR
)/vmlinux.elf
$(call imgname
,netboot
,rb1xx
)
222 define Image
/Build
/Template
/Osbridge
223 $(call Image
/Build
/Osbridge
,$(1),$(2))
226 define Image
/Build
/Template
/Osbridge
/squashfs
227 $(call Image
/Build
/Template
/Osbridge
,squashfs
,$(1))
230 define Image
/Build
/Template
/Osbridge
/Initramfs
231 $(call Image
/Build
/LZMAKernel
/Admboot
,$(1),gz
)
237 define Image
/Build
/Profile
/CAS630
238 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-630
,cas-630
)
241 define Image
/Build
/Profile
/CAS630W
242 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-630w
,cas-630
)
245 define Image
/Build
/Profile
/CAS670
246 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-670
,cas-670
)
249 define Image
/Build
/Profile
/CAS670W
250 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-670w
,cas-670
)
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
)
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
)
267 define Image
/Build
/Profile
/CAS700
268 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-700
,cas-700
)
271 define Image
/Build
/Profile
/CAS700W
272 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-700w
,cas-700
)
275 define Image
/Build
/Profile
/CAS771
276 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-771
,cas-771
)
279 define Image
/Build
/Profile
/CAS771W
280 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-771w
,cas-771
)
283 define Image
/Build
/Profile
/CAS790
284 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-790
,cas-790
)
287 define Image
/Build
/Profile
/CAS861
288 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-861
,cas-861
)
291 define Image
/Build
/Profile
/CAS861W
292 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-861w
,cas-861
)
295 define Image
/Build
/Profile
/NP27G
296 $(call Image
/Build
/Template
/Compex
/$(1),np27g
)
299 define Image
/Build
/Profile
/NP28G
300 $(call Image
/Build
/Template
/Compex
/$(1),np28g
)
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))
311 define Image
/Build
/Profile
/BR6104K
312 $(call Image
/Build
/Template
/Edimax
/$(1),br-6104k
)
315 define Image
/Build
/Profile
/BR6104KP
316 $(call Image
/Build
/Template
/Edimax
/$(1),br-6104kp
)
319 define Image
/Build
/Profile
/BR6104WG
320 $(call Image
/Build
/Template
/Edimax
/$(1),br-6104wg
)
323 define Image
/Build
/Profile
/BR6114WG
324 $(call Image
/Build
/Template
/Edimax
/$(1),br-6114wg
)
327 define Image
/Build
/Profile
/EASY83000
328 $(call Image
/Build
/Template
/Infineon
/$(1),easy-83000
)
331 define Image
/Build
/Profile
/EASY5120RT
332 $(call Image
/Build
/Template
/Infineon
/$(1),easy-5120-rt
)
335 define Image
/Build
/Profile
/EASY5120PATA
336 $(call Image
/Build
/Template
/Infineon
/$(1),easy-5120p-ata
)
339 define Image
/Build
/Profile
/PMUGW
340 $(call Image
/Build
/Template
/Infineon
/$(1),powerline-mugw
)
343 define Image
/Build
/Profile
/5GXI
344 $(call Image
/Build
/Template
/Osbridge
/$(1),5gxi
)
347 define Image
/Build
/Profile
/RouterBoard
348 $(call Image
/Build
/Template
/Mikrotik
/$(1))
351 ifeq ($(CONFIG_BROKEN
),y
)
352 define Image
/Build
/Experimental
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))
365 $(call Image
/Build
/Profile
/PMUGW
,$(1))
367 $(call Image
/Build
/Profile
/5GXI
,$(1))
371 define Image
/Build
/Profile
/Generic
373 $(call Image
/Build
/Profile
/NFS101U
,$(1))
374 $(call Image
/Build
/Profile
/NFS101WU
,$(1))
376 $(call Image
/Build
/Profile
/WP54
,$(1))
377 $(call Image
/Build
/Profile
/NP27G
,$(1))
378 $(call Image
/Build
/Profile
/NP28G
,$(1))
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))
385 $(call Image
/Build
/Profile
/EASY83000
,$(1))
386 $(call Image
/Build
/Profile
/EASY5120RT
,$(1))
387 $(call Image
/Build
/Profile
/EASY5120PATA
,$(1))
389 $(call Image
/Build
/Profile
/RB1xx
/$(1))
391 $(call Image
/Build
/Experimental
,$(1))
394 ifeq ($(PROFILE
),RouterBoard
)
395 define Image
/cmdline
/yaffs2
396 root
=/dev
/mtdblock3 rootfstype
=yaffs2
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))'
405 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
406 define Image
/BuildKernel
407 $(call Image
/BuildKernel
/RouterBoard
)