2 # Copyright (C) 2008-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
11 $(BIN_DIR
)/$(IMG_PREFIX
)-$(2)-$(patsubst jffs2-
%,jffs2
,$(patsubst squashfs-
%,squashfs
,$(1)))
14 VMLINUX
:=$(BIN_DIR
)/$(IMG_PREFIX
)-vmlinux
15 UIMAGE
:=$(BIN_DIR
)/$(IMG_PREFIX
)-uImage
16 fs_squash
:=squashfs-only
21 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
27 VMLINUX
:=$(BIN_DIR
)/$(IMG_PREFIX
)-vmlinux-initramfs
28 UIMAGE
:=$(BIN_DIR
)/$(IMG_PREFIX
)-uImage-initramfs
32 $(STAGING_DIR_HOST
)/bin
/lzma e
$(1) -lc1
-lp2
-pb2
$(2)
35 define PatchKernelLzma
36 cp
$(KDIR
)/vmlinux
$(KDIR
)/vmlinux-
$(1)
37 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(KDIR
)/vmlinux-
$(1) '$(strip $(2))'
38 $(call CompressLzma
,$(KDIR
)/vmlinux-
$(1),$(KDIR
)/vmlinux-
$(1).bin.lzma
)
41 define PatchKernelGzip
42 cp
$(KDIR
)/vmlinux
$(KDIR
)/vmlinux-
$(1)
43 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(KDIR
)/vmlinux-
$(1) '$(strip $(2))'
44 gzip
-9 -c
$(KDIR
)/vmlinux-
$(1) > $(KDIR
)/vmlinux-
$(1).bin.gz
48 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C lzma \
49 -e
0x80060000 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
54 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C gzip \
55 -e
0x80060000 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
59 define Image
/BuildKernel
60 cp
$(KDIR
)/vmlinux.elf
$(VMLINUX
).elf
61 cp
$(KDIR
)/vmlinux
$(VMLINUX
).bin
62 gzip
-9 -c
$(KDIR
)/vmlinux
> $(KDIR
)/vmlinux.bin.gz
63 $(call CompressLzma
,$(KDIR
)/vmlinux
,$(KDIR
)/vmlinux.bin.lzma
)
64 dd if
=$(KDIR
)/vmlinux.bin.lzma of
=$(VMLINUX
).lzma bs
=65536 conv
=sync
65 dd if
=$(KDIR
)/vmlinux.bin.gz of
=$(VMLINUX
).gz bs
=65536 conv
=sync
66 $(call MkImageGzip
,$(KDIR
)/vmlinux.bin.gz
,$(UIMAGE
)-gzip.bin
)
67 $(call MkImageLzma
,$(KDIR
)/vmlinux.bin.lzma
,$(UIMAGE
)-lzma.bin
)
68 $(call Image
/Build
/Initramfs
)
71 define Image
/Build
/WRT400N
72 $(call PatchKernelLzma
,$(2),$(3))
73 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt
1310720 ]; then \
74 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
75 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
6488064 ]; then \
76 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
78 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C lzma
-e \
80 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
81 -d
$(KDIR
)/vmlinux-
$(2).bin.lzma
$(KDIR
)/vmlinux-
$(2).uImage
; \
83 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=1280k conv
=sync
; \
84 dd if
=$(KDIR
)/root.
$(1) \
85 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
86 wrt400n
$(KDIR
)/vmlinux-
$(2).uImage
$(KDIR
)/root.
$(1) $(call imgname
,$(1),$(2))-factory.bin
; \
90 dir825b1_mtdlayout
=mtdparts
=spi0.0
:256k
(uboot
)ro
,64k
(config
)ro
,1024k
(kernel
),5184k
(rootfs
),64k
(caldata
)ro
,1600k
(unknown
)ro
,6208k@
0x50000(firmware
)
91 define Image
/Build
/DIR825B1
92 $(call PatchKernelLzma
,$(2),$(3) $(dir825b1_mtdlayout
))
93 $(call MkImageLzma
,$(KDIR
)/vmlinux-
$(2).bin.lzma
,$(call imgname
,$(1),$(2)).bin
)
94 if
[ `stat -c%s "$(call imgname,$(1),$(2)).bin"` -gt
1048576 ]; then \
95 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
96 rm -f
$(call imgname
,$(1),$(2)).bin
; \
97 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
5308416 ]; then \
98 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
99 rm -f
$(call imgname
,$(1),$(2)).bin
; \
101 dd if
=$(KDIR
)/root.
$(1) of
=$(call imgname
,$(1),$(2)).bin bs
=1k seek
=1024; \
102 cp
$(call imgname
,$(1),$(2)).bin
$(call imgname
,$(1),$(2))-backup-loader.bin
; \
103 echo
-n
"01AP94-AR7161-RT-080619-00" >> $(call imgname
,$(1),$(2))-backup-loader.bin
; \
107 define Image
/Build
/WZRHPG300NH
108 $(call PatchKernelLzma
,$(2),$(3))
109 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt
1048576 ]; then \
110 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
111 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
31850496 ]; then \
112 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
114 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C lzma
-e \
116 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
117 -d
$(KDIR
)/vmlinux-
$(2).bin.lzma
$(KDIR
)/vmlinux-
$(2).uImage
; \
119 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=1024k conv
=sync
; \
120 dd if
=$(KDIR
)/root.
$(1) bs
=128k conv
=sync
; \
121 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
123 echo
-n
-e
"# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
124 dd if
=$(call imgname
,$(1),$(2))-sysupgrade.bin
; \
125 ) > $(call imgname
,$(1),$(2))-tftp.bin
; \
129 cameo_mtdlayout
=mtdparts
=spi0.0
:128k
(u-boot
)ro
,64k
(config
)ro
,896k
(kernel
),2944k
(rootfs
),64k
(art
)ro
,3840k@
0x30000(firmware
)
130 define Image
/Build
/Cameo
131 $(call PatchKernelLzma
,$(2),$(3) $(cameo_mtdlayout
))
132 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt
917504 ]; then \
133 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
134 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
2949120 ]; then \
135 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
137 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C lzma
-e \
139 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
140 -d
$(KDIR
)/vmlinux-
$(2).bin.lzma
$(KDIR
)/vmlinux-
$(2).uImage
; \
142 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=896k conv
=sync
; \
143 dd if
=$(KDIR
)/root.
$(1) \
144 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
146 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=896k conv
=sync
; \
147 dd if
=$(KDIR
)/root.
$(1) bs
=2880k conv
=sync
; \
149 ) > $(call imgname
,$(1),$(2))-factory.bin
; \
153 cameo7240_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(nvram
)ro
,896k
(kernel
),2816k
(rootfs
),64k
(mac
)ro
,64k
(art
)ro
,3712k@
0x40000(firmware
)
154 define Image
/Build
/Cameo7240
155 $(call PatchKernelLzma
,$(2),$(3) $(cameo7240_mtdlayout
))
156 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt
917504 ]; then \
157 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
158 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
2818048 ]; then \
159 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
161 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C lzma
-e \
163 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
164 -d
$(KDIR
)/vmlinux-
$(2).bin.lzma
$(KDIR
)/vmlinux-
$(2).uImage
; \
166 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=896k conv
=sync
; \
167 dd if
=$(KDIR
)/root.
$(1) \
168 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
170 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=896k conv
=sync
; \
171 dd if
=$(KDIR
)/root.
$(1) bs
=2752k conv
=sync
; \
173 ) > $(call imgname
,$(1),$(2))-factory.bin
; \
177 define Image
/Build
/AP83
178 $(call PatchKernelGzip
,$(2),$(3))
179 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.gz"` -gt
1310720 ]; then \
180 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.gz is too big"; \
181 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
6619136 ]; then \
182 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
184 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C gzip
-e \
186 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
187 -d
$(KDIR
)/vmlinux-
$(2).bin.gz \
188 $(KDIR
)/vmlinux-
$(2).uImage
; \
189 dd if
=$(KDIR
)/vmlinux-
$(2).uImage \
190 of
=$(call imgname
,kernel
,$(2)).bin bs
=64k conv
=sync
; \
191 dd if
=$(KDIR
)/root.
$(1) \
192 of
=$(call imgname
,$(1),$(2)-rootfs
).bin bs
=128k conv
=sync
; \
194 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=1280k conv
=sync
; \
195 dd if
=$(KDIR
)/root.
$(1); \
196 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
200 define Image
/Build
/PB92
201 $(call PatchKernelGzip
,$(2),$(3))
202 if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
2818048 ]; then \
203 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
205 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C gzip
-e \
207 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
208 -d
$(KDIR
)/vmlinux-
$(2).bin.gz \
209 $(KDIR
)/vmlinux-
$(2).uImage
; \
210 dd if
=$(KDIR
)/vmlinux-
$(2).uImage \
211 of
=$(call imgname
,kernel
,$(2)).bin bs
=64k conv
=sync
; \
212 dd if
=$(KDIR
)/root.
$(1) \
213 of
=$(call imgname
,$(1),$(2)-rootfs
).bin bs
=128k conv
=sync
; \
215 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=896k conv
=sync
; \
216 dd if
=$(KDIR
)/root.
$(1); \
217 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
221 define Image
/Build
/PB4X
222 $(call PatchKernelLzma
,$(2),$(3))
223 dd if
=$(KDIR
)/vmlinux-
$(2).bin.lzma \
224 of
=$(call imgname
,kernel
,$(2)).bin bs
=64k conv
=sync
225 dd if
=$(KDIR
)/root.
$(1) \
226 of
=$(call imgname
,$(1),$(2)-rootfs
).bin bs
=128k conv
=sync
227 -sh
$(TOPDIR
)/scripts
/combined-image.sh \
228 "$(call imgname,kernel,$(2)).bin" \
229 "$(call imgname,$(1),$(2)-rootfs).bin" \
230 $(call imgname
,$(1),$(2))-sysupgrade.bin
233 define Image
/Build
/MyLoader
234 -$(STAGING_DIR_HOST
)/bin
/mkmylofw
-B
$(2) -s
$(3) \
235 -p0x030000
:0xe0000:al
:0x80060000:kernel
:$(KDIR
)/vmlinux.bin.lzma \
236 -p0x110000
:0:::rootfs
:$(KDIR
)/root.
$(1) \
237 $(call imgname
,$(1),$(2))-$(4)-factory.img
240 ubntxm_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1024k
(kernel
),6528k
(rootfs
),256k
(cfg
)ro
,64k
(EEPROM
)ro
,7552k@
0x50000(firmware
)
241 define Image
/Build
/UBNTXM
242 $(call PatchKernelLzma
,$(2),$(3) $(ubntxm_mtdlayout
))
243 $(call MkImageLzma
,$(KDIR
)/vmlinux-
$(2).bin.lzma
,$(KDIR
)/vmlinux-
$(2).uImage.bin
)
244 dd if
=$(KDIR
)/vmlinux-
$(2).uImage.bin of
=$(KDIR
)/vmlinux-
$(2).uImage bs
=1024k conv
=sync
245 -$(STAGING_DIR_HOST
)/bin
/mkfwimage \
246 -B
$(4) -v
$(5).
$(6).OpenWrt.
$(REVISION
) \
247 -k
$(KDIR
)/vmlinux-
$(2).uImage \
248 -r
$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) \
249 -o
$(call imgname
,$(1),$(2))-factory.bin
251 dd if
=$(KDIR
)/vmlinux-
$(2).uImage
; \
252 dd if
=$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1); \
253 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
256 define Image
/Build
/UBNT
257 $(call PatchKernelLzma
,$(2),$(3))
258 dd if
=$(KDIR
)/vmlinux-
$(2).bin.lzma of
=$(KDIR
)/vmlinux-
$(2).lzma bs
=64k conv
=sync
259 -$(STAGING_DIR_HOST
)/bin
/mkfwimage \
260 -B
$(4) -v
$(5).
$(6).OpenWrt.
$(REVISION
) \
261 -k
$(KDIR
)/vmlinux-
$(2).lzma \
262 -r
$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) \
263 -o
$(call imgname
,$(1),$(2))-factory.bin
264 -sh
$(TOPDIR
)/scripts
/combined-image.sh \
265 "$(KDIR)/vmlinux-$(2).lzma" \
266 "$(BIN_DIR)/$(IMG_PREFIX)-root.$(1)" \
267 $(call imgname
,$(1),$(2))-sysupgrade.bin
270 define Image
/Build
/Planex
271 $(call PatchKernelGzip
,$(2),$(3))
272 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.gz"` -gt
1441792 ]; then \
273 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.gz is too big"; \
274 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
6356992 ]; then \
275 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
277 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C gzip
-e \
279 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
280 -d
$(KDIR
)/vmlinux-
$(2).bin.gz
$(KDIR
)/vmlinux-
$(2).uImage
; \
282 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=1408k conv
=sync
; \
283 dd if
=$(KDIR
)/root.
$(1) bs
=6208k conv
=sync
; \
284 ) > $(call imgname
,$(1),$(2)).bin
; \
285 $(STAGING_DIR_HOST
)/bin
/mkplanexfw \
288 -i
$(call imgname
,$(1),$(2)).bin \
289 -o
$(call imgname
,$(1),$(2)).webui
; \
293 define Image
/Build
/TPLINK
294 $(call PatchKernelGzip
,$(2),$(3))
295 -$(STAGING_DIR_HOST
)/bin
/mktplinkfw \
296 -B
$(4) -N OpenWrt
-V
$(REVISION
)\
297 -k
$(KDIR
)/vmlinux-
$(2).bin.gz \
298 -r
$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) \
299 -o
$(call imgname
,$(1),$(2))-factory.bin
300 -$(STAGING_DIR_HOST
)/bin
/mktplinkfw \
301 -B
$(4) -N OpenWrt
-V
$(REVISION
) -s \
302 -k
$(KDIR
)/vmlinux-
$(2).bin.gz \
303 -r
$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) \
304 -o
$(call imgname
,$(1),$(2))-sysupgrade.bin
307 define Image
/Build
/TPLINK
/initramfs
308 $(call PatchKernelGzip
,$(2),$(3))
309 -$(STAGING_DIR_HOST
)/bin
/mktplinkfw
-c \
310 -B
$(4) -N OpenWrt
-V
$(REVISION
) -s \
311 -k
$(KDIR
)/vmlinux-
$(2).bin.gz \
312 -o
$(call imgname
,$(1),$(2))-uImage.bin
315 define Image
/Build
/CyberTAN
316 $(call PatchKernelGzip
,$(2),$(3))
317 $(call MkImageGzip
,$(KDIR
)/vmlinux-
$(2).bin.gz
,$(KDIR
)/vmlinux-
$(2).uImage
)
318 $(STAGING_DIR_HOST
)/bin
/trx
-o
$(KDIR
)/image.tmp
-f
$(KDIR
)/vmlinux-
$(2).uImage \
319 -x
32 -a
0x10000 -x
-32 -f
$(KDIR
)/root.
$(1)
320 -$(STAGING_DIR_HOST
)/bin
/addpattern
-B
$(2) -v v
$(4) \
321 -i
$(KDIR
)/image.tmp \
322 -o
$(call imgname
,$(1),$(2))-sysupgrade.bin
323 -$(STAGING_DIR_HOST
)/bin
/addpattern
-B
$(2) -v v
$(4) -g \
324 -i
$(KDIR
)/image.tmp \
325 -o
$(call imgname
,$(1),$(2))-factory.bin
329 wndr3700_mtdlayout
=mtdparts
=spi0.0
:320k
(u-boot
)ro
,128k
(u-boot-env
)ro
,1024k
(kernel
),6656k
(rootfs
),64k
(art
)ro
,7680k@
0x70000(firmware
)
330 define Image
/Build
/WNDR3700
331 $(call PatchKernelLzma
,$(2),$(3) $(wndr3700_mtdlayout
))
332 $(call MkImageLzma
,$(KDIR
)/vmlinux-
$(2).bin.lzma
,$(KDIR
)/vmlinux-
$(2).uImage
)
333 mkdir
-p
$(KDIR
)/wndr3700
/image
334 $(STAGING_DIR_HOST
)/bin
/wndr3700 \
335 $(KDIR
)/vmlinux-
$(2).uImage \
336 $(KDIR
)/wndr3700
/image
/uImage
337 $(STAGING_DIR_HOST
)/bin
/mksquashfs-lzma \
338 $(KDIR
)/wndr3700
$(KDIR
)/vmlinux-
$(2).uImage.squashfs.tmp \
339 -nopad
-noappend
-root-owned
-be
340 -rm -rf
$(KDIR
)/wndr3700
341 mkimage
-A mips
-O linux
-T filesystem
-C none \
342 -a
0xbf070000 -e
0xbf070000 \
343 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
344 -d
$(KDIR
)/vmlinux-
$(2).uImage.squashfs.tmp \
345 $(KDIR
)/vmlinux-
$(2).uImage.squashfs.tmp2
346 $(STAGING_DIR_HOST
)/bin
/wndr3700 \
347 $(KDIR
)/vmlinux-
$(2).uImage.squashfs.tmp2 \
348 $(KDIR
)/vmlinux-
$(2).uImage.squashfs
349 -rm -f
$(KDIR
)/vmlinux-
$(2).uImage.squashfs.tmp
*
351 dd if
=$(KDIR
)/vmlinux-
$(2).uImage.squashfs bs
=1024k conv
=sync
; \
352 dd if
=$(KDIR
)/root.
$(1) bs
=64k
; \
353 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
354 $(STAGING_DIR_HOST
)/bin
/mkdniimg \
355 -B WNDR3700
-v OpenWrt.
$(REVISION
) \
356 -i
$(call imgname
,$(1),$(2))-sysupgrade.bin \
357 -o
$(call imgname
,$(1),$(2))-factory.img
360 define Image
/Build
/WNDR3700
/initramfs
361 $(call PatchKernelLzma
,$(2),$(3) $(wndr3700_mtdlayout
))
362 $(call MkImageLzma
,$(KDIR
)/vmlinux-
$(2).bin.lzma
,$(KDIR
)/vmlinux-
$(2).uImage
)
363 $(STAGING_DIR_HOST
)/bin
/wndr3700 \
364 $(KDIR
)/vmlinux-
$(2).uImage \
365 $(call imgname
,$(1),$(2))-uImage.bin
368 define Image
/Build
/Template
/initramfs
/initramfs
369 $(call Image
/Build
/$(1)/initramfs
,initramfs
,$(2),$(3),$(4),$(5),$(6),$(7))
372 define Image
/Build
/Template
/all/squashfs
373 $(call Image
/Build
/$(1),squashfs
,$(2),$(3),$(4),$(5),$(6),$(7))
376 define Image
/Build
/Template
/all/jffs2-64k
377 $(call Image
/Build
/$(1),jffs2-64k
,$(2),$(3),$(4),$(5),$(6),$(7))
380 define Image
/Build
/Template
/all/jffs2-128k
381 $(call Image
/Build
/$(1),jffs2-128k
,$(2),$(3),$(4),$(5),$(6),$(7))
384 define Image
/Build
/Template
/squashfs-only
/squashfs
385 $(call Image
/Build
/$(1),squashfs
,$(2),$(3),$(4),$(5),$(6),$(7))
388 define Image
/Build
/Template
/4k
/squashfs
389 $(call Image
/Build
/$(1),squashfs-4k
,$(2),$(3),$(4),$(5),$(6),$(7))
392 define Image
/Build
/Template
/64k
/squashfs
393 $(call Image
/Build
/$(1),squashfs
,$(2),$(3),$(4),$(5),$(6),$(7))
396 define Image
/Build
/Template
/64k
/jffs2-64k
397 $(call Image
/Build
/$(1),jffs2-64k
,$(2),$(3),$(4),$(5),$(6),$(7))
400 define Image
/Build
/Template
/128k
/squashfs
401 $(call Image
/Build
/$(1),squashfs
,$(2),$(3),$(4),$(5),$(6),$(7))
404 define Image
/Build
/Template
/128k
/jffs2-128k
405 $(call Image
/Build
/$(1),jffs2-128k
,$(2),$(3),$(4),$(5),$(6),$(7))
408 define Image
/Build
/Profile
/AP81
409 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),AP83
,ap81
,board
=AP81
)
412 define Image
/Build
/Profile
/AP83
413 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),AP83
,ap83
,board
=AP83
)
416 define Image
/Build
/Profile
/PB42
417 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),PB4X
,pb42
,board
=PB42
)
420 define Image
/Build
/Profile
/PB44
421 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),PB4X
,pb44
,board
=PB44
)
424 define Image
/Build
/Profile
/PB92
425 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),PB92
,pb92
,board
=PB92
)
428 define Image
/Build
/Profile
/WP543
429 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),MyLoader
,wp543
,0x200000,2M
)
430 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),MyLoader
,wp543
,0x400000,4M
)
431 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),MyLoader
,wp543
,0x800000,8M
)
432 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),MyLoader
,wp543
,0x1000000,16M
)
435 define Image
/Build
/Profile
/DIR600A1
436 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),Cameo7240
,dir-600-a1
,board
=DIR-600-A1
,"AP91-AR7240-RT-090223-00")
439 define Image
/Build
/Profile
/FR54RTR
440 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),Cameo7240
,fr-54rtr
,board
=DIR-600-A1
,"AP91-AR7240-RT-090223-01")
443 define Image
/Build
/Profile
/DIR615C1
444 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),Cameo
,dir-615-c1
,board
=DIR-615-C1
,"AP81-AR9130-RT-070614-02")
447 define Image
/Build
/Profile
/TEW632BRP
448 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),Cameo
,tew-632brp
,board
=TEW-632BRP
,"AP81-AR9130-RT-070614-00")
451 define Image
/Build
/Profile
/TEW652BRP
452 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),Cameo
,tew-652brp
,board
=TEW-632BRP
,"AP81-AR9130-RT-080609-05")
455 define Image
/Build
/Profile
/A02RBW300N
456 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),Cameo
,a02-rb-w300n
,board
=TEW-632BRP
,"AP81-AR9130-RT-070614-03")
459 define Image
/Build
/Profile
/UBNTRS
460 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNT
,ubnt-rs
,board
=UBNT-RS
,RS
,RSx
,ar7100
)
463 define Image
/Build
/Profile
/UBNTRSPRO
464 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNT
,ubnt-rspro
,board
=UBNT-RSPRO
,RSPRO
,RSPRO
,ar7100pro
)
467 define Image
/Build
/Profile
/UBNTLSSR71
468 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNT
,ubnt-ls-sr71
,board
=UBNT-LS-SR71
,LS-SR71
,LS-SR71
,ar7100
)
471 define Image
/Build
/Profile
/UBNTBULLETM
472 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNTXM
,ubnt-bullet-m
,board
=UBNT-BM
,XM
,UBNTXM
,ar7240
)
475 define Image
/Build
/Profile
/UBNTROCKETM
476 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNTXM
,ubnt-rocket-m
,board
=UBNT-RM
,XM
,UBNTXM
,ar7240
)
479 define Image
/Build
/Profile
/UBNTNANOM
480 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNTXM
,ubnt-nano-m
,board
=UBNT-NM
,XM
,UBNTXM
,ar7240
)
483 define Image
/Build
/Profile
/UBNT
484 $(call Image
/Build
/Profile
/UBNTRS
,$(1))
485 $(call Image
/Build
/Profile
/UBNTRSPRO
,$(1))
486 $(call Image
/Build
/Profile
/UBNTLSSR71
,$(1))
487 $(call Image
/Build
/Profile
/UBNTBULLETM
,$(1))
488 $(call Image
/Build
/Profile
/UBNTROCKETM
,$(1))
489 $(call Image
/Build
/Profile
/UBNTNANOM
,$(1))
492 define Image
/Build
/Profile
/MZKW04NU
493 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),Planex
,mzk-w04nu
,board
=MZK-W04NU
)
496 define Image
/Build
/Profile
/MZKW300NH
497 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),Planex
,mzk-w300nh
,board
=MZK-W300NH
)
500 define Image
/Build
/Profile
/TLWR741NDV1
501 $(call Image
/Build
/Template
/$(fs_4k
)/$(1),TPLINK
,tl-wr741nd-v1
,board
=TL-WR741ND
,TL-WR741NDv1
)
504 define Image
/Build
/Profile
/TLWR841NV15
505 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),TPLINK
,tl-wr841n-v1.5
,board
=TL-WR841N-v1.5
,TL-WR841Nv1.5
)
508 define Image
/Build
/Profile
/TLWR841NDV3
509 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),TPLINK
,tl-wr841nd-v3
,board
=TL-WR941ND
,TL-WR841NDv3
)
512 define Image
/Build
/Profile
/TLWR841NDV5
513 $(call Image
/Build
/Template
/$(fs_4k
)/$(1),TPLINK
,tl-wr841nd-v5
,board
=TL-WR741ND
,TL-WR841NDv5
)
516 define Image
/Build
/Profile
/TLWR941NDV2
517 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),TPLINK
,tl-wr941nd-v2
,board
=TL-WR941ND
,TL-WR941NDv2
)
520 define Image
/Build
/Profile
/TLWR941NDV3
521 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),TPLINK
,tl-wr941nd-v3
,board
=TL-WR941ND
,TL-WR941NDv2
)
524 define Image
/Build
/Profile
/TLWR941NDV4
525 $(call Image
/Build
/Template
/$(fs_4k
)/$(1),TPLINK
,tl-wr941nd-v4
,board
=TL-WR741ND
,TL-WR941NDv4
)
528 define Image
/Build
/Profile
/TLWR1043NDV1
529 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),TPLINK
,tl-wr1043nd-v1
,board
=TL-WR1043ND
,TL-WR1043NDv1
)
532 define Image
/Build
/Profile
/WNDR3700
533 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),WNDR3700
,wndr3700
,board
=WNDR3700
)
536 define Image
/Build
/Profile
/WRT400N
537 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),WRT400N
,wrt400n
,board
=WRT400N
)
540 define Image
/Build
/Profile
/DIR825B1
541 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),DIR825B1
,dir-825-b1
,board
=DIR-825-B1
)
544 define Image
/Build
/Profile
/WRT160NL
545 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),CyberTAN
,wrt160nl
,board
=WRT160NL
,1.00.01)
548 define Image
/Build
/Profile
/WZRHPG300NH
549 $(call Image
/Build
/Template
/$(fs_128k
)/$(1),WZRHPG300NH
,wzr-hp-g300nh
,board
=WZR-HP-G300NH
)
552 define Image
/Build
/Profile
/Default
553 $(call Image
/Build
/Profile
/AP81
,$(1))
554 $(call Image
/Build
/Profile
/AP83
,$(1))
555 $(call Image
/Build
/Profile
/A02RBW300N
,$(1))
556 $(call Image
/Build
/Profile
/DIR600A1
,$(1))
557 $(call Image
/Build
/Profile
/DIR615C1
,$(1))
558 $(call Image
/Build
/Profile
/DIR825B1
,$(1))
559 $(call Image
/Build
/Profile
/FR54RTR
,$(1))
560 $(call Image
/Build
/Profile
/MZKW04NU
,$(1))
561 $(call Image
/Build
/Profile
/MZKW300NH
,$(1))
562 $(call Image
/Build
/Profile
/PB42
,$(1))
563 $(call Image
/Build
/Profile
/PB44
,$(1))
564 $(call Image
/Build
/Profile
/PB92
,$(1))
565 $(call Image
/Build
/Profile
/TEW632BRP
,$(1))
566 $(call Image
/Build
/Profile
/TEW652BRP
,$(1))
567 $(call Image
/Build
/Profile
/TLWR741NDV1
,$(1))
568 $(call Image
/Build
/Profile
/TLWR841NV15
,$(1))
569 $(call Image
/Build
/Profile
/TLWR841NDV3
,$(1))
570 $(call Image
/Build
/Profile
/TLWR841NDV5
,$(1))
571 $(call Image
/Build
/Profile
/TLWR941NDV2
,$(1))
572 $(call Image
/Build
/Profile
/TLWR941NDV3
,$(1))
573 $(call Image
/Build
/Profile
/TLWR941NDV4
,$(1))
574 $(call Image
/Build
/Profile
/TLWR1043NDV1
,$(1))
575 $(call Image
/Build
/Profile
/UBNT
,$(1))
576 $(call Image
/Build
/Profile
/WP543
,$(1))
577 $(call Image
/Build
/Profile
/WNDR3700
,$(1))
578 $(call Image
/Build
/Profile
/WRT400N
,$(1))
579 $(call Image
/Build
/Profile
/WRT160NL
,$(1))
580 $(call Image
/Build
/Profile
/WZRHPG300NH
,$(1))
583 define Image
/Build
/Profile
/Madwifi
584 $(call Image
/Build
/Profile
/UBNTRS
,$(1))
585 $(call Image
/Build
/Profile
/UBNTRSPRO
,$(1))
586 $(call Image
/Build
/Profile
/UBNTLSSR71
,$(1))
587 $(call Image
/Build
/Profile
/WP543
,$(1))
590 define Image
/Build
/squashfs
591 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
592 dd if
=$(KDIR
)/root.squashfs of
=$(KDIR
)/root.squashfs-4k.tmp0 bs
=4k conv
=sync
593 $(call add_jffs2_mark
,$(KDIR
)/root.squashfs-4k.tmp0
)
594 dd if
=$(KDIR
)/root.squashfs-4k.tmp0 of
=$(BIN_DIR
)/$(IMG_PREFIX
)-root.squashfs-4k bs
=4k conv
=sync
595 $(call add_jffs2_mark
,$(BIN_DIR
)/$(IMG_PREFIX
)-root.squashfs-4k
)
596 rm -f
$(KDIR
)/root.squashfs-4k.tmp0
599 define Image
/Build
/Initramfs
600 $(call Image
/Build
/Profile
/$(PROFILE
),initramfs
)
604 $(call Image
/Build
/$(1))
605 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) bs
=128k conv
=sync
607 $(call Image
/Build
/Profile
/$(PROFILE
),$(1))
610 $(eval
$(call BuildImage
))