ar71xx: fix TL-MR3x20 profile names in image/Makefile
[openwrt.git] / target / linux / ar71xx / image / Makefile
1 #
2 # Copyright (C) 2008-2011 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 define sysupname
15 $(call imgname,$(1),$(2))-sysupgrade.bin
16 endef
17
18 define factoryname
19 $(call imgname,$(1),$(2))-factory.bin
20 endef
21
22 LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
23
24 VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
25 UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
26 fs_squash:=squashfs-only
27 fs_all:=all
28 fs_4k:=4k
29 fs_64k:=64k
30 fs_128k:=128k
31 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
32 fs_squash:=initramfs
33 fs_all:=initramfs
34 fs_4k:=initramfs
35 fs_64k:=initramfs
36 fs_128k:=initramfs
37 VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
38 UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs
39 endif
40
41 define CompressLzma
42 $(STAGING_DIR_HOST)/bin/lzma e $(1) -lc1 -lp2 -pb2 $(2)
43 endef
44
45 define PatchKernelLzma
46 cp $(KDIR)/vmlinux $(KDIR)/vmlinux-$(1)
47 $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux-$(1) "$(strip $(2))"
48 $(call CompressLzma,$(KDIR)/vmlinux-$(1),$(KDIR)/vmlinux-$(1).bin.lzma)
49 endef
50
51 define PatchKernelGzip
52 cp $(KDIR)/vmlinux $(KDIR)/vmlinux-$(1)
53 $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux-$(1) "$(strip $(2))"
54 gzip -9 -c $(KDIR)/vmlinux-$(1) > $(KDIR)/vmlinux-$(1).bin.gz
55 endef
56
57 define MkuImage
58 mkimage -A mips -O linux -T kernel -a 0x80060000 -C $(1) $(2) \
59 -e 0x80060000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
60 -d $(3) $(4)
61 endef
62
63 define MkuImageLzma
64 $(call PatchKernelLzma,$(1),$(2))
65 $(call MkuImage,lzma,,$(KDIR)/vmlinux-$(1).bin.lzma,$(KDIR)/vmlinux-$(1).uImage)
66 endef
67
68 define MkuImageGzip
69 $(call PatchKernelGzip,$(1),$(2))
70 $(call MkuImage,gzip,,$(KDIR)/vmlinux-$(1).bin.gz,$(KDIR)/vmlinux-$(1).uImage)
71 endef
72
73 define MkuImageOKLI
74 $(call MkuImage,lzma,-M 0x4f4b4c49,$(KDIR)/vmlinux.bin.lzma,$(KDIR)/vmlinux-$(1).okli)
75 endef
76
77 define CatFiles
78 if [ `stat -c%s "$(1)"` -gt $(2) ]; then \
79 echo "Warning: $(1) is too big"; \
80 else if [ `stat -c%s $(3)` -gt $(4) ]; then \
81 echo "Warning: $(3) is too big"; \
82 else \
83 ( dd if=$(1) bs=$(2) conv=sync; dd if=$(3) ) > $(5); \
84 fi; fi
85 endef
86
87 define Sysupgrade/KR
88 $(call CatFiles,$(KDIR)/vmlinux-$(2).uImage,$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(2)))
89 endef
90
91 define Sysupgrade/RK
92 $(call CatFiles,$(KDIR)/root.$(1),$(4),$(KDIR)/vmlinux-$(2).uImage,$(3),$(call sysupname,$(1),$(2)))
93 endef
94
95 define Image/BuildLoader
96 -rm -rf $(KDIR)/lzma-loader
97 $(LOADER_MAKE) LOADER=loader-$(1).$(2) KERNEL_CMDLINE="$(3)"\
98 LZMA_TEXT_START=0x80a00000 LOADADDR=0x80060000 \
99 LOADER_DATA="$(KDIR)/vmlinux.bin.lzma" \
100 compile loader.$(2)
101 endef
102
103 define Image/BuildLoaderAlone
104 -rm -rf $(KDIR)/lzma-loader
105 $(LOADER_MAKE) LOADER=loader-$(1).$(2) KERNEL_CMDLINE="$(3)" \
106 LZMA_TEXT_START=0x80a00000 LOADADDR=0x80060000 \
107 FLASH_OFFS=$(4) FLASH_MAX=$(5) \
108 compile loader.$(2)
109 endef
110
111 define Build/Clean
112 $(LOADER_MAKE) clean
113 endef
114
115 define Image/BuildKernel
116 cp $(KDIR)/vmlinux.elf $(VMLINUX).elf
117 cp $(KDIR)/vmlinux $(VMLINUX).bin
118 gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
119 $(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
120 dd if=$(KDIR)/vmlinux.bin.lzma of=$(VMLINUX).lzma bs=65536 conv=sync
121 dd if=$(KDIR)/vmlinux.bin.gz of=$(VMLINUX).gz bs=65536 conv=sync
122 $(call MkuImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(UIMAGE)-gzip.bin)
123 $(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(UIMAGE)-lzma.bin)
124 $(call Image/Build/Initramfs)
125 endef
126
127 define Image/Build/WRT400N
128 $(call MkuImageLzma,$(2),$(3))
129 $(call Sysupgrade/KR,$(1),$(2),1310720,6488064)
130 if [ -e "$(call sysupname,$(1),$(2))" ]; then \
131 wrt400n $(KDIR)/vmlinux-$(2).uImage $(KDIR)/root.$(1) $(call factoryname,$(1),$(2)); \
132 fi
133 endef
134
135 dir825b1_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),5184k(rootfs),64k(caldata)ro,1600k(unknown)ro,6208k@0x50000(firmware)
136 define Image/Build/DIR825B1
137 $(call MkuImageLzma,$(2),$(3) $(dir825b1_mtdlayout))
138 $(call Sysupgrade/KR,$(1),$(2),1048576,5308416)
139 if [ -e "$(call sysupname,$(1),$(2))" ]; then \
140 ( \
141 dd if=$(call sysupname,$(1),$(2)); \
142 echo -n "01AP94-AR7161-RT-080619-00"; \
143 ) > $(call imgname,$(1),$(2))-backup-loader.bin; \
144 if [ `stat -c%s $(call sysupname,$(1),$(2))` -gt 4194304 ]; then \
145 echo "Warning: $(call sysupname,$(1),$(2)) is too big"; \
146 else \
147 ( \
148 dd if=$(call sysupname,$(1),$(2)) bs=4096k conv=sync; \
149 echo -n "00AP94-AR7161-RT-080619-00"; \
150 ) > $(call factoryname,$(1),$(2)); \
151 fi; \
152 fi
153 endef
154
155 define Image/Build/WZRHPG30XNH
156 $(call MkuImageLzma,$(2),$(3))
157 $(call Sysupgrade/KR,$(1),$(2),1048576,31850496)
158 if [ -e "$(call sysupname,$(1),$(2))" ]; then \
159 ( \
160 echo -n -e "# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
161 dd if=$(call sysupname,$(1),$(2)); \
162 ) > $(call imgname,$(1),$(2))-tftp.bin; \
163 buffalo-enc -p $(4) -v 1.99 \
164 -i $(call sysupname,$(1),$(2)) \
165 -o $(KDIR)/$(2).enc; \
166 buffalo-tag -b $(4) -p $(4) -a ath -v 1.99 -m 1.01 -l mlang8 \
167 -w 3 -c 0x80041000 -d 0x801e8000 -f 1 -r M_ \
168 -i $(KDIR)/$(2).enc \
169 -o $(call factoryname,$(1),$(2)); \
170 fi
171 endef
172
173 define Image/Build/WHRHPG300N
174 $(call MkuImageLzma,$(2),$(3) $($(4)))
175 $(call Sysupgrade/KR,$(1),$(2),917504,2883584)
176 if [ -e "$(call sysupname,$(1),$(2))" ]; then \
177 ( \
178 echo -n -e "# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
179 dd if=$(call sysupname,$(1),$(2)); \
180 ) > $(call imgname,$(1),$(2))-tftp.bin; \
181 buffalo-enc -p $(5) -v 1.99 \
182 -i $(call sysupname,$(1),$(2)) \
183 -o $(KDIR)/$(2).enc; \
184 buffalo-tag -b $(5) -p $(5) -a ath -v 1.99 -m 1.01 -l mlang8 \
185 -w 3 -c 0x80041000 -d 0x801e8000 -f 1 -r M_ \
186 -i $(KDIR)/$(2).enc \
187 -o $(call factoryname,$(1),$(2)); \
188 fi
189 endef
190
191 define Image/Build/Cameo
192 $(call MkuImageLzma,$(2),$(3) $($(4)))
193 $(call Sysupgrade/KR,$(1),$(2),$(5),$(6))
194 if [ -e "$(call sysupname,$(1),$(2))" ]; then \
195 ( \
196 dd if=$(KDIR)/vmlinux-$(2).uImage bs=$(5) conv=sync; \
197 dd if=$(KDIR)/root.$(1) bs=$(6) conv=sync; \
198 echo -n $(7); \
199 ) > $(call factoryname,$(1),$(2)); \
200 fi
201 endef
202
203 cameo913x_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(config)ro,896k(kernel),2944k(rootfs),64k(art)ro,3840k@0x30000(firmware)
204 define Image/Build/Cameo913x
205 $(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo913x_mtdlayout),917504,2949120,$(4))
206 endef
207
208 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)
209 define Image/Build/Cameo7240
210 $(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo7240_mtdlayout),917504,2818048,$(4))
211 endef
212
213 define Image/Build/Ath
214 $(call Sysupgrade/$(7),$(1),$(2),$(5),$(6))
215 if [ -e "$(call sysupname,$(1),$(2))" ]; then \
216 dd if=$(KDIR)/vmlinux-$(2).uImage \
217 of=$(call imgname,kernel,$(2)).bin bs=64k conv=sync; \
218 dd if=$(KDIR)/root.$(1) \
219 of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync; \
220 fi
221 endef
222
223 define Image/Build/AthGzip
224 $(call MkuImageGzip,$(2),$(3) $($(4)))
225 $(call Image/Build/Ath,$(1),$(2),$(3),$(4),$(5),$(6),$(7))
226 endef
227
228 define Image/Build/AthGzip/initramfs
229 $(call MkuImageLzma,$(2),$(3) $($(4)))
230 $(CP) $(KDIR)/vmlinux-$(2).uImage $(call imgname,$(1),$(2))-uImage.bin
231 endef
232
233 define Image/Build/AthLzma
234 $(call MkuImageLzma,$(2),$(3) $($(4)))
235 $(call Image/Build/Ath,$(1),$(2),$(3),$(4),$(5),$(6),$(7))
236 endef
237
238 define Image/Build/AthLzma/initramfs
239 $(call MkuImageLzma,$(2),$(3) $($(4)))
240 $(CP) $(KDIR)/vmlinux-$(2).uImage $(call imgname,$(1),$(2))-uImage.bin
241 endef
242
243 define Image/Build/PB4X
244 $(call PatchKernelLzma,$(2),$(3))
245 dd if=$(KDIR)/vmlinux-$(2).bin.lzma \
246 of=$(call imgname,kernel,$(2)).bin bs=64k conv=sync
247 dd if=$(KDIR)/root.$(1) \
248 of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync
249 -sh $(TOPDIR)/scripts/combined-image.sh \
250 "$(call imgname,kernel,$(2)).bin" \
251 "$(call imgname,$(1),$(2)-rootfs).bin" \
252 $(call sysupname,$(1),$(2))
253 endef
254
255
256 define Image/Build/MyLoader
257 -$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(3) \
258 -p0x030000:0xe0000:al:0x80060000:kernel:$(KDIR)/vmlinux.bin.lzma \
259 -p0x110000:0:::rootfs:$(KDIR)/root.$(1) \
260 $(call imgname,$(1),$(2))-$(4)-factory.img
261 endef
262
263 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)
264 define Image/Build/UBNTXM
265 $(call MkuImageLzma,$(2),$(3) $(ubntxm_mtdlayout))
266 $(call Sysupgrade/KR,$(1),$(2),1048576,6684672)
267 dd if=$(KDIR)/vmlinux-$(2).uImage of=$(KDIR)/vmlinux-$(2).uImage.bin bs=1024k conv=sync
268 -$(STAGING_DIR_HOST)/bin/mkfwimage \
269 -B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
270 -k $(KDIR)/vmlinux-$(2).uImage.bin \
271 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
272 -o $(call factoryname,$(1),$(2))
273 endef
274
275 define Image/Build/UBNT
276 $(call PatchKernelLzma,$(2),$(3))
277 dd if=$(KDIR)/vmlinux-$(2).bin.lzma of=$(KDIR)/vmlinux-$(2).lzma bs=64k conv=sync
278 -$(STAGING_DIR_HOST)/bin/mkfwimage \
279 -B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
280 -k $(KDIR)/vmlinux-$(2).lzma \
281 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
282 -o $(call factoryname,$(1),$(2))
283 -sh $(TOPDIR)/scripts/combined-image.sh \
284 "$(KDIR)/vmlinux-$(2).lzma" \
285 "$(BIN_DIR)/$(IMG_PREFIX)-root.$(1)" \
286 $(call sysupname,$(1),$(2))
287 endef
288
289 define Image/Build/Planex
290 $(call MkuImageGzip,$(2),$(3))
291 $(call Sysupgrade/KR,$(1),$(2),1441792,6356992)
292 if [ -e "$(call sysupname,$(1),$(2))" ]; then \
293 $(STAGING_DIR_HOST)/bin/mkplanexfw \
294 -B $(2) \
295 -v 2.00.00 \
296 -i $(call sysupname,$(1),$(2)) \
297 -o $(call factoryname,$(1),$(2)); \
298 fi
299 endef
300
301 define Image/Build/TPLINKOLD
302 $(call Image/BuildLoaderAlone,$(2),gz,$(3),0x22000,0)
303 $(call MkuImageOKLI,$(2))
304 ( \
305 dd if=$(KDIR)/loader-$(2).gz bs=7680 count=1 conv=sync; \
306 dd if=$(KDIR)/vmlinux-$(2).okli conv=sync; \
307 ) > $(KDIR)/kernel-$(2).bin
308 -$(STAGING_DIR_HOST)/bin/mktplinkfw \
309 -B $(4) -N OpenWrt -V $(REVISION)\
310 -k $(KDIR)/kernel-$(2).bin \
311 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
312 -o $(call factoryname,$(1),$(2))
313 -$(STAGING_DIR_HOST)/bin/mktplinkfw \
314 -B $(4) -N OpenWrt -V $(REVISION) -s \
315 -k $(KDIR)/kernel-$(2).bin \
316 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
317 -o $(call sysupname,$(1),$(2))
318 endef
319
320 define Image/Build/TPLINKOLD/initramfs
321 $(call Image/BuildLoader,$(2),gz,$(3),0x80060000)
322 -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
323 -B $(4) -N OpenWrt -V $(REVISION) -s \
324 -k $(KDIR)/loader-$(2).gz \
325 -o $(call imgname,$(1),$(2))-uImage.bin
326 endef
327
328 define Image/Build/TPLINK
329 $(call Image/BuildLoaderAlone,$(2),gz,$(3),0x22000,0)
330 $(call MkuImageOKLI,$(2))
331 ( \
332 dd if=$(KDIR)/loader-$(2).gz bs=7680 count=1 conv=sync; \
333 dd if=$(KDIR)/vmlinux-$(2).okli conv=sync; \
334 ) > $(KDIR)/kernel-$(2).bin
335 -$(STAGING_DIR_HOST)/bin/mktplinkfw \
336 -B $(4) -N OpenWrt -V $(REVISION)\
337 -k $(KDIR)/kernel-$(2).bin \
338 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
339 -o $(call factoryname,$(1),$(2))
340 -$(STAGING_DIR_HOST)/bin/mktplinkfw \
341 -B $(4) -N OpenWrt -V $(REVISION) -s \
342 -k $(KDIR)/kernel-$(2).bin \
343 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
344 -o $(call sysupname,$(1),$(2))
345 endef
346
347 define Image/Build/TPLINK/initramfs
348 $(call Image/BuildLoader,$(2),gz,$(3),0x80060000)
349 -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
350 -B $(4) -N OpenWrt -V $(REVISION) -s \
351 -k $(KDIR)/loader-$(2).gz \
352 -o $(call imgname,$(1),$(2))-uImage.bin
353 endef
354
355 define Image/Build/TPLINK-LZMA
356 $(call PatchKernelLzma,$(2),$(3))
357 -$(STAGING_DIR_HOST)/bin/mktplinkfw \
358 -B $(4) -N OpenWrt -V $(REVISION)\
359 -k $(KDIR)/vmlinux-$(2).bin.lzma \
360 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
361 -o $(call factoryname,$(1),$(2))
362 -$(STAGING_DIR_HOST)/bin/mktplinkfw \
363 -B $(4) -N OpenWrt -V $(REVISION) -s \
364 -k $(KDIR)/vmlinux-$(2).bin.lzma \
365 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
366 -o $(call sysupname,$(1),$(2))
367 endef
368
369 define Image/Build/TPLINK-LZMA/initramfs
370 $(call PatchKernelLzma,$(2),$(3))
371 -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
372 -B $(4) -N OpenWrt -V $(REVISION) -s \
373 -k $(KDIR)/vmlinux-$(2).bin.lzma \
374 -o $(call imgname,$(1),$(2))-uImage.bin
375 endef
376
377 define Image/Build/CyberTAN
378 $(call MkuImageGzip,$(2),$(3))
379 $(STAGING_DIR_HOST)/bin/trx -o $(KDIR)/image.tmp -f $(KDIR)/vmlinux-$(2).uImage \
380 -x 32 -a 0x10000 -x -32 -f $(KDIR)/root.$(1)
381 -$(STAGING_DIR_HOST)/bin/addpattern -B $(2) -v v$(4) \
382 -i $(KDIR)/image.tmp \
383 -o $(call sysupname,$(1),$(2))
384 -$(STAGING_DIR_HOST)/bin/addpattern -B $(2) -v v$(4) -g \
385 -i $(KDIR)/image.tmp \
386 -o $(call factoryname,$(1),$(2))
387 rm $(KDIR)/image.tmp
388 endef
389
390 define Image/Build/Netgear/Build_uImage
391 $(call MkuImageLzma,$(1),$(2) $(3))
392 -rm -rf $(KDIR)/$(1)
393 mkdir -p $(KDIR)/$(1)/image
394 $(STAGING_DIR_HOST)/bin/wndr3700 \
395 $(KDIR)/vmlinux-$(1).uImage \
396 $(KDIR)/$(1)/image/uImage \
397 $(4)
398 $(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
399 $(KDIR)/$(1) $(KDIR)/vmlinux-$(1).uImage.squashfs.tmp \
400 -nopad -noappend -root-owned -be
401 -rm -rf $(KDIR)/$(1)
402 mkimage -A mips -O linux -T filesystem -C none \
403 -a 0xbf070000 -e 0xbf070000 \
404 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
405 -d $(KDIR)/vmlinux-$(1).uImage.squashfs.tmp \
406 $(KDIR)/vmlinux-$(1).uImage.squashfs.tmp2
407 $(STAGING_DIR_HOST)/bin/wndr3700 \
408 $(KDIR)/vmlinux-$(1).uImage.squashfs.tmp2 \
409 $(KDIR)/vmlinux-$(1).uImage.squashfs \
410 $(4)
411 -rm -f $(KDIR)/vmlinux-$(1).uImage.squashfs.tmp*
412 endef
413
414 define Image/Build/Netgear/Estimate_uImage
415 $(call Image/Build/Netgear/Build_uImage,$(1)_est,$(2),$(3),$(4))
416 ( \
417 set -e; \
418 kk=`echo '$(3)' | sed -e 's/.*[:,]\([0-9]*\)k(kernel).*/\1/'`; \
419 rk=`echo '$(3)' | sed -e 's/.*[:,]\([0-9]*\)k(rootfs).*/\1/'`; \
420 let 'tk = kk + rk'; \
421 s=`stat -c'%s' '$(KDIR)/vmlinux-$(1)_est.uImage.squashfs'`; \
422 c=`echo '$(3)' | wc -c`; \
423 let 'kk = (((s + c) / (64 * 1024) + 1) * 64)'; \
424 let 'rk = tk - kk'; \
425 echo '$(3)' | sed -e "s/[0-9]*k(kernel)/$$$${kk}k(kernel)/" \
426 -e "s/[0-9]*k(rootfs)/$$$${rk}k(rootfs)/" > \
427 '$(KDIR)/$(1)_mtdparts'; \
428 let 'k = kk * 1024'; \
429 echo "$$$${k}" > '$(KDIR)/$(1)_kernel_maxsize'; \
430 let 'r = rk * 1024'; \
431 echo "$$$${r}" > '$(KDIR)/$(1)_rootfs_maxsize'; \
432 )
433 -rm -f $(KDIR)/vmlinux-$(1)_est \
434 $(KDIR)/vmlinux-$(1)_est.bin.lzma \
435 $(KDIR)/vmlinux-$(1)_est.uImage \
436 $(KDIR)/vmlinux-$(1)_est.uImage.squashfs
437 endef
438
439 define Image/Build/Netgear
440 $(call Image/Build/Netgear/Estimate_uImage,$(2),$(3),$(4),$(5))
441 $(call Image/Build/Netgear/Build_uImage,$(2),$(3),`cat $(KDIR)/$(2)_mtdparts`,$(5))
442 if [ `stat -c%s '$(KDIR)/vmlinux-$(2).uImage.squashfs'` -gt \
443 `cat '$(KDIR)/$(2)_kernel_maxsize'` ]; then \
444 echo "$(KDIR)/vmlinux-$(2).uImage.squashfs is too big" >& 2; \
445 else if [ `stat -c%s '$(KDIR)/root.$(1)'` -gt \
446 `cat '$(KDIR)/$(2)_rootfs_maxsize'` ]; then \
447 echo "$(KDIR)/root.$(1) is too big" >& 2; \
448 else \
449 ( \
450 set -e; \
451 dd if=$(KDIR)/vmlinux-$(2).uImage.squashfs \
452 bs=`cat '$(KDIR)/$(2)_kernel_maxsize'` conv=sync; \
453 dd if=$(KDIR)/root.$(1) bs=64k; \
454 ) > $(call sysupname,$(1),$(2)); \
455 for r in $(7) ; do \
456 [ -n "$$$$r" ] && dashr="-$$$$r" || dashr= ; \
457 $(STAGING_DIR_HOST)/bin/mkdniimg \
458 -B $(6) -v OpenWrt.$(REVISION) -r "$$$$r" $(8) \
459 -i $(call sysupname,$(1),$(2)) \
460 -o $(call imgname,$(1),$(2))-factory$$$$dashr.img; \
461 done; \
462 fi; fi
463 endef
464
465 define Image/Build/Netgear/initramfs
466 $(call MkuImageLzma,$(2),$(3) $($(4)))
467 $(STAGING_DIR_HOST)/bin/wndr3700 \
468 $(KDIR)/vmlinux-$(2).uImage \
469 $(call imgname,$(1),$(2))-uImage.bin \
470 $(5)
471 endef
472
473 ifdef CONFIG_PACKAGE_uboot-ar71xx-nbg460n_550n_550nh
474 define Image/Build/ZyXEL
475 $(call MkuImageLzma,$(2),$(3))
476 $(call Sysupgrade/KR,$(1),$(2),917504,2752512)
477 if [ -e "$(call sysupname,$(1),$(2))" ]; then \
478 if [ ! -f $(BIN_DIR)/$(IMG_PREFIX)-$(2)-u-boot.bin ]; then \
479 echo "Warning: $(IMG_PREFIX)-$(2)-u-boot.bin not found"; \
480 else \
481 $(STAGING_DIR_HOST)/bin/mkzynfw \
482 -B $(4) \
483 -b $(BIN_DIR)/$(IMG_PREFIX)-$(2)-u-boot.bin \
484 -r $(call sysupname,$(1),$(2)):0x10000 \
485 -o $(call factoryname,$(1),$(2)); \
486 fi; fi
487 endef
488 endif
489
490 define Image/Build/OpenMesh
491 $(call MkuImageLzma,$(2))
492 -sh $(TOPDIR)/scripts/om2p-fwupgradecfg-gen.sh \
493 "$(BUILD_DIR)/om2p-fwupgrade.cfg" \
494 "$(KDIR)/vmlinux-$(2).uImage" \
495 "$(KDIR)/root.$(1)"
496 -sh $(TOPDIR)/scripts/combined-ext-image.sh \
497 "$(3)" "$(call factoryname,$(1),$(2))" \
498 "$(BUILD_DIR)/om2p-fwupgrade.cfg" "fwupgrade.cfg" \
499 "$(KDIR)/vmlinux-$(2).uImage" "kernel" \
500 "$(KDIR)/root.$(1)" "rootfs"
501 endef
502
503 define Image/Build/Zcomax
504 $(call MkuImageLzma,$(2),$(3))
505 $(call Sysupgrade/RK,$(1),$(2),1507328,6356992)
506 if [ -e "$(call sysupname,$(1),$(2))" ]; then \
507 $(STAGING_DIR_HOST)/bin/mkzcfw \
508 -B $(2) \
509 -k $(KDIR)/vmlinux-$(2).uImage \
510 -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
511 -o $(call imgname,$(1),$(2))-factory.img; \
512 fi
513 endef
514
515 define Image/Build/Template/initramfs/initramfs
516 $(call Image/Build/$(1)/initramfs,initramfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
517 endef
518
519 define Image/Build/Template/all/squashfs
520 $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
521 endef
522
523 define Image/Build/Template/all/jffs2-64k
524 $(call Image/Build/$(1),jffs2-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
525 endef
526
527 define Image/Build/Template/all/jffs2-128k
528 $(call Image/Build/$(1),jffs2-128k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
529 endef
530
531 define Image/Build/Template/squashfs-only/squashfs
532 $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
533 endef
534
535 define Image/Build/Template/4k/squashfs
536 $(call Image/Build/$(1),squashfs-4k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
537 endef
538
539 define Image/Build/Template/64k/squashfs
540 $(call Image/Build/$(1),squashfs-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
541 endef
542
543 define Image/Build/Template/64k/jffs2-64k
544 $(call Image/Build/$(1),jffs2-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
545 endef
546
547 define Image/Build/Template/128k/squashfs
548 $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
549 endef
550
551 define Image/Build/Template/128k/jffs2-128k
552 $(call Image/Build/$(1),jffs2-128k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
553 endef
554
555
556 ap121_mtdlayout_2M=mtdparts=spi0.0:64k(u-boot)ro,1216k(rootfs),704k(kernel),64k(art)ro,1920k@0x10000(firmware)
557 ap121_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs),896k(kernel),64k(nvram),64k(art)ro,3648k@0x50000(firmware)
558
559 ap121_cmdline=board=AP121 console=ttyATH0,115200
560 define Image/Build/Profile/AP121
561 $(call Image/Build/Template/$(fs_4k)/$(1),AthLzma,ap121-2M,$(ap121_cmdline),ap121_mtdlayout_2M,720896,1245184,RK)
562 $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,ap121-4M,$(ap121_cmdline),ap121_mtdlayout_4M,917504,2818048,RK)
563 endef
564
565 ap121_mini_cmdline=board=AP121-MINI console=ttyATH0,115200
566 define Image/Build/Profile/AP121MINI
567 $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,ap121-mini,$(ap121_mini_cmdline),ap121_mtdlayout_4M,917504,2818048,RK)
568 endef
569
570 ap81_cmdline=board=AP81 console=ttyS0,115200
571 define Image/Build/Profile/AP81
572 $(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap81,$(ap81_cmdline),,1310720,6619136,KR)
573 endef
574
575 ap83_cmdline=board=AP83 console=ttyS0,115200
576 define Image/Build/Profile/AP83
577 $(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap83,$(ap83_cmdline),,1310720,6619136,KR)
578 endef
579
580 ap96_cmdline=board=AP96 console=ttyS0,115200
581 define Image/Build/Profile/AP96
582 $(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap96,$(ap96_cmdline),ap96_mtdlayout,1769472,6291456,RK)
583 endef
584
585 db120_cmdline=board=DB120 console=ttyS0,115200
586 db120_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
587 define Image/Build/Profile/DB120
588 $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,db120,$(db120_cmdline),db120_mtdlayout,1441792,6488064,RK)
589 endef
590
591 pb42_cmdline=board=PB42 console=ttyS0,115200
592 define Image/Build/Profile/PB42
593 $(call Image/Build/Template/$(fs_64k)/$(1),PB4X,pb42,$(pb42_cmdline))
594 endef
595
596 pb44_cmdline=board=PB44 console=ttyS0,115200
597 define Image/Build/Profile/PB44
598 $(call Image/Build/Template/$(fs_64k)/$(1),PB4X,pb44,$(pb44_cmdline))
599 endef
600
601 pb92_cmdline=board=PB92 console=ttyS0,115200
602 define Image/Build/Profile/PB92
603 $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,pb92,$(pb92_cmdline),,917504,2818048,KR)
604 endef
605
606 define Image/Build/Profile/WP543
607 $(call Image/Build/Template/$(fs_64k)/$(1),MyLoader,wp543,0x200000,2M)
608 $(call Image/Build/Template/$(fs_64k)/$(1),MyLoader,wp543,0x400000,4M)
609 $(call Image/Build/Template/$(fs_64k)/$(1),MyLoader,wp543,0x800000,8M)
610 $(call Image/Build/Template/$(fs_64k)/$(1),MyLoader,wp543,0x1000000,16M)
611 endef
612
613 dir600a1_cmdline=board=DIR-600-A1 console=ttyS0,115200
614 define Image/Build/Profile/DIR600A1
615 $(call Image/Build/Template/$(fs_64k)/$(1),Cameo7240,dir-600-a1,$(dir600a1_cmdline),"AP91-AR7240-RT-090223-00")
616 endef
617
618 eap7660d_cmdline=board=EAP7660D console=ttyS0,115200
619 define Image/Build/Profile/EAP7660D
620 $(call Image/Build/Template/$(fs_128k)/$(1),PB4X,eap7660d,$(eap7660d_cmdline))
621 endef
622
623 ja76pf_cmdline=board=JA76PF console=ttyS0,115200
624 define Image/Build/Profile/JA76PF
625 $(call Image/Build/Template/$(fs_64k)/$(1),PB4X,ja76pf,$(ja76pf_cmdline))
626 endef
627
628 jwap003_cmdline=board=JWAP003 console=ttyS0,115200
629 define Image/Build/Profile/JWAP003
630 $(call Image/Build/Template/$(fs_64k)/$(1),PB4X,jwap003,$(jwap003_cmdline))
631 endef
632
633 fr54rtr_cmdline=board=DIR-600-A1 console=ttyS0,115200
634 define Image/Build/Profile/FR54RTR
635 $(call Image/Build/Template/$(fs_64k)/$(1),Cameo7240,fr-54rtr,$(fr54rtr_cmdline),"AP91-AR7240-RT-090223-01")
636 endef
637
638 dir615c1_cmdline=board=DIR-615-C1 console=ttyS0,115200
639 define Image/Build/Profile/DIR615C1
640 $(call Image/Build/Template/$(fs_squash)/$(1),Cameo913x,dir-615-c1,$(dir615c1_cmdline),"AP81-AR9130-RT-070614-02")
641 endef
642
643 tew632brp_cmdline=board=TEW-632BRP console=ttyS0,115200
644 define Image/Build/Profile/TEW632BRP
645 $(call Image/Build/Template/$(fs_squash)/$(1),Cameo913x,tew-632brp,$(tew632brp_cmdline),"AP81-AR9130-RT-070614-00")
646 endef
647
648 tew652brp_cmdline=board=TEW-632BRP console=ttyS0,115200
649 define Image/Build/Profile/TEW652BRP
650 $(call Image/Build/Template/$(fs_squash)/$(1),Cameo913x,tew-652brp,$(tew652brp_cmdline),"AP81-AR9130-RT-080609-05")
651 $(call Image/Build/Template/$(fs_squash)/$(1),Cameo913x,tew-652brp-recovery,$(tew652brp_cmdline),"AP81-AR9130-RT-070614-02")
652 endef
653
654 a05rbw300n_cmdline=board=TEW-632BRP console=ttyS0,115200
655 define Image/Build/Profile/A02RBW300N
656 $(call Image/Build/Template/$(fs_squash)/$(1),Cameo913x,a02-rb-w300n,$(a05rbw300n_cmdline),"AP81-AR9130-RT-070614-03")
657 endef
658
659 ubntairrouter_cmdline=board=UBNT-AR console=ttyS0,115200
660 define Image/Build/Profile/UBNTAIRROUTER
661 $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-airrouter,$(ubntairrouter_cmdline),XM,UBNTXM,ar7240)
662 endef
663
664 ubntrs_cmdline=board=UBNT-RS console=ttyS0,115200
665 define Image/Build/Profile/UBNTRS
666 $(call Image/Build/Template/$(fs_64k)/$(1),UBNT,ubnt-rs,$(ubntrs_cmdline),RS,RSx,ar7100)
667 endef
668
669 ubntrspro_cmdline=board=UBNT-RSPRO console=ttyS0,115200
670 define Image/Build/Profile/UBNTRSPRO
671 $(call Image/Build/Template/$(fs_64k)/$(1),UBNT,ubnt-rspro,$(ubntrspro_cmdline),RSPRO,RSPRO,ar7100pro)
672 endef
673
674 ubntlssr71_cmdline=board=UBNT-LS-SR71 console=ttyS0,115200
675 define Image/Build/Profile/UBNTLSSR71
676 $(call Image/Build/Template/$(fs_64k)/$(1),UBNT,ubnt-ls-sr71,$(ubntlssr71_cmdline),LS-SR71,LS-SR71,ar7100)
677 endef
678
679 ubntbulletm_cmdline=board=UBNT-BM console=ttyS0,115200
680 define Image/Build/Profile/UBNTBULLETM
681 $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-bullet-m,$(ubntbulletm_cmdline),XM,UBNTXM,ar7240)
682 endef
683
684 ubntrocketm_cmdline=board=UBNT-RM console=ttyS0,115200
685 define Image/Build/Profile/UBNTROCKETM
686 $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-rocket-m,$(ubntrocketm_cmdline),XM,UBNTXM,ar7240)
687 endef
688
689 ubntnanom_cmdline=board=UBNT-NM console=ttyS0,115200
690 define Image/Build/Profile/UBNTNANOM
691 $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-nano-m,$(ubntnanom_cmdline),XM,UBNTXM,ar7240)
692 endef
693
694 ubntunifi_cmdline=board=UBNT-XM console=ttyS0,115200
695 define Image/Build/Profile/UBNTUNIFI
696 $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-unifi,$(ubntunifi_cmdline),XM,UBNTXM,ar7240)
697 endef
698
699 define Image/Build/Profile/UBNT
700 $(call Image/Build/Profile/UBNTAIRROUTER,$(1))
701 $(call Image/Build/Profile/UBNTRS,$(1))
702 $(call Image/Build/Profile/UBNTRSPRO,$(1))
703 $(call Image/Build/Profile/UBNTLSSR71,$(1))
704 $(call Image/Build/Profile/UBNTBULLETM,$(1))
705 $(call Image/Build/Profile/UBNTROCKETM,$(1))
706 $(call Image/Build/Profile/UBNTNANOM,$(1))
707 $(call Image/Build/Profile/UBNTUNIFI,$(1))
708 endef
709
710 mzkw04nu_cmdline=board=MZK-W04NU console=ttyS0,115200
711 define Image/Build/Profile/MZKW04NU
712 $(call Image/Build/Template/$(fs_64k)/$(1),Planex,mzk-w04nu,$(mzkw04nu_cmdline))
713 endef
714
715 mzkw300nh_cmdline=board=MZK-W300NH console=ttyS0,115200
716 define Image/Build/Profile/MZKW300NH
717 $(call Image/Build/Template/$(fs_64k)/$(1),Planex,mzk-w300nh,$(mzkw300nh_cmdline))
718 endef
719
720 nbg460n_cmdline=board=NBG460N console=ttyS0,115200
721 define Image/Build/Profile/NBG_460N_550N_550NH
722 $(call Image/Build/Template/$(fs_64k)/$(1),ZyXEL,nbg460n_550n_550nh,$(nbg460n_cmdline),NBG-460N)
723 endef
724
725 define Image/Build/Profile/OM2P
726 $(call Image/Build/Template/$(fs_squash)/$(1),OpenMesh,om2p,OM2P)
727 endef
728
729 tlmr3220_cmdline=board=TL-MR3220 console=ttyS0,115200
730 define Image/Build/Profile/TLMR3220
731 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-mr3220-v1,$(tlmr3220_cmdline),TL-MR3220v1)
732 endef
733
734 tlmr3420_cmdline=board=TL-MR3420 console=ttyS0,115200
735 define Image/Build/Profile/TLMR3420
736 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-mr3420-v1,$(tlmr3420_cmdline),TL-MR3420v1)
737 endef
738
739 tlwa901_cmdline=board=TL-WA901ND console=ttyS0,115200
740 tlwa901v2_cmdline=board=TL-WA901ND-v2 console=ttyS0,115200
741 define Image/Build/Profile/TLWA901
742 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-wa901nd-v1,$(tlwa901_cmdline),TL-WA901NDv1)
743 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-wa901nd-v2,$(tlwa901v2_cmdline),TL-WA901NDv2)
744 endef
745
746 tlwr703_cmdline=board=TL-WR703N console=ttyATH0,115200
747 define Image/Build/Profile/TLWR703
748 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK-LZMA,tl-wr703n-v1,$(tlwr703_cmdline),TL-WR703Nv1)
749 endef
750
751 tlwr740_cmdline=board=TL-WR741ND console=ttyS0,115200
752 define Image/Build/Profile/TLWR740
753 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-wr740n-v1,$(tlwr740_cmdline),TL-WR740Nv1)
754 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-wr740n-v3,$(tlwr740_cmdline),TL-WR740Nv3)
755 endef
756
757 tlwr741_cmdline=board=TL-WR741ND console=ttyS0,115200
758 tlwr741v4_cmdline=board=TL-WR741ND-v4 console=ttyATH0,115200
759 define Image/Build/Profile/TLWR741
760 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-wr741nd-v1,$(tlwr741_cmdline),TL-WR741NDv1)
761 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK-LZMA,tl-wr741nd-v4,$(tlwr741v4_cmdline),TL-WR741NDv4)
762 endef
763
764 define Image/Build/Profile/TLWR743
765 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-wr743nd-v1,$(tlwr741_cmdline),TL-WR743NDv1)
766 endef
767
768 tlwr841v15_cmdline=board=TL-WR841N-v1.5 console=ttyS0,115200
769 tlwr841v3_cmdline=board=TL-WR941ND console=ttyS0,115200
770 tlwr841v5_cmdline=board=TL-WR741ND console=ttyS0,115200
771 define Image/Build/Profile/TLWR841
772 $(call Image/Build/Template/$(fs_squash)/$(1),TPLINKOLD,tl-wr841n-v1.5,$(tlwr841v15_cmdline),TL-WR841Nv1.5)
773 $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr841nd-v3,$(tlwr841v3_cmdline),TL-WR841NDv3)
774 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-wr841nd-v5,$(tlwr841v5_cmdline),TL-WR841NDv5)
775 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-wr841nd-v7,$(tlwr841v5_cmdline),TL-WR841NDv7)
776 endef
777
778 tlwr941v2_cmdline=board=TL-WR941ND console=ttyS0,115200
779 tlwr941v4_cmdline=board=TL-WR741ND console=ttyS0,115200
780 define Image/Build/Profile/TLWR941
781 $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr941nd-v2,$(tlwr941v2_cmdline),TL-WR941NDv2)
782 $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr941nd-v3,$(tlwr941v2_cmdline),TL-WR941NDv2)
783 $(call Image/Build/Template/$(fs_64k)/$(1),TPLINK,tl-wr941nd-v4,$(tlwr941v4_cmdline),TL-WR941NDv4)
784 endef
785
786 tlwr1043_cmdline=board=TL-WR1043ND console=ttyS0,115200
787 define Image/Build/Profile/TLWR1043
788 $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr1043nd-v1,$(tlwr1043_cmdline),TL-WR1043NDv1)
789 endef
790
791 wndr3700_cmdline=board=WNDR3700 console=ttyS0,115200
792 wndr3700_mtdlayout=mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,1024k(kernel),6656k(rootfs),64k(art)ro,7680k@0x70000(firmware)
793 wndr3700v2_mtdlayout=mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,1024k(kernel),14848k(rootfs),64k(art)ro,15872k@0x70000(firmware)
794 define Image/Build/Profile/WNDR3700
795 $(call Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3700,$(wndr3700_cmdline),$(wndr3700_mtdlayout),3700,WNDR3700,"" NA,)
796 $(call Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3700v2,$(wndr3700_cmdline),$(wndr3700v2_mtdlayout),3701,WNDR3700,"",-H 29763654+16+64)
797 $(call Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3800,$(wndr3700_cmdline),$(wndr3700v2_mtdlayout),3701,WNDR3700,"",-H 29763654+16+128)
798 endef
799
800 wr400n_cmdline=board=WRT400N console=ttyS0,115200
801 define Image/Build/Profile/WRT400N
802 $(call Image/Build/Template/$(fs_64k)/$(1),WRT400N,wrt400n,$(wr400n_cmdline))
803 endef
804
805 dir825b1_cmdline=board=DIR-825-B1 console=ttyS0,115200
806 define Image/Build/Profile/DIR825B1
807 $(call Image/Build/Template/$(fs_64k)/$(1),DIR825B1,dir-825-b1,$(dir825b1_cmdline))
808 endef
809
810 wrt160nl_cmdline=board=WRT160NL console=ttyS0,115200
811 define Image/Build/Profile/WRT160NL
812 $(call Image/Build/Template/$(fs_64k)/$(1),CyberTAN,wrt160nl,$(wrt160nl_cmdline),1.00.01)
813 endef
814
815 whrg301n_cmdline=board=WHR-G301N console=ttyS0,115200
816 define Image/Build/Profile/WHRG301N
817 $(call Image/Build/Template/$(fs_64k)/$(1),WHRHPG300N,whr-g301n,$(whrg301n_cmdline),whrhpg300n_mtdlayout,WHR-G301N)
818 endef
819
820 whrhpg300n_cmdline=board=WHR-HP-G300N console=ttyS0,115200
821 whrhpg300n_mtdlayout=mtdparts=spi0.0:248k(u-boot)ro,8k(u-boot-env)ro,896k(kernel),2816k(rootfs),64k(user_property),64k(art)ro,3712k@0x40000(firmware)
822 define Image/Build/Profile/WHRHPG300N
823 $(call Image/Build/Template/$(fs_64k)/$(1),WHRHPG300N,whr-hp-g300n,$(whrhpg300n_cmdline),whrhpg300n_mtdlayout,WHR-HP-G300N)
824 endef
825
826 whrhpgn_cmdline=board=WHR-HP-GN console=ttyS0,115200
827 define Image/Build/Profile/WHRHPGN
828 $(call Image/Build/Template/$(fs_64k)/$(1),WHRHPG300N,whr-hp-gn,$(whrhpgn_cmdline),whrhpg300n_mtdlayout,WHR-HP-GN)
829 endef
830
831 wzrhpg300nh_cmdline=board=WZR-HP-G300NH console=ttyS0,115200
832 define Image/Build/Profile/WZRHPG300NH
833 $(call Image/Build/Template/$(fs_128k)/$(1),WZRHPG30XNH,wzr-hp-g300nh,$(wzrhpg300nh_cmdline),WZR-HP-G300NH)
834 endef
835
836 wzrhpag300h_cmdline=board=WZR-HP-AG300H console=ttyS0,115200
837 define Image/Build/Profile/WZRHPAG300H
838 $(call Image/Build/Template/$(fs_128k)/$(1),WZRHPG30XNH,wzr-hp-ag300h,$(wzrhpag300h_cmdline),WZR-HP-AG300H)
839 endef
840
841 wzrhpg450h_cmdline=board=WZR-HP-G450H console=ttyS0,115200
842 define Image/Build/Profile/WZRHPG450H
843 $(call Image/Build/Template/$(fs_64k)/$(1),WZRHPG30XNH,wzr-hp-g450h,$(wzrhpg450h_cmdline),WZR-HP-AG450H)
844 endef
845
846 zcn1523h28_cmdline=board=ZCN-1523H-2 console=ttyS0,115200
847 define Image/Build/Profile/ZCN1523H28
848 $(call Image/Build/Template/$(fs_64k)/$(1),Zcomax,zcn-1523h-2-8,$(zcn1523h28_cmdline))
849 endef
850
851 zcn1523h516_cmdline=board=ZCN-1523H-5 console=ttyS0,115200
852 define Image/Build/Profile/ZCN1523H516
853 $(call Image/Build/Template/$(fs_64k)/$(1),Zcomax,zcn-1523h-5-16,$(zcn1523h516_cmdline))
854 endef
855
856 all0258n_cmdline=board=ALL0258N console=ttyS0,115200
857 define Image/Build/Profile/ALL0258N
858 $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,all0258n,$(all0258n_cmdline),,917504,5505024,KR)
859 endef
860
861 define Image/Build/Profile/Default
862 $(call Image/Build/Profile/ALL0258N,$(1))
863 $(call Image/Build/Profile/AP121,$(1))
864 $(call Image/Build/Profile/AP121MINI,$(1))
865 $(call Image/Build/Profile/AP81,$(1))
866 $(call Image/Build/Profile/AP83,$(1))
867 $(call Image/Build/Profile/A02RBW300N,$(1))
868 $(call Image/Build/Profile/DB120,$(1))
869 $(call Image/Build/Profile/DIR600A1,$(1))
870 $(call Image/Build/Profile/DIR615C1,$(1))
871 $(call Image/Build/Profile/DIR825B1,$(1))
872 $(call Image/Build/Profile/EAP7660D,$(1))
873 $(call Image/Build/Profile/FR54RTR,$(1))
874 $(call Image/Build/Profile/JA76PF,$(1))
875 $(call Image/Build/Profile/JWAP003,$(1))
876 $(call Image/Build/Profile/MZKW04NU,$(1))
877 $(call Image/Build/Profile/MZKW300NH,$(1))
878 $(call Image/Build/Profile/NBG_460N_550N_550NH,$(1))
879 $(call Image/Build/Profile/OM2P,$(1))
880 $(call Image/Build/Profile/PB42,$(1))
881 $(call Image/Build/Profile/PB44,$(1))
882 $(call Image/Build/Profile/PB92,$(1))
883 $(call Image/Build/Profile/TEW632BRP,$(1))
884 $(call Image/Build/Profile/TEW652BRP,$(1))
885 $(call Image/Build/Profile/TLMR3220,$(1))
886 $(call Image/Build/Profile/TLMR3420,$(1))
887 $(call Image/Build/Profile/TLWA901,$(1))
888 $(call Image/Build/Profile/TLWR703,$(1))
889 $(call Image/Build/Profile/TLWR740,$(1))
890 $(call Image/Build/Profile/TLWR741,$(1))
891 $(call Image/Build/Profile/TLWR743,$(1))
892 $(call Image/Build/Profile/TLWR841,$(1))
893 $(call Image/Build/Profile/TLWR941,$(1))
894 $(call Image/Build/Profile/TLWR1043,$(1))
895 $(call Image/Build/Profile/UBNT,$(1))
896 $(call Image/Build/Profile/WP543,$(1))
897 $(call Image/Build/Profile/WNDR3700,$(1))
898 $(call Image/Build/Profile/AP96,$(1))
899 $(call Image/Build/Profile/WRT400N,$(1))
900 $(call Image/Build/Profile/WRT160NL,$(1))
901 $(call Image/Build/Profile/WHRG301N,$(1))
902 $(call Image/Build/Profile/WHRHPG300N,$(1))
903 $(call Image/Build/Profile/WHRHPGN,$(1))
904 $(call Image/Build/Profile/WZRHPG300NH,$(1))
905 $(call Image/Build/Profile/WZRHPAG300H,$(1))
906 $(call Image/Build/Profile/WZRHPG450H,$(1))
907 $(call Image/Build/Profile/ZCN1523H28,$(1))
908 $(call Image/Build/Profile/ZCN1523H516,$(1))
909 endef
910
911 define Image/Build/Profile/Minimal
912 $(call Image/Build/Profile/Default,$(1))
913 endef
914
915 define Image/Build/Profile/Madwifi
916 $(call Image/Build/Profile/EAP7660D,$(1))
917 $(call Image/Build/Profile/UBNTRS,$(1))
918 $(call Image/Build/Profile/UBNTRSPRO,$(1))
919 $(call Image/Build/Profile/UBNTLSSR71,$(1))
920 $(call Image/Build/Profile/WP543,$(1))
921 endef
922
923 define Image/Build/squashfs
924 cp $(KDIR)/root.squashfs $(KDIR)/root.squashfs-4k
925 $(STAGING_DIR_HOST)/bin/padjffs2 $(KDIR)/root.squashfs-4k 4
926 cp $(KDIR)/root.squashfs-4k $(BIN_DIR)/$(IMG_PREFIX)-root.squashfs-4k
927 cp $(KDIR)/root.squashfs $(KDIR)/root.squashfs-64k
928 $(STAGING_DIR_HOST)/bin/padjffs2 $(KDIR)/root.squashfs-64k 4 8 64
929 cp $(KDIR)/root.squashfs-64k $(BIN_DIR)/$(IMG_PREFIX)-root.squashfs-64k
930 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
931 endef
932
933 define Image/Build/Initramfs
934 $(call Image/Build/Profile/$(PROFILE),initramfs)
935 endef
936
937 define Image/Build
938 $(call Image/Build/$(1))
939 dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
940 $(call Image/Build/Profile/$(PROFILE),$(1))
941 endef
942
943 $(eval $(call BuildImage))
This page took 0.082205 seconds and 5 git commands to generate.