3623a6268ca27bfd98a77b9ee8d35bf7dcf6d7a2
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / image / Makefile
1 #
2 # Copyright (C) 2008-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/image.mk
9
10 define imgname
11 $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
12 endef
13
14 VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
15 UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
16 fs_squash:=squashfs-only
17 fs_all:=all
18 fs_4k:=4k
19 fs_64k:=64k
20 fs_128k:=128k
21 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
22 fs_squash:=initramfs
23 fs_all:=initramfs
24 fs_4k:=initramfs
25 fs_64k:=initramfs
26 fs_128k:=initramfs
27 VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
28 UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs
29 endif
30
31 define CompressLzma
32 $(STAGING_DIR_HOST)/bin/lzma e $(1) -lc1 -lp2 -pb2 $(2)
33 endef
34
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)
39 endef
40
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
45 endef
46
47 define MkImageLzma
48 mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma \
49 -e 0x80060000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
50 -d $(1) $(2)
51 endef
52
53 define MkImageGzip
54 mkimage -A mips -O linux -T kernel -a 0x80060000 -C gzip \
55 -e 0x80060000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
56 -d $(1) $(2)
57 endef
58
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)
69 endef
70
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"; \
77 else \
78 mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
79 0x80060000 \
80 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
81 -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage; \
82 ( \
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; \
87 fi; fi
88 endef
89
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 if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt 1048576 ]; then \
94 echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
95 else if [ `stat -c%s $(KDIR)/root.$(1)` -gt 5308416 ]; then \
96 echo "Warning: $(KDIR)/root.$(1) is too big"; \
97 else \
98 mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
99 0x80060000 \
100 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
101 -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage; \
102 ( \
103 dd if=$(KDIR)/vmlinux-$(2).uImage bs=1024k conv=sync; \
104 dd if=$(KDIR)/root.$(1) \
105 ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
106 ( \
107 dd if=$(call imgname,$(1),$(2))-sysupgrade.bin; \
108 echo -n "01AP94-AR7161-RT-080619-00"; \
109 ) > $(call imgname,$(1),$(2))-backup-loader.bin; \
110 if [ `stat -c%s $(call imgname,$(1),$(2))-sysupgrade.bin` -gt 4194304 ]; then \
111 echo "Warning: $(call imgname,$(1),$(2))-sysupgrade.bin is too big"; \
112 else \
113 ( \
114 dd if=$(call imgname,$(1),$(2))-sysupgrade.bin bs=4096k conv=sync; \
115 echo -n "00AP94-AR7161-RT-080619-00"; \
116 ) > $(call imgname,$(1),$(2))-factory.bin; \
117 fi; \
118 fi; fi
119 endef
120
121 define Image/Build/WZRHPG30XNH
122 $(call PatchKernelLzma,$(2),$(3))
123 if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt 1048576 ]; then \
124 echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
125 else if [ `stat -c%s $(KDIR)/root.$(1)` -gt 31850496 ]; then \
126 echo "Warning: $(KDIR)/root.$(1) is too big"; \
127 else \
128 mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
129 0x80060000 \
130 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
131 -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage; \
132 ( \
133 dd if=$(KDIR)/vmlinux-$(2).uImage bs=1024k conv=sync; \
134 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
135 ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
136 ( \
137 echo -n -e "# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
138 dd if=$(call imgname,$(1),$(2))-sysupgrade.bin; \
139 ) > $(call imgname,$(1),$(2))-tftp.bin; \
140 fi; fi
141 endef
142
143 cameo_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(config)ro,896k(kernel),2944k(rootfs),64k(art)ro,3840k@0x30000(firmware)
144 define Image/Build/Cameo
145 $(call PatchKernelLzma,$(2),$(3) $(cameo_mtdlayout))
146 if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt 917504 ]; then \
147 echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
148 else if [ `stat -c%s $(KDIR)/root.$(1)` -gt 2949120 ]; then \
149 echo "Warning: $(KDIR)/root.$(1) is too big"; \
150 else \
151 mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
152 0x80060000 \
153 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
154 -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage; \
155 ( \
156 dd if=$(KDIR)/vmlinux-$(2).uImage bs=896k conv=sync; \
157 dd if=$(KDIR)/root.$(1) \
158 ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
159 ( \
160 dd if=$(KDIR)/vmlinux-$(2).uImage bs=896k conv=sync; \
161 dd if=$(KDIR)/root.$(1) bs=2880k conv=sync; \
162 echo -n $(4); \
163 ) > $(call imgname,$(1),$(2))-factory.bin; \
164 fi; fi
165 endef
166
167 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)
168 define Image/Build/Cameo7240
169 $(call PatchKernelLzma,$(2),$(3) $(cameo7240_mtdlayout))
170 if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt 917504 ]; then \
171 echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
172 else if [ `stat -c%s $(KDIR)/root.$(1)` -gt 2818048 ]; then \
173 echo "Warning: $(KDIR)/root.$(1) is too big"; \
174 else \
175 mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
176 0x80060000 \
177 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
178 -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage; \
179 ( \
180 dd if=$(KDIR)/vmlinux-$(2).uImage bs=896k conv=sync; \
181 dd if=$(KDIR)/root.$(1) \
182 ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
183 ( \
184 dd if=$(KDIR)/vmlinux-$(2).uImage bs=896k conv=sync; \
185 dd if=$(KDIR)/root.$(1) bs=2752k conv=sync; \
186 echo -n $(4); \
187 ) > $(call imgname,$(1),$(2))-factory.bin; \
188 fi; fi
189 endef
190
191 define Image/Build/AP83
192 $(call PatchKernelGzip,$(2),$(3))
193 if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.gz"` -gt 1310720 ]; then \
194 echo "Warning: $(KDIR)/vmlinux-$(2).bin.gz is too big"; \
195 else if [ `stat -c%s $(KDIR)/root.$(1)` -gt 6619136 ]; then \
196 echo "Warning: $(KDIR)/root.$(1) is too big"; \
197 else \
198 mkimage -A mips -O linux -T kernel -a 0x80060000 -C gzip -e \
199 0x80060000 \
200 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
201 -d $(KDIR)/vmlinux-$(2).bin.gz \
202 $(KDIR)/vmlinux-$(2).uImage; \
203 dd if=$(KDIR)/vmlinux-$(2).uImage \
204 of=$(call imgname,kernel,$(2)).bin bs=64k conv=sync; \
205 dd if=$(KDIR)/root.$(1) \
206 of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync; \
207 ( \
208 dd if=$(KDIR)/vmlinux-$(2).uImage bs=1280k conv=sync; \
209 dd if=$(KDIR)/root.$(1); \
210 ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
211 fi; fi
212 endef
213
214 define Image/Build/PB92
215 $(call PatchKernelLzma,$(2),$(3))
216 if [ `stat -c%s $(KDIR)/vmlinux-$(2).bin.lzma` -gt 917504 ]; then \
217 echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
218 elif [ `stat -c%s $(KDIR)/root.$(1)` -gt 2818048 ]; then \
219 echo "Warning: $(KDIR)/root.$(1) is too big"; \
220 else \
221 mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
222 0x80060000 \
223 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
224 -d $(KDIR)/vmlinux-$(2).bin.lzma \
225 $(KDIR)/vmlinux-$(2).uImage; \
226 dd if=$(KDIR)/vmlinux-$(2).uImage \
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 ( \
231 dd if=$(KDIR)/vmlinux-$(2).uImage bs=896k conv=sync; \
232 dd if=$(KDIR)/root.$(1); \
233 ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
234 fi
235 endef
236
237 define Image/Build/PB4X
238 $(call PatchKernelLzma,$(2),$(3))
239 dd if=$(KDIR)/vmlinux-$(2).bin.lzma \
240 of=$(call imgname,kernel,$(2)).bin bs=64k conv=sync
241 dd if=$(KDIR)/root.$(1) \
242 of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync
243 -sh $(TOPDIR)/scripts/combined-image.sh \
244 "$(call imgname,kernel,$(2)).bin" \
245 "$(call imgname,$(1),$(2)-rootfs).bin" \
246 $(call imgname,$(1),$(2))-sysupgrade.bin
247 endef
248
249 define Image/Build/DB120
250 $(call PatchKernelLzma,$(2),$(3))
251 if [ `stat -c%s $(KDIR)/vmlinux-$(2).bin.lzma` -gt 1441792 ]; then \
252 echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
253 elif [ `stat -c%s $(KDIR)/root.$(1)` -gt 6488064 ]; then \
254 echo "Warning: $(KDIR)/root.$(1) is too big"; \
255 else \
256 mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
257 0x80060000 \
258 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
259 -d $(KDIR)/vmlinux-$(2).bin.lzma \
260 $(KDIR)/vmlinux-$(2).uImage; \
261 dd if=$(KDIR)/vmlinux-$(2).uImage \
262 of=$(call imgname,kernel,$(2)).bin bs=64k conv=sync; \
263 dd if=$(KDIR)/root.$(1) \
264 of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync; \
265 ( \
266 dd if=$(KDIR)/root.$(1); \
267 dd if=$(KDIR)/vmlinux-$(2).uImage bs=1408k conv=sync; \
268 ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
269 fi
270 endef
271
272 define Image/Build/MyLoader
273 -$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(3) \
274 -p0x030000:0xe0000:al:0x80060000:kernel:$(KDIR)/vmlinux.bin.lzma \
275 -p0x110000:0:::rootfs:$(KDIR)/root.$(1) \
276 $(call imgname,$(1),$(2))-$(4)-factory.img
277 endef
278
279 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)
280 define Image/Build/UBNTXM
281 $(call PatchKernelLzma,$(2),$(3) $(ubntxm_mtdlayout))
282 $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage.bin)
283 dd if=$(KDIR)/vmlinux-$(2).uImage.bin of=$(KDIR)/vmlinux-$(2).uImage bs=1024k conv=sync
284 -$(STAGING_DIR_HOST)/bin/mkfwimage \
285 -B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
286 -k $(KDIR)/vmlinux-$(2).uImage \
287 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
288 -o $(call imgname,$(1),$(2))-factory.bin
289 ( \
290 dd if=$(KDIR)/vmlinux-$(2).uImage; \
291 dd if=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1); \
292 ) > $(call imgname,$(1),$(2))-sysupgrade.bin
293 endef
294
295 define Image/Build/UBNT
296 $(call PatchKernelLzma,$(2),$(3))
297 dd if=$(KDIR)/vmlinux-$(2).bin.lzma of=$(KDIR)/vmlinux-$(2).lzma bs=64k conv=sync
298 -$(STAGING_DIR_HOST)/bin/mkfwimage \
299 -B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
300 -k $(KDIR)/vmlinux-$(2).lzma \
301 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
302 -o $(call imgname,$(1),$(2))-factory.bin
303 -sh $(TOPDIR)/scripts/combined-image.sh \
304 "$(KDIR)/vmlinux-$(2).lzma" \
305 "$(BIN_DIR)/$(IMG_PREFIX)-root.$(1)" \
306 $(call imgname,$(1),$(2))-sysupgrade.bin
307 endef
308
309 define Image/Build/Planex
310 $(call PatchKernelGzip,$(2),$(3))
311 if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.gz"` -gt 1441792 ]; then \
312 echo "Warning: $(KDIR)/vmlinux-$(2).bin.gz is too big"; \
313 else if [ `stat -c%s $(KDIR)/root.$(1)` -gt 6356992 ]; then \
314 echo "Warning: $(KDIR)/root.$(1) is too big"; \
315 else \
316 mkimage -A mips -O linux -T kernel -a 0x80060000 -C gzip -e \
317 0x80060000 \
318 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
319 -d $(KDIR)/vmlinux-$(2).bin.gz $(KDIR)/vmlinux-$(2).uImage; \
320 ( \
321 dd if=$(KDIR)/vmlinux-$(2).uImage bs=1408k conv=sync; \
322 dd if=$(KDIR)/root.$(1); \
323 ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
324 $(STAGING_DIR_HOST)/bin/mkplanexfw \
325 -B $(2) \
326 -v 2.00.00 \
327 -i $(call imgname,$(1),$(2))-sysupgrade.bin \
328 -o $(call imgname,$(1),$(2))-factory.bin; \
329 fi; fi
330 endef
331
332 define Image/Build/TPLINK
333 $(call PatchKernelGzip,$(2),$(3))
334 -$(STAGING_DIR_HOST)/bin/mktplinkfw \
335 -B $(4) -N OpenWrt -V $(REVISION)\
336 -k $(KDIR)/vmlinux-$(2).bin.gz \
337 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
338 -o $(call imgname,$(1),$(2))-factory.bin
339 -$(STAGING_DIR_HOST)/bin/mktplinkfw \
340 -B $(4) -N OpenWrt -V $(REVISION) -s \
341 -k $(KDIR)/vmlinux-$(2).bin.gz \
342 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
343 -o $(call imgname,$(1),$(2))-sysupgrade.bin
344 endef
345
346 define Image/Build/TPLINK/initramfs
347 $(call PatchKernelGzip,$(2),$(3))
348 -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
349 -B $(4) -N OpenWrt -V $(REVISION) -s \
350 -k $(KDIR)/vmlinux-$(2).bin.gz \
351 -o $(call imgname,$(1),$(2))-uImage.bin
352 endef
353
354 define Image/Build/CyberTAN
355 $(call PatchKernelGzip,$(2),$(3))
356 $(call MkImageGzip,$(KDIR)/vmlinux-$(2).bin.gz,$(KDIR)/vmlinux-$(2).uImage)
357 $(STAGING_DIR_HOST)/bin/trx -o $(KDIR)/image.tmp -f $(KDIR)/vmlinux-$(2).uImage \
358 -x 32 -a 0x10000 -x -32 -f $(KDIR)/root.$(1)
359 -$(STAGING_DIR_HOST)/bin/addpattern -B $(2) -v v$(4) \
360 -i $(KDIR)/image.tmp \
361 -o $(call imgname,$(1),$(2))-sysupgrade.bin
362 -$(STAGING_DIR_HOST)/bin/addpattern -B $(2) -v v$(4) -g \
363 -i $(KDIR)/image.tmp \
364 -o $(call imgname,$(1),$(2))-factory.bin
365 rm $(KDIR)/image.tmp
366 endef
367
368 define Image/Build/Netgear
369 $(call PatchKernelLzma,$(2),$(3) $($(4)))
370 $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage)
371 mkdir -p $(KDIR)/wndr3700/image
372 $(STAGING_DIR_HOST)/bin/wndr3700 \
373 $(KDIR)/vmlinux-$(2).uImage \
374 $(KDIR)/wndr3700/image/uImage \
375 $(5)
376 $(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
377 $(KDIR)/wndr3700 $(KDIR)/vmlinux-$(2).uImage.squashfs.tmp \
378 -nopad -noappend -root-owned -be
379 -rm -rf $(KDIR)/wndr3700
380 mkimage -A mips -O linux -T filesystem -C none \
381 -a 0xbf070000 -e 0xbf070000 \
382 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
383 -d $(KDIR)/vmlinux-$(2).uImage.squashfs.tmp \
384 $(KDIR)/vmlinux-$(2).uImage.squashfs.tmp2
385 $(STAGING_DIR_HOST)/bin/wndr3700 \
386 $(KDIR)/vmlinux-$(2).uImage.squashfs.tmp2 \
387 $(KDIR)/vmlinux-$(2).uImage.squashfs \
388 $(5)
389 -rm -f $(KDIR)/vmlinux-$(2).uImage.squashfs.tmp*
390 ( \
391 dd if=$(KDIR)/vmlinux-$(2).uImage.squashfs bs=1024k conv=sync; \
392 dd if=$(KDIR)/root.$(1) bs=64k; \
393 ) > $(call imgname,$(1),$(2))-sysupgrade.bin
394 $(STAGING_DIR_HOST)/bin/mkdniimg \
395 -B $(6) -v OpenWrt.$(REVISION) \
396 -i $(call imgname,$(1),$(2))-sysupgrade.bin \
397 -o $(call imgname,$(1),$(2))-factory.img
398 $(STAGING_DIR_HOST)/bin/mkdniimg \
399 -B $(6) -v OpenWrt.$(REVISION) -r "NA" \
400 -i $(call imgname,$(1),$(2))-sysupgrade.bin \
401 -o $(call imgname,$(1),$(2))-factory-NA.img
402 endef
403
404 define Image/Build/Netgear/initramfs
405 $(call PatchKernelLzma,$(2),$(3) $($(4)))
406 $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage)
407 $(STAGING_DIR_HOST)/bin/wndr3700 \
408 $(KDIR)/vmlinux-$(2).uImage \
409 $(call imgname,$(1),$(2))-uImage.bin \
410 $(5)
411 endef
412
413 ifdef CONFIG_PACKAGE_uboot-ar71xx-nbg460n_550n_550nh
414 define Image/Build/ZyXEL
415 $(call PatchKernelLzma,$(2),$(3))
416 if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt 917504 ]; then \
417 echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
418 else if [ `stat -c%s $(KDIR)/root.$(1)` -gt 2752512 ]; then \
419 echo "Warning: $(KDIR)/root.$(1) is too big"; \
420 else if [ ! -f $(BIN_DIR)/$(IMG_PREFIX)-$(2)-u-boot.bin ]; then \
421 echo "Warning: $(IMG_PREFIX)-$(2)-u-boot.bin not found"; \
422 else \
423 mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
424 0x80060000 \
425 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
426 -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage; \
427 ( \
428 dd if=$(KDIR)/vmlinux-$(2).uImage bs=896k conv=sync; \
429 dd if=$(KDIR)/root.$(1); \
430 ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
431 $(STAGING_DIR_HOST)/bin/mkzynfw \
432 -B $(4) \
433 -b $(BIN_DIR)/$(IMG_PREFIX)-$(2)-u-boot.bin \
434 -r $(call imgname,$(1),$(2))-sysupgrade.bin:0x10000 \
435 -o $(call imgname,$(1),$(2))-factory.bin; \
436 fi; fi; fi
437 endef
438 endif
439
440 define Image/Build/Zcomax
441 $(call PatchKernelLzma,$(2),$(3))
442 $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage.bin)
443 -$(STAGING_DIR_HOST)/bin/mkzcfw \
444 -B $(2) \
445 -k $(KDIR)/vmlinux-$(2).uImage.bin \
446 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
447 -o $(call imgname,$(1),$(2))-factory.img
448 ( \
449 dd if=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=6208k count=1 conv=sync; \
450 dd if=$(KDIR)/vmlinux-$(2).uImage.bin bs=1472k count=1; \
451 ) > $(call imgname,$(1),$(2))-sysupgrade.bin
452 endef
453
454 define Image/Build/Template/initramfs/initramfs
455 $(call Image/Build/$(1)/initramfs,initramfs,$(2),$(3),$(4),$(5),$(6),$(7))
456 endef
457
458 define Image/Build/Template/all/squashfs
459 $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7))
460 endef
461
462 define Image/Build/Template/all/jffs2-64k
463 $(call Image/Build/$(1),jffs2-64k,$(2),$(3),$(4),$(5),$(6),$(7))
464 endef
465
466 define Image/Build/Template/all/jffs2-128k
467 $(call Image/Build/$(1),jffs2-128k,$(2),$(3),$(4),$(5),$(6),$(7))
468 endef
469
470 define Image/Build/Template/squashfs-only/squashfs
471 $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7))
472 endef
473
474 define Image/Build/Template/4k/squashfs
475 $(call Image/Build/$(1),squashfs-4k,$(2),$(3),$(4),$(5),$(6),$(7))
476 endef
477
478 define Image/Build/Template/64k/squashfs
479 $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7))
480 endef
481
482 define Image/Build/Template/64k/jffs2-64k
483 $(call Image/Build/$(1),jffs2-64k,$(2),$(3),$(4),$(5),$(6),$(7))
484 endef
485
486 define Image/Build/Template/128k/squashfs
487 $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7))
488 endef
489
490 define Image/Build/Template/128k/jffs2-128k
491 $(call Image/Build/$(1),jffs2-128k,$(2),$(3),$(4),$(5),$(6),$(7))
492 endef
493
494 ap81_cmdline=board=AP81 console=ttyS0,115200
495 define Image/Build/Profile/AP81
496 $(call Image/Build/Template/$(fs_64k)/$(1),AP83,ap81,$(ap81_cmdline))
497 endef
498
499 ap83_cmdline=board=AP83 console=ttyS0,115200
500 define Image/Build/Profile/AP83
501 $(call Image/Build/Template/$(fs_64k)/$(1),AP83,ap83,$(ap83_cmdline))
502 endef
503
504 db120_cmdline=board=DB120 console=ttyS0,115200
505 define Image/Build/Profile/DB120
506 $(call Image/Build/Template/$(fs_64k)/$(1),DB120,db120,$(db120_cmdline))
507 endef
508
509 pb42_cmdline=board=PB42 console=ttyS0,115200
510 define Image/Build/Profile/PB42
511 $(call Image/Build/Template/$(fs_64k)/$(1),PB4X,pb42,$(pb42_cmdline))
512 endef
513
514 pb44_cmdline=board=PB44 console=ttyS0,115200
515 define Image/Build/Profile/PB44
516 $(call Image/Build/Template/$(fs_64k)/$(1),PB4X,pb44,$(pb44_cmdline))
517 endef
518
519 pb92_cmdline=board=PB92 console=ttyS0,115200
520 define Image/Build/Profile/PB92
521 $(call Image/Build/Template/$(fs_64k)/$(1),PB92,pb92,$(pb92_cmdline))
522 endef
523
524 define Image/Build/Profile/WP543
525 $(call Image/Build/Template/$(fs_64k)/$(1),MyLoader,wp543,0x200000,2M)
526 $(call Image/Build/Template/$(fs_64k)/$(1),MyLoader,wp543,0x400000,4M)
527 $(call Image/Build/Template/$(fs_64k)/$(1),MyLoader,wp543,0x800000,8M)
528 $(call Image/Build/Template/$(fs_64k)/$(1),MyLoader,wp543,0x1000000,16M)
529 endef
530
531 dir600a1_cmdline=board=DIR-600-A1 console=ttyS0,115200
532 define Image/Build/Profile/DIR600A1
533 $(call Image/Build/Template/$(fs_64k)/$(1),Cameo7240,dir-600-a1,$(dir600a1_cmdline),"AP91-AR7240-RT-090223-00")
534 endef
535
536 eap7660d_cmdline=board=EAP7660D console=ttyS0,115200
537 define Image/Build/Profile/EAP7660D
538 $(call Image/Build/Template/$(fs_128k)/$(1),PB4X,eap7660d,$(eap7660d_cmdline))
539 endef
540
541 ja76pf_cmdline=board=JA76PF console=ttyS0,115200
542 define Image/Build/Profile/JA76PF
543 $(call Image/Build/Template/$(fs_64k)/$(1),PB4X,ja76pf,$(ja76pf_cmdline))
544 endef
545
546 jwap003_cmdline=board=JWAP003 console=ttyS0,115200
547 define Image/Build/Profile/JWAP003
548 $(call Image/Build/Template/$(fs_64k)/$(1),PB4X,jwap003,$(jwap003_cmdline))
549 endef
550
551 fr54rtr_cmdline=board=DIR-600-A1 console=ttyS0,115200
552 define Image/Build/Profile/FR54RTR
553 $(call Image/Build/Template/$(fs_64k)/$(1),Cameo7240,fr-54rtr,$(fr54rtr_cmdline),"AP91-AR7240-RT-090223-01")
554 endef
555
556 dir615c1_cmdline=board=DIR-615-C1 console=ttyS0,115200
557 define Image/Build/Profile/DIR615C1
558 $(call Image/Build/Template/$(fs_squash)/$(1),Cameo,dir-615-c1,$(dir615c1_cmdline),"AP81-AR9130-RT-070614-02")
559 endef
560
561 tew632brp_cmdline=board=TEW-632BRP console=ttyS0,115200
562 define Image/Build/Profile/TEW632BRP
563 $(call Image/Build/Template/$(fs_squash)/$(1),Cameo,tew-632brp,$(tew632brp_cmdline),"AP81-AR9130-RT-070614-00")
564 endef
565
566 tew652brp_cmdline=board=TEW-632BRP console=ttyS0,115200
567 define Image/Build/Profile/TEW652BRP
568 $(call Image/Build/Template/$(fs_squash)/$(1),Cameo,tew-652brp,$(tew652brp_cmdline),"AP81-AR9130-RT-080609-05")
569 $(call Image/Build/Template/$(fs_squash)/$(1),Cameo,tew-652brp-recovery,$(tew652brp_cmdline),"AP81-AR9130-RT-070614-02")
570 endef
571
572 a05rbw300n_cmdline=board=TEW-632BRP console=ttyS0,115200
573 define Image/Build/Profile/A02RBW300N
574 $(call Image/Build/Template/$(fs_squash)/$(1),Cameo,a02-rb-w300n,$(a05rbw300n_cmdline),"AP81-AR9130-RT-070614-03")
575 endef
576
577 ubntrs_cmdline=board=UBNT-RS console=ttyS0,115200
578 define Image/Build/Profile/UBNTRS
579 $(call Image/Build/Template/$(fs_64k)/$(1),UBNT,ubnt-rs,$(ubntrs_cmdline),RS,RSx,ar7100)
580 endef
581
582 ubntrspro_cmdline=board=UBNT-RSPRO console=ttyS0,115200
583 define Image/Build/Profile/UBNTRSPRO
584 $(call Image/Build/Template/$(fs_64k)/$(1),UBNT,ubnt-rspro,$(ubntrspro_cmdline),RSPRO,RSPRO,ar7100pro)
585 endef
586
587 ubntlssr71_cmdline=board=UBNT-LS-SR71 console=ttyS0,115200
588 define Image/Build/Profile/UBNTLSSR71
589 $(call Image/Build/Template/$(fs_64k)/$(1),UBNT,ubnt-ls-sr71,$(ubntlssr71_cmdline),LS-SR71,LS-SR71,ar7100)
590 endef
591
592 ubntbulletm_cmdline=board=UBNT-BM console=ttyS0,115200
593 define Image/Build/Profile/UBNTBULLETM
594 $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-bullet-m,$(ubntbulletm_cmdline),XM,UBNTXM,ar7240)
595 endef
596
597 ubntrocketm_cmdline=board=UBNT-RM console=ttyS0,115200
598 define Image/Build/Profile/UBNTROCKETM
599 $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-rocket-m,$(ubntrocketm_cmdline),XM,UBNTXM,ar7240)
600 endef
601
602 ubntnanom_cmdline=board=UBNT-NM console=ttyS0,115200
603 define Image/Build/Profile/UBNTNANOM
604 $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-nano-m,$(ubntnanom_cmdline),XM,UBNTXM,ar7240)
605 endef
606
607 ubntunifi_cmdline=board=UBNT-XM console=ttyS0,115200
608 define Image/Build/Profile/UBNTUNIFI
609 $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-unifi,$(ubntunifi_cmdline),XM,UBNTXM,ar7240)
610 endef
611
612 define Image/Build/Profile/UBNT
613 $(call Image/Build/Profile/UBNTRS,$(1))
614 $(call Image/Build/Profile/UBNTRSPRO,$(1))
615 $(call Image/Build/Profile/UBNTLSSR71,$(1))
616 $(call Image/Build/Profile/UBNTBULLETM,$(1))
617 $(call Image/Build/Profile/UBNTROCKETM,$(1))
618 $(call Image/Build/Profile/UBNTNANOM,$(1))
619 $(call Image/Build/Profile/UBNTUNIFI,$(1))
620 endef
621
622 mzkw04nu_cmdline=board=MZK-W04NU console=ttyS0,115200
623 define Image/Build/Profile/MZKW04NU
624 $(call Image/Build/Template/$(fs_64k)/$(1),Planex,mzk-w04nu,$(mzkw04nu_cmdline))
625 endef
626
627 mzkw300nh_cmdline=board=MZK-W300NH console=ttyS0,115200
628 define Image/Build/Profile/MZKW300NH
629 $(call Image/Build/Template/$(fs_64k)/$(1),Planex,mzk-w300nh,$(mzkw300nh_cmdline))
630 endef
631
632 nbg460n_cmdline=board=NBG460N console=ttyS0,115200
633 define Image/Build/Profile/NBG_460N_550N_550NH
634 $(call Image/Build/Template/$(fs_64k)/$(1),ZyXEL,nbg460n_550n_550nh,$(nbg460n_cmdline),NBG-460N)
635 endef
636
637 tlmr3220_cmdline=board=TL-MR3220 console=ttyS0,115200
638 define Image/Build/Profile/TLMR3220V1
639 $(call Image/Build/Template/$(fs_4k)/$(1),TPLINK,tl-mr3220-v1,$(tlmr3220_cmdline),TL-MR3220v1)
640 endef
641
642 tlmr3420_cmdline=board=TL-MR3420 console=ttyS0,115200
643 define Image/Build/Profile/TLMR3420V1
644 $(call Image/Build/Template/$(fs_4k)/$(1),TPLINK,tl-mr3420-v1,$(tlmr3420_cmdline),TL-MR3420v1)
645 endef
646
647 tlwa901nd_cmdline=board=TL-WA901ND console=ttyS0,115200
648 define Image/Build/Profile/TLWA901NDV1
649 $(call Image/Build/Template/$(fs_4k)/$(1),TPLINK,tl-wa901nd-v1,$(tlwa901nd_cmdline),TL-WA901NDv1)
650 endef
651
652 tlwa901ndv2_cmdline=board=TL-WA901ND-v2 console=ttyS0,115200
653 define Image/Build/Profile/TLWA901NDV2
654 $(call Image/Build/Template/$(fs_4k)/$(1),TPLINK,tl-wa901nd-v2,$(tlwa901ndv2_cmdline),TL-WA901NDv2)
655 endef
656
657 tlwe741ndv1_cmdline=board=TL-WR741ND console=ttyS0,115200
658 define Image/Build/Profile/TLWR741NDV1
659 $(call Image/Build/Template/$(fs_4k)/$(1),TPLINK,tl-wr741nd-v1,$(tlwe741ndv1_cmdline),TL-WR741NDv1)
660 endef
661
662 tlwe740nv1_cmdline=board=TL-WR741ND console=ttyS0,115200
663 define Image/Build/Profile/TLWR740NV1
664 $(call Image/Build/Template/$(fs_4k)/$(1),TPLINK,tl-wr740n-v1,$(tlwe740nv1_cmdline),TL-WR740Nv1)
665 endef
666
667 tlwr841nv15_cmdline=board=TL-WR841N-v1.5 console=ttyS0,115200
668 define Image/Build/Profile/TLWR841NV15
669 $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr841n-v1.5,$(tlwr841nv15_cmdline),TL-WR841Nv1.5)
670 endef
671
672 tlwr841ndv3_cmdline=board=TL-WR941ND console=ttyS0,115200
673 define Image/Build/Profile/TLWR841NDV3
674 $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr841nd-v3,$(tlwr841ndv3_cmdline),TL-WR841NDv3)
675 endef
676
677 tlwr841ndv5_cmdline=board=TL-WR741ND console=ttyS0,115200
678 define Image/Build/Profile/TLWR841NDV5
679 $(call Image/Build/Template/$(fs_4k)/$(1),TPLINK,tl-wr841nd-v5,$(tlwr841ndv5_cmdline),TL-WR841NDv5)
680 endef
681
682 tlwr841ndv7_cmdline=board=TL-WR741ND console=ttyS0,115200
683 define Image/Build/Profile/TLWR841NDV7
684 $(call Image/Build/Template/$(fs_4k)/$(1),TPLINK,tl-wr841nd-v7,$(tlwr841ndv7_cmdline),TL-WR841NDv7)
685 endef
686
687 tlwr941ndv2_cmdline=board=TL-WR941ND console=ttyS0,115200
688 define Image/Build/Profile/TLWR941NDV2
689 $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr941nd-v2,$(tlwr941ndv2_cmdline),TL-WR941NDv2)
690 endef
691
692 tlwr941ndv3_cmdline=board=TL-WR941ND console=ttyS0,115200
693 define Image/Build/Profile/TLWR941NDV3
694 $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr941nd-v3,$(tlwr941ndv3_cmdline),TL-WR941NDv2)
695 endef
696
697 tlwr941ndv4_cmdline=board=TL-WR741ND console=ttyS0,115200
698 define Image/Build/Profile/TLWR941NDV4
699 $(call Image/Build/Template/$(fs_4k)/$(1),TPLINK,tl-wr941nd-v4,$(tlwr941ndv4_cmdline),TL-WR941NDv4)
700 endef
701
702 tlwr1043nd_cmdline=board=TL-WR1043ND console=ttyS0,115200
703 define Image/Build/Profile/TLWR1043NDV1
704 $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr1043nd-v1,$(tlwr1043nd_cmdline),TL-WR1043NDv1)
705 endef
706
707 wndr3700_cmdline=board=WNDR3700 console=ttyS0,115200
708 wndr3700_mtdlayout=mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,1024k(kernel),6656k(rootfs),64k(art)ro,7680k@0x70000(firmware)
709 wndr3700v2_cmdline=board=WNDR3700v2 console=ttyS0,115200
710 wndr3700v2_mtdlayout=mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,1024k(kernel),14848k(rootfs),64k(art)ro,15872k@0x70000(firmware)
711 define Image/Build/Profile/WNDR3700
712 $(call Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3700,$(wndr3700_cmdline),wndr3700_mtdlayout,3700,WNDR3700)
713 $(call Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3700v2,$(wndr3700v2_cmdline),wndr3700v2_mtdlayout,3701,WNDR3700v2)
714 endef
715
716 ap96_cmdline=board=AP96 console=ttyS0,115200
717 define Image/Build/Profile/AP96
718 $(call Image/Build/Template/$(fs_64k)/$(1),AP83,ap96,$(ap96_cmdline))
719 endef
720
721 wr400n_cmdline=board=WRT400N console=ttyS0,115200
722 define Image/Build/Profile/WRT400N
723 $(call Image/Build/Template/$(fs_64k)/$(1),WRT400N,wrt400n,$(wr400n_cmdline))
724 endef
725
726 dir825b1_cmdline=board=DIR-825-B1 console=ttyS0,115200
727 define Image/Build/Profile/DIR825B1
728 $(call Image/Build/Template/$(fs_64k)/$(1),DIR825B1,dir-825-b1,$(dir825b1_cmdline))
729 endef
730
731 wrt160nl_cmdline=board=WRT160NL console=ttyS0,115200
732 define Image/Build/Profile/WRT160NL
733 $(call Image/Build/Template/$(fs_64k)/$(1),CyberTAN,wrt160nl,$(wrt160nl_cmdline),1.00.01)
734 endef
735
736 wzrhpg300nh_cmdline=board=WZR-HP-G300NH console=ttyS0,115200
737 wzrhpg301nh_cmdline=board=WZR-HP-G301NH console=ttyS0,115200
738 define Image/Build/Profile/WZRHPG30XNH
739 $(call Image/Build/Template/$(fs_128k)/$(1),WZRHPG30XNH,wzr-hp-g300nh,$(wzrhpg300nh_cmdline))
740 $(call Image/Build/Template/$(fs_128k)/$(1),WZRHPG30XNH,wzr-hp-g301nh,$(wzrhpg301nh_cmdline))
741 endef
742
743 zcn1523h28_cmdline=board=ZCN-1523H-2 console=ttyS0,115200
744 define Image/Build/Profile/ZCN1523H28
745 $(call Image/Build/Template/$(fs_64k)/$(1),Zcomax,zcn-1523h-2-8,$(zcn1523h28_cmdline))
746 endef
747
748 zcn1523h516_cmdline=board=ZCN-1523H-5 console=ttyS0,115200
749 define Image/Build/Profile/ZCN1523H516
750 $(call Image/Build/Template/$(fs_64k)/$(1),Zcomax,zcn-1523h-5-16,$(zcn1523h516_cmdline))
751 endef
752
753 define Image/Build/Profile/Default
754 $(call Image/Build/Profile/AP81,$(1))
755 $(call Image/Build/Profile/AP83,$(1))
756 $(call Image/Build/Profile/A02RBW300N,$(1))
757 $(call Image/Build/Profile/DB120,$(1))
758 $(call Image/Build/Profile/DIR600A1,$(1))
759 $(call Image/Build/Profile/DIR615C1,$(1))
760 $(call Image/Build/Profile/DIR825B1,$(1))
761 $(call Image/Build/Profile/EAP7660D,$(1))
762 $(call Image/Build/Profile/FR54RTR,$(1))
763 $(call Image/Build/Profile/JA76PF,$(1))
764 $(call Image/Build/Profile/JWAP003,$(1))
765 $(call Image/Build/Profile/MZKW04NU,$(1))
766 $(call Image/Build/Profile/MZKW300NH,$(1))
767 $(call Image/Build/Profile/NBG_460N_550N_550NH,$(1))
768 $(call Image/Build/Profile/PB42,$(1))
769 $(call Image/Build/Profile/PB44,$(1))
770 $(call Image/Build/Profile/PB92,$(1))
771 $(call Image/Build/Profile/TEW632BRP,$(1))
772 $(call Image/Build/Profile/TEW652BRP,$(1))
773 $(call Image/Build/Profile/TLMR3220V1,$(1))
774 $(call Image/Build/Profile/TLMR3420V1,$(1))
775 $(call Image/Build/Profile/TLWA901NDV1,$(1))
776 $(call Image/Build/Profile/TLWA901NDV2,$(1))
777 $(call Image/Build/Profile/TLWR741NDV1,$(1))
778 $(call Image/Build/Profile/TLWR740NV1,$(1))
779 $(call Image/Build/Profile/TLWR841NV15,$(1))
780 $(call Image/Build/Profile/TLWR841NDV3,$(1))
781 $(call Image/Build/Profile/TLWR841NDV5,$(1))
782 $(call Image/Build/Profile/TLWR841NDV7,$(1))
783 $(call Image/Build/Profile/TLWR941NDV2,$(1))
784 $(call Image/Build/Profile/TLWR941NDV3,$(1))
785 $(call Image/Build/Profile/TLWR941NDV4,$(1))
786 $(call Image/Build/Profile/TLWR1043NDV1,$(1))
787 $(call Image/Build/Profile/UBNT,$(1))
788 $(call Image/Build/Profile/WP543,$(1))
789 $(call Image/Build/Profile/WNDR3700,$(1))
790 $(call Image/Build/Profile/AP96,$(1))
791 $(call Image/Build/Profile/WRT400N,$(1))
792 $(call Image/Build/Profile/WRT160NL,$(1))
793 $(call Image/Build/Profile/WZRHPG30XNH,$(1))
794 $(call Image/Build/Profile/ZCN1523H28,$(1))
795 $(call Image/Build/Profile/ZCN1523H516,$(1))
796 endef
797
798 define Image/Build/Profile/Minimal
799 $(call Image/Build/Profile/Default,$(1))
800 endef
801
802 define Image/Build/Profile/Madwifi
803 $(call Image/Build/Profile/EAP7660D,$(1))
804 $(call Image/Build/Profile/UBNTRS,$(1))
805 $(call Image/Build/Profile/UBNTRSPRO,$(1))
806 $(call Image/Build/Profile/UBNTLSSR71,$(1))
807 $(call Image/Build/Profile/WP543,$(1))
808 endef
809
810 define Image/Build/squashfs
811 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
812 dd if=$(KDIR)/root.squashfs of=$(KDIR)/root.squashfs-4k.tmp0 bs=4k conv=sync
813 $(call add_jffs2_mark,$(KDIR)/root.squashfs-4k.tmp0)
814 dd if=$(KDIR)/root.squashfs-4k.tmp0 of=$(BIN_DIR)/$(IMG_PREFIX)-root.squashfs-4k bs=4k conv=sync
815 $(call add_jffs2_mark,$(BIN_DIR)/$(IMG_PREFIX)-root.squashfs-4k)
816 rm -f $(KDIR)/root.squashfs-4k.tmp0
817 endef
818
819 define Image/Build/Initramfs
820 $(call Image/Build/Profile/$(PROFILE),initramfs)
821 endef
822
823 define Image/Build
824 $(call Image/Build/$(1))
825 dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
826
827 $(call Image/Build/Profile/$(PROFILE),$(1))
828 endef
829
830 $(eval $(call BuildImage))