2 # Copyright (C) 2007,2008 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
/Infineon
47 $(call Image
/Build
/Loader
,$(2),gz
,0x80500000,0x6D8,y
,$(2))
48 $(call Image
/Build
/TRXNoloader
,$(call imgname
,$(1),$(2)).trx
,$(1))
49 dd if
=$(KDIR
)/loader-
$(2).gz of
=$(call imgname
,$(1),$(2)).img bs
=64k conv
=sync
50 cat
$(call imgname
,$(1),$(2)).trx
>> $(call imgname
,$(1),$(2)).img
53 define Image
/Build
/Cellvision
54 $(call Image
/Build
/Loader
,$(2),bin
,0x80500000,0x6D8,y
,$(3))
55 mkdir
-p
$(BIN_DIR
)/tmp
56 cp
$(KDIR
)/loader-
$(2).bin
$(BIN_DIR
)/tmp
/vmlinux.bin
57 gzip
-9 $(BIN_DIR
)/tmp
/vmlinux.bin
58 dd if
=$(BIN_DIR
)/tmp
/vmlinux.bin.gz of
=$(call imgname
,$(1),$(2))-xmodem.bin bs
=64k conv
=sync
60 $(call Image
/Build
/TRXNoloader
,$(call imgname
,$(1),$(2)).trx
,$(1))
61 cat
$(call imgname
,$(1),$(2)).trx
>> $(call imgname
,$(1),$(2))-xmodem.bin
62 $(STAGING_DIR_HOST
)/bin
/mkcasfw
-B
$(2) -d \
63 -K
$(call imgname
,$(1),$(2))-xmodem.bin \
64 $(call imgname
,$(1),$(2))-webui.bin
67 define Image
/Build
/Cellvision2
68 # only for CAS-700/771/790/861
69 $(call Image
/Build
/Loader
,$(2),gz
,0x80500000,0x6D8,y
,$(3))
70 $(call Image
/Build
/TRXNoloader
,$(call imgname
,$(1),$(2)).trx
,$(1))
71 dd if
=$(KDIR
)/loader-
$(2).gz of
=$(call imgname
,$(1),$(2)).bin bs
=64k conv
=sync
72 cat
$(call imgname
,$(1),$(2)).trx
>> $(call imgname
,$(1),$(2)).bin
73 echo
-ne
'\x14\x07\x24\x06$(2)' | dd bs
=14 count
=1 conv
=sync
>> $(call imgname
,$(1),$(2)).bin
74 echo
-ne
'OpenWrt\x00\x00\x00' >> $(call imgname
,$(1),$(2)).bin
77 define Image
/Build
/MyLoader
78 $(call Image
/Build
/Loader
,$(2),gz
,0x80500000,0)
79 $(call Image
/Build
/TRXNoloader
,$(call imgname
,$(1),$(2)).trx
,$(1))
80 $(STAGING_DIR_HOST
)/bin
/mkmylofw
-B
$(2) \
81 -p0x20000
:0x10000:ahp
:0x80001000 \
83 -b0x20000
:0x10000:h
:$(KDIR
)/loader-
$(2).gz \
84 -b0x30000
:0::$(call imgname
,$(1),$(2)).trx \
85 $(call imgname
,$(1),$(2)).bin
89 # Cellvision CAS-630/630W, CAS-670/670W, NFS-101U/101WU, NFS-202U/202WU
91 define Image
/Build
/Template
/Cellvision
92 $(call Image
/Build
/Cellvision
,$(1),$(2),$(3))
95 define Image
/Build
/Template
/Cellvision
/squashfs
96 $(call Image
/Build
/Template
/Cellvision
,squashfs
,$(1),$(2))
99 define Image
/Build
/Template
/Cellvision
/jffs2-64k
100 $(call Image
/Build
/Template
/Cellvision
,jffs2-64k
,$(1),$(2))
104 # Cellvision CAS-700/700W, CAS-771/771W, CAS-790, CAS-861/861W
106 define Image
/Build
/Template
/Cellvision2
107 $(call Image
/Build
/Cellvision2
,$(1),$(2),$(3))
110 define Image
/Build
/Template
/Cellvision2
/squashfs
111 $(call Image
/Build
/Template
/Cellvision2
,squashfs
,$(1),$(2))
114 define Image
/Build
/Template
/Cellvision2
/jffs2-64k
115 $(call Image
/Build
/Template
/Cellvision2
,jffs2-64k
,$(1),$(2))
118 define Image
/Build
/Template
/Cellvision2
/Initramfs
119 $(call Image
/Build
/LZMAKernel
/Cellvision
,$(1),$(2),gz
)
123 # Compex NP27G, NP28G, WP54G, WP54AG, WPP54G, WPP54AG
125 define Image
/Build
/Template
/Compex
126 $(call Image
/Build
/MyLoader
,$(1),$(2))
129 define Image
/Build
/Template
/Compex
/squashfs
130 $(call Image
/Build
/Template
/Compex
,squashfs
,$(1))
133 define Image
/Build
/Template
/Compex
/jffs2-64k
134 $(call Image
/Build
/Template
/Compex
,jffs2-64k
,$(1))
137 define Image
/Build
/Template
/Compex
/Initramfs
138 $(call Image
/Build
/LZMAKernel
/Generic
,$(1),bin
)
144 define Image
/Build
/Template
/WP54GWRT
145 $(call Image
/Build
/Compex
,$(1),wp54g-wrt
)
148 define Image
/Build
/Template
/WP54GWRT
/squashfs
149 $(call Image
/Build
/Template
/WP54GWRT
,squashfs
)
152 define Image
/Build
/Template
/WP54GWRT
/jffs2-64k
153 $(call Image
/Build
/Template
/WP54GWRT
,jffs2-64k
)
156 define Image
/Build
/Template
/WP54GWRT
/Initramfs
157 $(call Image
/Build
/LZMAKernel
/KArgs
,wp54g-wrt
,bin
)
161 # Edimax BR-6104K, BR-6104KP, BR-6104Wg, BR-6114WG
163 define Image
/Build
/Template
/Edimax
164 $(call Image
/Build
/Edimax
,$(1),$(2))
167 define Image
/Build
/Template
/Edimax
/squashfs
168 $(call Image
/Build
/Template
/Edimax
,squashfs
,$(1))
171 define Image
/Build
/Template
/Edimax
/Initramfs
172 $(call Image
/Build
/LZMAKernel
/Admboot
,$(1),gz
)
176 # Infineon EASY 5120, EASY 83000
178 define Image
/Build
/Template
/Infineon
179 $(call Image
/Build
/Infineon
,$(1),$(2))
182 define Image
/Build
/Template
/Infineon
/squashfs
183 $(call Image
/Build
/Template
/Infineon
,squashfs
,$(1))
186 define Image
/Build
/Template
/Infineon
/jffs2-64k
187 $(call Image
/Build
/Template
/Infineon
,jffs2-64k
,$(1))
190 define Image
/Build
/Template
/Infineon
/Initramfs
191 $(call Image
/Build
/LZMAKernel
/Admboot
,$(1),gz
)
195 # Mikrotik RouterBOARD 1xx
197 define Image
/Build
/Template
/Mikrotik
/Initramfs
198 $(CP
) $(KDIR
)/vmlinux.elf
$(call imgname
,netboot
,rb1xx
)
204 define Image
/Build
/Profile
/CAS630
205 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-630
,cas-630
)
208 define Image
/Build
/Profile
/CAS630W
209 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-630w
,cas-630
)
212 define Image
/Build
/Profile
/CAS670
213 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-670
,cas-670
)
216 define Image
/Build
/Profile
/CAS670W
217 $(call Image
/Build
/Template
/Cellvision
/$(1),cas-670w
,cas-670
)
220 define Image
/Build
/Profile
/NFS101U
221 $(call Image
/Build
/Template
/Cellvision
/$(1),nfs-101u
,nfs-101u
)
222 $(call Image
/Build
/Template
/Cellvision
/$(1),dn-7013
,nfs-101u
)
223 $(call Image
/Build
/Template
/Cellvision
/$(1),dns-120
,nfs-101u
)
224 $(call Image
/Build
/Template
/Cellvision
/$(1),mu-5000fs
,nfs-101u
)
225 $(call Image
/Build
/Template
/Cellvision
/$(1),tn-u100
,nfs-101u
)
228 define Image
/Build
/Profile
/NFS101WU
229 $(call Image
/Build
/Template
/Cellvision
/$(1),nfs-101wu
,nfs-101u
)
230 $(call Image
/Build
/Template
/Cellvision
/$(1),dns-g120
,nfs-101u
)
233 define Image
/Build
/Profile
/CAS700
234 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-700
,cas-700
)
237 define Image
/Build
/Profile
/CAS700W
238 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-700w
,cas-700
)
241 define Image
/Build
/Profile
/CAS771
242 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-771
,cas-771
)
245 define Image
/Build
/Profile
/CAS771W
246 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-771w
,cas-771
)
249 define Image
/Build
/Profile
/CAS790
250 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-790
,cas-790
)
253 define Image
/Build
/Profile
/CAS861
254 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-861
,cas-861
)
257 define Image
/Build
/Profile
/CAS861W
258 $(call Image
/Build
/Template
/Cellvision2
/$(1),cas-861w
,cas-861
)
261 define Image
/Build
/Profile
/NP27G
262 $(call Image
/Build
/Template
/Compex
/$(1),np27g
)
265 define Image
/Build
/Profile
/NP28G
266 $(call Image
/Build
/Template
/Compex
/$(1),np28g
)
269 define Image
/Build
/Profile
/WP54
270 $(call Image
/Build
/Template
/Compex
/$(1),wp54g
)
271 $(call Image
/Build
/Template
/Compex
/$(1),wp54ag
)
272 $(call Image
/Build
/Template
/Compex
/$(1),wpp54g
)
273 $(call Image
/Build
/Template
/Compex
/$(1),wpp54ag
)
274 $(call Image
/Build
/Template
/WP54GWRT
/$(1))
277 define Image
/Build
/Profile
/BR6104K
278 $(call Image
/Build
/Template
/Edimax
/$(1),br-6104k
)
281 define Image
/Build
/Profile
/BR6104KP
282 $(call Image
/Build
/Template
/Edimax
/$(1),br-6104kp
)
285 define Image
/Build
/Profile
/BR6104WG
286 $(call Image
/Build
/Template
/Edimax
/$(1),br-6104wg
)
289 define Image
/Build
/Profile
/BR6114WG
290 $(call Image
/Build
/Template
/Edimax
/$(1),br-6114wg
)
293 define Image
/Build
/Profile
/EASY83000
294 $(call Image
/Build
/Template
/Infineon
/$(1),easy-83000
)
297 define Image
/Build
/Profile
/EASY5120RT
298 $(call Image
/Build
/Template
/Infineon
/$(1),easy-5120-rt
)
301 define Image
/Build
/Profile
/EASY5120PATA
302 $(call Image
/Build
/Template
/Infineon
/$(1),easy-5120p-ata
)
305 define Image
/Build
/Profile
/PMUGW
306 $(call Image
/Build
/Template
/Infineon
/$(1),powerline-mugw
)
309 define Image
/Build
/Profile
/RouterBoard
310 $(call Image
/Build
/Template
/Mikrotik
/$(1))
313 ifeq ($(CONFIG_BROKEN
),y
)
314 define Image
/Build
/Experimental
316 $(call Image
/Build
/Profile
/CAS630
,$(1))
317 $(call Image
/Build
/Profile
/CAS630W
,$(1))
318 $(call Image
/Build
/Profile
/CAS670
,$(1))
319 $(call Image
/Build
/Profile
/CAS670W
,$(1))
320 $(call Image
/Build
/Profile
/CAS700
,$(1))
321 $(call Image
/Build
/Profile
/CAS700W
,$(1))
322 $(call Image
/Build
/Profile
/CAS771
,$(1))
323 $(call Image
/Build
/Profile
/CAS771W
,$(1))
324 $(call Image
/Build
/Profile
/CAS861
,$(1))
325 $(call Image
/Build
/Profile
/CAS861W
,$(1))
326 $(call Image
/Build
/Profile
/NFS101U
,$(1))
327 $(call Image
/Build
/Profile
/NFS101WU
,$(1))
329 $(call Image
/Build
/Profile
/PMUGW
,$(1))
333 define Image
/Build
/Profile
/Generic
335 $(call Image
/Build
/Profile
/WP54
,$(1))
336 $(call Image
/Build
/Profile
/NP27G
,$(1))
337 $(call Image
/Build
/Profile
/NP28G
,$(1))
339 $(call Image
/Build
/Profile
/BR6104K
,$(1))
340 $(call Image
/Build
/Profile
/BR6104KP
,$(1))
341 $(call Image
/Build
/Profile
/BR6104WG
,$(1))
342 $(call Image
/Build
/Profile
/BR6114WG
,$(1))
344 $(call Image
/Build
/Profile
/EASY83000
,$(1))
345 $(call Image
/Build
/Profile
/EASY5120RT
,$(1))
346 $(call Image
/Build
/Profile
/EASY5120PATA
,$(1))
348 $(call Image
/Build
/Profile
/RB1xx
/$(1))
350 $(call Image
/Build
/Experimental
,$(1))
353 ifeq ($(PROFILE
),RouterBoard
)
354 define Image
/cmdline
/yaffs2
355 root
=/dev
/mtdblock3 rootfstype
=yaffs2 init
=/etc
/preinit
358 define Image
/BuildKernel
/RouterBoard
359 $(CP
) $(KDIR
)/vmlinux.elf
$(call imgname
,kernel
,rb1xx
)
360 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(call imgname
,kernel
,rb1xx
) \
361 '$(strip $(call Image/cmdline/yaffs2))'
364 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
365 define Image
/BuildKernel
366 $(call Image
/BuildKernel
/RouterBoard
)