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
10 IMGNAME
:=$(BIN_DIR
)/openwrt-
$(BOARD
)
13 $(IMGNAME
)-$(2)-$(patsubst jffs2-
%,jffs2
,$(patsubst squashfs-
%,squashfs
,$(1)))
16 VMLINUX
:=$(IMGNAME
)-vmlinux
17 UIMAGE
:=$(IMGNAME
)-uImage
18 fs_squash
:=squashfs-only
23 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
29 VMLINUX
:=$(IMGNAME
)-vmlinux-initramfs
30 UIMAGE
:=$(IMGNAME
)-uImage-initramfs
34 $(STAGING_DIR_HOST
)/bin
/lzma e
$(1) -lc1
-lp2
-pb2
$(2)
37 define PatchKernelLzma
38 cp
$(KDIR
)/vmlinux
$(KDIR
)/vmlinux-
$(1)
39 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(KDIR
)/vmlinux-
$(1) '$(strip $(2))'
40 $(call CompressLzma
,$(KDIR
)/vmlinux-
$(1),$(KDIR
)/vmlinux-
$(1).bin.lzma
)
43 define PatchKernelGzip
44 cp
$(KDIR
)/vmlinux
$(KDIR
)/vmlinux-
$(1)
45 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(KDIR
)/vmlinux-
$(1) '$(strip $(2))'
46 gzip
-9 -c
$(KDIR
)/vmlinux-
$(1) > $(KDIR
)/vmlinux-
$(1).bin.gz
50 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C lzma \
51 -e
0x80060000 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
56 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C gzip \
57 -e
0x80060000 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
61 define Image
/BuildKernel
62 cp
$(KDIR
)/vmlinux.elf
$(VMLINUX
).elf
63 cp
$(KDIR
)/vmlinux
$(VMLINUX
).bin
64 gzip
-9 -c
$(KDIR
)/vmlinux
> $(KDIR
)/vmlinux.bin.gz
65 $(call CompressLzma
,$(KDIR
)/vmlinux
,$(KDIR
)/vmlinux.bin.lzma
)
66 dd if
=$(KDIR
)/vmlinux.bin.lzma of
=$(VMLINUX
).lzma bs
=65536 conv
=sync
67 dd if
=$(KDIR
)/vmlinux.bin.gz of
=$(VMLINUX
).gz bs
=65536 conv
=sync
68 $(call MkImageGzip
,$(KDIR
)/vmlinux.bin.gz
,$(UIMAGE
)-gzip.bin
)
69 $(call MkImageLzma
,$(KDIR
)/vmlinux.bin.lzma
,$(UIMAGE
)-lzma.bin
)
70 $(call Image
/Build
/Initramfs
)
73 define Image
/Build
/WRT400N
74 $(call PatchKernelLzma
,$(2),$(3))
75 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt
1310720 ]; then \
76 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
77 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
6488064 ]; then \
78 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
80 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C lzma
-e \
82 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
83 -d
$(KDIR
)/vmlinux-
$(2).bin.lzma
$(KDIR
)/vmlinux-
$(2).uImage
; \
85 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=1280k conv
=sync
; \
86 dd if
=$(KDIR
)/root.
$(1) bs
=6336k conv
=sync
; \
88 ) > $(call imgname
,$(1),$(2)).bin
; \
89 wrt400n
$(KDIR
)/vmlinux-
$(2).uImage
$(KDIR
)/root.
$(1) $(call imgname
,$(1),$(2)).webui
; \
93 dir825b1_mtdlayout
=mtdparts
=spi0.0
:256k
(uboot
)ro
,64k
(config
)ro
,1024k
(kernel
),5184k
(rootfs
),64k
(caldata
)ro
,1600k
(unknown
)ro
,6208k@
0x50000(firmware
)
94 define Image
/Build
/DIR825B1
95 $(call PatchKernelLzma
,$(2),$(3) $(dir825b1_mtdlayout
))
96 $(call MkImageLzma
,$(KDIR
)/vmlinux-
$(2).bin.lzma
,$(call imgname
,$(1),$(2)).bin
)
97 if
[ `stat -c%s "$(call imgname,$(1),$(2)).bin"` -gt
1048576 ]; then \
98 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
99 rm -f
$(call imgname
,$(1),$(2)).bin
; \
100 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
5308416 ]; then \
101 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
102 rm -f
$(call imgname
,$(1),$(2)).bin
; \
104 dd if
=$(KDIR
)/root.
$(1) of
=$(call imgname
,$(1),$(2)).bin bs
=1k seek
=1024; \
105 cp
$(call imgname
,$(1),$(2)).bin
$(call imgname
,$(1),$(2))-backup-loader.bin
; \
106 echo
-n
"01AP94-AR7161-RT-080619-00" >> $(call imgname
,$(1),$(2))-backup-loader.bin
; \
110 define Image
/Build
/WZRHPG300NH
111 $(call PatchKernelLzma
,$(2),$(3))
112 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt
1048576 ]; then \
113 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
114 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
31850496 ]; then \
115 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
117 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C lzma
-e \
119 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
120 -d
$(KDIR
)/vmlinux-
$(2).bin.lzma
$(KDIR
)/vmlinux-
$(2).uImage
; \
122 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=1024k conv
=sync
; \
123 dd if
=$(KDIR
)/root.
$(1) bs
=128k conv
=sync
; \
124 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
126 echo
-n
-e
"# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
127 dd if
=$(call imgname
,$(1),$(2))-sysupgrade.bin
; \
128 ) > $(call imgname
,$(1),$(2))-tftp.bin
; \
132 cameo_mtdlayout
=mtdparts
=spi0.0
:128k
(u-boot
)ro
,64k
(config
)ro
,896k
(kernel
),2880k
(rootfs
),64k
(art
)ro
,3776k@
0x30000(firmware
)
133 define Image
/Build
/Cameo
134 $(call PatchKernelLzma
,$(2),$(3) $(cameo_mtdlayout
))
135 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt
917504 ]; then \
136 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
137 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
2949120 ]; then \
138 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
140 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C lzma
-e \
142 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
143 -d
$(KDIR
)/vmlinux-
$(2).bin.lzma
$(KDIR
)/vmlinux-
$(2).uImage
; \
145 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=896k conv
=sync
; \
146 dd if
=$(KDIR
)/root.
$(1) \
147 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
149 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=896k conv
=sync
; \
150 dd if
=$(KDIR
)/root.
$(1) bs
=2880k conv
=sync
; \
152 ) > $(call imgname
,$(1),$(2))-factory.bin
; \
156 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
)
157 define Image
/Build
/Cameo7240
158 $(call PatchKernelLzma
,$(2),$(3) $(cameo7240_mtdlayout
))
159 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt
917504 ]; then \
160 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
161 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
2818048 ]; then \
162 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
164 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C lzma
-e \
166 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
167 -d
$(KDIR
)/vmlinux-
$(2).bin.lzma
$(KDIR
)/vmlinux-
$(2).uImage
; \
169 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=896k conv
=sync
; \
170 dd if
=$(KDIR
)/root.
$(1) \
171 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
173 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=896k conv
=sync
; \
174 dd if
=$(KDIR
)/root.
$(1) bs
=2752k conv
=sync
; \
176 ) > $(call imgname
,$(1),$(2))-factory.bin
; \
180 define Image
/Build
/AP83
181 $(call PatchKernelGzip
,$(2),$(3))
182 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.gz"` -gt
1310720 ]; then \
183 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.gz is too big"; \
184 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
6619136 ]; then \
185 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
187 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C gzip
-e \
189 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
190 -d
$(KDIR
)/vmlinux-
$(2).bin.gz \
191 $(KDIR
)/vmlinux-
$(2).uImage
; \
192 dd if
=$(KDIR
)/vmlinux-
$(2).uImage \
193 of
=$(call imgname
,kernel
,$(2)).bin bs
=64k conv
=sync
; \
194 dd if
=$(KDIR
)/root.
$(1) \
195 of
=$(call imgname
,$(1),$(2)-rootfs
).bin bs
=128k conv
=sync
; \
197 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=1280k conv
=sync
; \
198 dd if
=$(KDIR
)/root.
$(1); \
199 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
203 define Image
/Build
/PB92
204 $(call PatchKernelGzip
,$(2),$(3))
205 if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
2818048 ]; then \
206 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
208 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C gzip
-e \
210 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
211 -d
$(KDIR
)/vmlinux-
$(2).bin.gz \
212 $(KDIR
)/vmlinux-
$(2).uImage
; \
213 dd if
=$(KDIR
)/vmlinux-
$(2).uImage \
214 of
=$(call imgname
,kernel
,$(2)).bin bs
=64k conv
=sync
; \
215 dd if
=$(KDIR
)/root.
$(1) \
216 of
=$(call imgname
,$(1),$(2)-rootfs
).bin bs
=128k conv
=sync
; \
218 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=896k conv
=sync
; \
219 dd if
=$(KDIR
)/root.
$(1); \
220 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
; \
224 define Image
/Build
/PB4X
225 $(call PatchKernelLzma
,$(2),$(3))
226 dd if
=$(KDIR
)/vmlinux-
$(2).bin.lzma \
227 of
=$(call imgname
,kernel
,$(2)).bin bs
=64k conv
=sync
228 dd if
=$(KDIR
)/root.
$(1) \
229 of
=$(call imgname
,$(1),$(2)-rootfs
).bin bs
=128k conv
=sync
230 -sh
$(TOPDIR
)/scripts
/combined-image.sh \
231 "$(call imgname,kernel,$(2)).bin" \
232 "$(call imgname,$(1),$(2)-rootfs).bin" \
233 $(call imgname
,$(1),$(2))-sysupgrade.bin
236 define Image
/Build
/MyLoader
237 -$(STAGING_DIR_HOST
)/bin
/mkmylofw
-B
$(2) -s
$(3) \
238 -p0x030000
:0xe0000:al
:0x80060000:kernel
:$(KDIR
)/vmlinux.bin.lzma \
239 -p0x110000
:0:::rootfs
:$(KDIR
)/root.
$(1) \
240 $(call imgname
,$(1),$(2))-$(4)-factory.img
243 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
)
244 define Image
/Build
/UBNTXM
245 $(call PatchKernelLzma
,$(2),$(3) $(ubntxm_mtdlayout
))
246 $(call MkImageLzma
,$(KDIR
)/vmlinux-
$(2).bin.lzma
,$(KDIR
)/vmlinux-
$(2).uImage.bin
)
247 dd if
=$(KDIR
)/vmlinux-
$(2).uImage.bin of
=$(KDIR
)/vmlinux-
$(2).uImage bs
=1024k conv
=sync
248 -$(STAGING_DIR_HOST
)/bin
/mkfwimage \
249 -B
$(4) -v
$(5).
$(6).OpenWrt.
$(REVISION
) \
250 -k
$(KDIR
)/vmlinux-
$(2).uImage \
251 -r
$(BIN_DIR
)/openwrt-
$(BOARD
)-root.
$(1) \
252 -o
$(call imgname
,$(1),$(2))-factory.bin
254 dd if
=$(KDIR
)/vmlinux-
$(2).uImage
; \
255 dd if
=$(BIN_DIR
)/openwrt-
$(BOARD
)-root.
$(1); \
256 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
259 define Image
/Build
/UBNT
260 $(call PatchKernelLzma
,$(2),$(3))
261 dd if
=$(KDIR
)/vmlinux-
$(2).bin.lzma of
=$(KDIR
)/vmlinux-
$(2).lzma bs
=64k conv
=sync
262 -$(STAGING_DIR_HOST
)/bin
/mkfwimage \
263 -B
$(4) -v
$(5).
$(6).OpenWrt.
$(REVISION
) \
264 -k
$(KDIR
)/vmlinux-
$(2).lzma \
265 -r
$(BIN_DIR
)/openwrt-
$(BOARD
)-root.
$(1) \
266 -o
$(call imgname
,$(1),$(2))-factory.bin
267 -sh
$(TOPDIR
)/scripts
/combined-image.sh \
268 "$(KDIR)/vmlinux-$(2).lzma" \
269 "$(BIN_DIR)/openwrt-$(BOARD)-root.$(1)" \
270 $(call imgname
,$(1),$(2))-sysupgrade.bin
273 define Image
/Build
/Planex
274 $(call PatchKernelGzip
,$(2),$(3))
275 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.gz"` -gt
1441792 ]; then \
276 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.gz is too big"; \
277 else if
[ `stat -c%s $(KDIR)/root.$(1)` -gt
6356992 ]; then \
278 echo
"Warning: $(KDIR)/root.$(1) is too big"; \
280 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C gzip
-e \
282 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
283 -d
$(KDIR
)/vmlinux-
$(2).bin.gz
$(KDIR
)/vmlinux-
$(2).uImage
; \
285 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=1408k conv
=sync
; \
286 dd if
=$(KDIR
)/root.
$(1) bs
=6208k conv
=sync
; \
287 ) > $(call imgname
,$(1),$(2)).bin
; \
288 $(STAGING_DIR_HOST
)/bin
/mkplanexfw \
291 -i
$(call imgname
,$(1),$(2)).bin \
292 -o
$(call imgname
,$(1),$(2)).webui
; \
296 define Image
/Build
/TPLINK
297 $(call PatchKernelGzip
,$(2),$(3))
298 -$(STAGING_DIR_HOST
)/bin
/mktplinkfw \
299 -B
$(4) -N OpenWrt
-V
$(REVISION
)\
300 -k
$(KDIR
)/vmlinux-
$(2).bin.gz \
301 -r
$(BIN_DIR
)/openwrt-
$(BOARD
)-root.
$(1) \
302 -o
$(call imgname
,$(1),$(2))-factory.bin
303 -$(STAGING_DIR_HOST
)/bin
/mktplinkfw \
304 -B
$(4) -N OpenWrt
-V
$(REVISION
) -s \
305 -k
$(KDIR
)/vmlinux-
$(2).bin.gz \
306 -r
$(BIN_DIR
)/openwrt-
$(BOARD
)-root.
$(1) \
307 -o
$(call imgname
,$(1),$(2))-sysupgrade.bin
310 define Image
/Build
/TPLINK
/initramfs
311 $(call PatchKernelGzip
,$(2),$(3))
312 -$(STAGING_DIR_HOST
)/bin
/mktplinkfw
-c \
313 -B
$(4) -N OpenWrt
-V
$(REVISION
) -s \
314 -k
$(KDIR
)/vmlinux-
$(2).bin.gz \
315 -o
$(call imgname
,$(1),$(2))-uImage.bin
318 define Image
/Build
/CyberTAN
319 $(call PatchKernelGzip
,$(2),$(3))
320 $(call MkImageGzip
,$(KDIR
)/vmlinux-
$(2).bin.gz
,$(KDIR
)/vmlinux-
$(2).uImage
)
322 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=64k conv
=sync
; \
323 dd if
=/dev
/zero bs
=1 count
=65476; \
324 dd if
=$(KDIR
)/root.
$(1) bs
=64k
; \
325 ) > $(KDIR
)/vmlinux-
$(2).image
326 $(STAGING_DIR_HOST
)/bin
/trx
-o
$(KDIR
)/vmlinux-
$(2).trx \
327 -f
$(KDIR
)/vmlinux-
$(2).image
328 -$(STAGING_DIR_HOST
)/bin
/addpattern
-B
$(2) -v v
$(4) -g \
329 -i
$(KDIR
)/vmlinux-
$(2).trx \
330 -o
$(call imgname
,$(1),$(2)).bin
333 wndr3700_mtdlayout
=mtdparts
=spi0.0
:320k
(u-boot
)ro
,128k
(u-boot-env
)ro
,1024k
(kernel
),6656k
(rootfs
),64k
(art
)ro
,7680k@
0x70000(firmware
)
334 define Image
/Build
/WNDR3700
335 $(call PatchKernelLzma
,$(2),$(3) $(wndr3700_mtdlayout
))
336 $(call MkImageLzma
,$(KDIR
)/vmlinux-
$(2).bin.lzma
,$(KDIR
)/vmlinux-
$(2).uImage
)
337 mkdir
-p
$(KDIR
)/wndr3700
/image
338 $(STAGING_DIR_HOST
)/bin
/wndr3700 \
339 $(KDIR
)/vmlinux-
$(2).uImage \
340 $(KDIR
)/wndr3700
/image
/uImage
341 $(STAGING_DIR_HOST
)/bin
/mksquashfs-lzma \
342 $(KDIR
)/wndr3700
$(KDIR
)/vmlinux-
$(2).uImage.squashfs.tmp \
343 -nopad
-noappend
-root-owned
-be
344 -rm -rf
$(KDIR
)/wndr3700
345 mkimage
-A mips
-O linux
-T filesystem
-C none \
346 -a
0xbf070000 -e
0xbf070000 \
347 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
348 -d
$(KDIR
)/vmlinux-
$(2).uImage.squashfs.tmp \
349 $(KDIR
)/vmlinux-
$(2).uImage.squashfs.tmp2
350 $(STAGING_DIR_HOST
)/bin
/wndr3700 \
351 $(KDIR
)/vmlinux-
$(2).uImage.squashfs.tmp2 \
352 $(KDIR
)/vmlinux-
$(2).uImage.squashfs
353 -rm -f
$(KDIR
)/vmlinux-
$(2).uImage.squashfs.tmp
*
355 dd if
=$(KDIR
)/vmlinux-
$(2).uImage.squashfs bs
=1024k conv
=sync
; \
356 dd if
=$(KDIR
)/root.
$(1) bs
=64k
; \
357 ) > $(call imgname
,$(1),$(2))-sysupgrade.bin
358 $(STAGING_DIR_HOST
)/bin
/mkdniimg \
359 -B WNDR3700
-v OpenWrt.
$(REVISION
) \
360 -i
$(call imgname
,$(1),$(2))-sysupgrade.bin \
361 -o
$(call imgname
,$(1),$(2))-factory.img
364 define Image
/Build
/WNDR3700
/initramfs
365 $(call PatchKernelLzma
,$(2),$(3) $(wndr3700_mtdlayout
))
366 $(call MkImageLzma
,$(KDIR
)/vmlinux-
$(2).bin.lzma
,$(KDIR
)/vmlinux-
$(2).uImage
)
367 $(STAGING_DIR_HOST
)/bin
/wndr3700 \
368 $(KDIR
)/vmlinux-
$(2).uImage \
369 $(call imgname
,$(1),$(2))-uImage.bin
372 define Image
/Build
/Template
/initramfs
/initramfs
373 $(call Image
/Build
/$(1)/initramfs
,initramfs
,$(2),$(3),$(4),$(5),$(6),$(7))
376 define Image
/Build
/Template
/all/squashfs
377 $(call Image
/Build
/$(1),squashfs
,$(2),$(3),$(4),$(5),$(6),$(7))
380 define Image
/Build
/Template
/all/jffs2-64k
381 $(call Image
/Build
/$(1),jffs2-64k
,$(2),$(3),$(4),$(5),$(6),$(7))
384 define Image
/Build
/Template
/all/jffs2-128k
385 $(call Image
/Build
/$(1),jffs2-128k
,$(2),$(3),$(4),$(5),$(6),$(7))
388 define Image
/Build
/Template
/squashfs-only
/squashfs
389 $(call Image
/Build
/$(1),squashfs
,$(2),$(3),$(4),$(5),$(6),$(7))
392 define Image
/Build
/Template
/4k
/squashfs
393 $(call Image
/Build
/$(1),squashfs-4k
,$(2),$(3),$(4),$(5),$(6),$(7))
396 define Image
/Build
/Template
/64k
/squashfs
397 $(call Image
/Build
/$(1),squashfs
,$(2),$(3),$(4),$(5),$(6),$(7))
400 define Image
/Build
/Template
/64k
/jffs2-64k
401 $(call Image
/Build
/$(1),jffs2-64k
,$(2),$(3),$(4),$(5),$(6),$(7))
404 define Image
/Build
/Template
/128k
/squashfs
405 $(call Image
/Build
/$(1),squashfs
,$(2),$(3),$(4),$(5),$(6),$(7))
408 define Image
/Build
/Template
/128k
/jffs2-128k
409 $(call Image
/Build
/$(1),jffs2-128k
,$(2),$(3),$(4),$(5),$(6),$(7))
412 define Image
/Build
/Profile
/AP81
413 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),AP83
,ap81
,board
=AP81
)
416 define Image
/Build
/Profile
/AP83
417 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),AP83
,ap83
,board
=AP83
)
420 define Image
/Build
/Profile
/PB42
421 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),PB4X
,pb42
,board
=PB42
)
424 define Image
/Build
/Profile
/PB44
425 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),PB4X
,pb44
,board
=PB44
)
428 define Image
/Build
/Profile
/PB92
429 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),PB92
,pb92
,board
=PB92
)
432 define Image
/Build
/Profile
/WP543
433 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),MyLoader
,wp543
,0x200000,2M
)
434 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),MyLoader
,wp543
,0x400000,4M
)
435 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),MyLoader
,wp543
,0x800000,8M
)
436 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),MyLoader
,wp543
,0x1000000,16M
)
439 define Image
/Build
/Profile
/DIR600A1
440 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),Cameo7240
,dir-600-a1
,board
=DIR-600-A1
,"AP91-AR7240-RT-090223-00")
443 define Image
/Build
/Profile
/FR54RTR
444 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),Cameo7240
,fr-54rtr
,board
=DIR-600-A1
,"AP91-AR7240-RT-090223-01")
447 define Image
/Build
/Profile
/DIR615C1
448 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),Cameo
,dir-615-c1
,board
=DIR-615-C1
,"AP81-AR9130-RT-070614-02")
451 define Image
/Build
/Profile
/TEW632BRP
452 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),Cameo
,tew-632brp
,board
=TEW-632BRP
,"AP81-AR9130-RT-070614-00")
455 define Image
/Build
/Profile
/TEW652BRP
456 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),Cameo
,tew-652brp
,board
=TEW-632BRP
,"AP81-AR9130-RT-080609-05")
459 define Image
/Build
/Profile
/A02RBW300N
460 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),Cameo
,a02-rb-w300n
,board
=TEW-632BRP
,"AP81-AR9130-RT-070614-03")
463 define Image
/Build
/Profile
/UBNTRS
464 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNT
,ubnt-rs
,board
=UBNT-RS
,RS
,RSx
,ar7100
)
467 define Image
/Build
/Profile
/UBNTRSPRO
468 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNT
,ubnt-rspro
,board
=UBNT-RSPRO
,RSPRO
,RSPRO
,ar7100pro
)
471 define Image
/Build
/Profile
/UBNTLSSR71
472 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNT
,ubnt-ls-sr71
,board
=UBNT-LS-SR71
,LS-SR71
,LS-SR71
,ar7100
)
475 define Image
/Build
/Profile
/UBNTBULLETM
476 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNTXM
,ubnt-bullet-m
,board
=UBNT-BM
,XM
,UBNTXM
,ar7240
)
479 define Image
/Build
/Profile
/UBNTROCKETM
480 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNTXM
,ubnt-rocket-m
,board
=UBNT-RM
,XM
,UBNTXM
,ar7240
)
483 define Image
/Build
/Profile
/UBNTNANOM
484 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),UBNTXM
,ubnt-nano-m
,board
=UBNT-NM
,XM
,UBNTXM
,ar7240
)
487 define Image
/Build
/Profile
/UBNT
488 $(call Image
/Build
/Profile
/UBNTRS
,$(1))
489 $(call Image
/Build
/Profile
/UBNTRSPRO
,$(1))
490 $(call Image
/Build
/Profile
/UBNTLSSR71
,$(1))
491 $(call Image
/Build
/Profile
/UBNTBULLETM
,$(1))
492 $(call Image
/Build
/Profile
/UBNTROCKETM
,$(1))
493 $(call Image
/Build
/Profile
/UBNTNANOM
,$(1))
496 define Image
/Build
/Profile
/MZKW04NU
497 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),Planex
,mzk-w04nu
,board
=MZK-W04NU
)
500 define Image
/Build
/Profile
/MZKW300NH
501 $(call Image
/Build
/Template
/$(fs_64k
)/$(1),Planex
,mzk-w300nh
,board
=MZK-W300NH
)
504 define Image
/Build
/Profile
/TLWR741NDV1
505 $(call Image
/Build
/Template
/$(fs_4k
)/$(1),TPLINK
,tl-wr741nd-v1
,board
=TL-WR741ND
,TL-WR741NDv1
)
508 define Image
/Build
/Profile
/TLWR841NV15
509 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),TPLINK
,tl-wr841n-v1.5
,board
=TL-WR841N-v1.5
,TL-WR841Nv1.5
)
512 define Image
/Build
/Profile
/TLWR841NDV3
513 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),TPLINK
,tl-wr841nd-v3
,board
=TL-WR941ND
,TL-WR841NDv3
)
516 define Image
/Build
/Profile
/TLWR841NDV5
517 $(call Image
/Build
/Template
/$(fs_4k
)/$(1),TPLINK
,tl-wr841nd-v5
,board
=TL-WR741ND
,TL-WR841NDv5
)
520 define Image
/Build
/Profile
/TLWR941NDV2
521 $(call Image
/Build
/Template
/$(fs_squash
)/$(1),TPLINK
,tl-wr941nd-v2
,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
/TLWR941NDV4
,$(1))
573 $(call Image
/Build
/Profile
/TLWR1043NDV1
,$(1))
574 $(call Image
/Build
/Profile
/UBNT
,$(1))
575 $(call Image
/Build
/Profile
/WP543
,$(1))
576 $(call Image
/Build
/Profile
/WNDR3700
,$(1))
577 $(call Image
/Build
/Profile
/WRT400N
,$(1))
578 $(call Image
/Build
/Profile
/WRT160NL
,$(1))
579 $(call Image
/Build
/Profile
/WZRHPG300NH
,$(1))
582 define Image
/Build
/Profile
/Madwifi
583 $(call Image
/Build
/Profile
/UBNTRS
,$(1))
584 $(call Image
/Build
/Profile
/UBNTRSPRO
,$(1))
585 $(call Image
/Build
/Profile
/UBNTLSSR71
,$(1))
586 $(call Image
/Build
/Profile
/WP543
,$(1))
589 define Image
/Build
/squashfs
590 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
591 dd if
=$(KDIR
)/root.squashfs of
=$(KDIR
)/root.squashfs-4k.tmp0 bs
=4k conv
=sync
592 $(call add_jffs2_mark
,$(KDIR
)/root.squashfs-4k.tmp0
)
593 dd if
=$(KDIR
)/root.squashfs-4k.tmp0 of
=$(IMGNAME
)-root.squashfs-4k bs
=4k conv
=sync
594 $(call add_jffs2_mark
,$(IMGNAME
)-root.squashfs-4k
)
595 rm -f
$(KDIR
)/root.squashfs-4k.tmp0
598 define Image
/Build
/Initramfs
599 $(call Image
/Build
/Profile
/$(PROFILE
),initramfs
)
603 $(call Image
/Build
/$(1))
604 dd if
=$(KDIR
)/root.
$(1) of
=$(IMGNAME
)-root.
$(1) bs
=128k conv
=sync
606 $(call Image
/Build
/Profile
/$(PROFILE
),$(1))
609 $(eval
$(call BuildImage
))