2 # Copyright (C) 2008-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 JFFS2_BLOCKSIZE
= 64k
128k
256k
10 include $(TOPDIR
)/rules.mk
11 include $(INCLUDE_DIR
)/image.mk
13 IMAGE_PROFILE
:=$(if
$(PROFILE
),$(PROFILE
),Default
)
15 KERNEL_LOADADDR
= 0x80060000
17 DEVICE_VARS
+= NETGEAR_KERNEL_MAGIC NETGEAR_BOARD_ID NETGEAR_HW_ID CMDLINE CONSOLE IMAGE_SIZE BOARDNAME LOADER_FLASH_OFFS LOADER_TYPE
21 define Build
/netgear-squashfs
22 rm -rf
$@.fs
$@.squashfs
24 cp
$@
$@.fs
/image
/uImage
25 $(STAGING_DIR_HOST
)/bin
/mksquashfs-lzma \
27 -noappend
-root-owned
-be
-b
65536 \
28 $(if
$(SOURCE_DATE_EPOCH
),-fixed-time
$(SOURCE_DATE_EPOCH
))
30 dd if
=/dev
/zero bs
=1k count
=1 >> $@.squashfs
32 -A mips
-O linux
-T filesystem
-C none \
33 -M
$(NETGEAR_KERNEL_MAGIC
) \
34 -a
0xbf070000 -e
0xbf070000 \
35 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
37 rm -rf
$@.squashfs
$@.fs
40 define Build
/netgear-uImage
41 $(call Build
/uImage
,$(1) -M
$(NETGEAR_KERNEL_MAGIC
))
44 define Build
/loader-common
46 $(MAKE
) -C lzma-loader \
47 PKG_BUILD_DIR
="$@.src" \
48 TARGET_DIR
="$(dir $@)" LOADER_NAME
="$(notdir $@)" \
49 BOARD
="$(BOARDNAME)" \
50 LZMA_TEXT_START
=0x80a00000 LOADADDR
=0x80060000 \
51 $(1) compile loader.
$(LOADER_TYPE
)
52 mv
"$@.$(LOADER_TYPE)" "$@"
56 define Build
/loader-okli-compile
57 $(call Build
/loader-common
,FLASH_OFFS
=$(LOADER_FLASH_OFFS
) FLASH_MAX
=0 KERNEL_CMDLINE
="$(CMDLINE)")
60 define Build
/loader-kernel
61 $(call Build
/loader-common
,LOADER_DATA
="$@")
64 define Build
/loader-kernel-cmdline
65 $(call Build
/loader-common
,LOADER_DATA
="$@" KERNEL_CMDLINE
="$(CMDLINE)")
68 define Build
/loader-okli
69 dd if
=$(KDIR
)/loader-
$(1).gz bs
=7680 conv
=sync of
="$@.new"
74 define Build
/copy-file
78 # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
79 # UBNT_TYPE e.g. one of (BZ, XM, XW)
80 # UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
82 # mkubntimage is using the kernel image direct
83 # routerboard creates partitions out of the ubnt header
84 define Build
/mkubntimage
85 $(STAGING_DIR_HOST
)/bin
/mkfwimage \
86 -B
$(UBNT_BOARD
) -v
$(UBNT_TYPE
).
$(UBNT_CHIP
).v6.0
.0-OpenWrt-
$(REVISION
) \
92 # all UBNT XM device expect the kernel image to have 1024k while flash, when
93 # booting the image, the size doesn't matter.
94 define Build
/mkubntimage-split
95 dd if
=$@ of
=$@.old1 bs
=1024k count
=1
96 dd if
=$@ of
=$@.old2 bs
=1024k skip
=1
97 $(STAGING_DIR_HOST
)/bin
/mkfwimage \
98 -B
$(UBNT_BOARD
) -v
$(UBNT_TYPE
).
$(UBNT_CHIP
).v6.0
.0-OpenWrt-
$(REVISION
) \
105 define Build
/mkubntimage2
106 $(STAGING_DIR_HOST
)/bin
/mkfwimage2
-f
0x9f000000 \
107 -v
$(UBNT_TYPE
).
$(UBNT_CHIP
).v6.0
.0-OpenWrt-
$(REVISION
) \
108 -p jffs2
:0x50000:0xf60000:0:0:$@ \
113 DEVICE_VARS
+= UBNT_BOARD UBNT_CHIP UBNT_TYPE
115 define Device
/Default
117 DEVICE_PROFILE
= $$(BOARDNAME
)
118 PROFILES
= Default Minimal
$$(DEVICE_PROFILE
)
120 IMAGES
:= sysupgrade.bin
122 FILESYSTEMS
= $(filter-out jffs2-
%,$(TARGET_FILESYSTEMS
)) jffs2-
$$(BLOCKSIZE
)
123 CONSOLE
= ttyS0
,115200
124 CMDLINE
= $$(if
$$(BOARDNAME
),board
=$$(BOARDNAME
)) $$(if
$$(MTDPARTS
),mtdparts
=$$(MTDPARTS
)) $$(if
$$(CONSOLE
),console
=$$(CONSOLE
))
125 KERNEL
:= kernel-bin | patch-cmdline | lzma | uImage lzma
127 IMAGES
:= sysupgrade.bin
128 IMAGE
/sysupgrade.bin
= append-kernel
$$$$(BLOCKSIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
134 CONSOLE
= ttyATH0
,115200
135 MTDPARTS
= spi0.0
:128k
(u-boot
)ro
,64k
(u-boot-env
)ro
,16128k
(firmware
),64k
(art
)ro
137 TARGET_DEVICES
+= bsb
139 define Device
/carambola2
140 BOARDNAME
= CARAMBOLA2
142 CONSOLE
= ttyATH0
,115200
143 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,16000k
(firmware
),64k
(art
)ro
145 TARGET_DEVICES
+= carambola2
147 define Device
/cf-e316n-v2
148 BOARDNAME
= CF-E316N-V2
150 CONSOLE
= ttyS0
,115200
151 MTDPARTS
= spi0.0
:64k
(u-boot
)ro
,64k
(art
)ro
,16192k
(firmware
),64k
(nvram
)ro
153 TARGET_DEVICES
+= cf-e316n-v2
158 CONSOLE
= ttyATH0
,115200
159 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,16000k
(firmware
),64k
(art
)ro
161 TARGET_DEVICES
+= weio
163 define Device
/gl-ar150
166 CONSOLE
= ttyATH0
,115200
167 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,16000k
(firmware
),64k
(art
)ro
169 TARGET_DEVICES
+= gl-ar150
171 define Device
/gl-ar300
174 CONSOLE
= ttyS0
,115200
175 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,16000k
(firmware
),64k
(art
)ro
177 TARGET_DEVICES
+= gl-ar300
179 define Device
/gl-domino
182 CONSOLE
= ttyATH0
,115200
183 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,16000k
(firmware
),64k
(art
)ro
185 TARGET_DEVICES
+= gl-domino
187 define Device
/wndr3700
189 NETGEAR_KERNEL_MAGIC
= 0x33373030
190 NETGEAR_BOARD_ID
= WNDR3700
192 MTDPARTS
= spi0.0
:320k
(u-boot
)ro
,128k
(u-boot-env
)ro
,7680k
(firmware
),64k
(art
)ro
193 IMAGES
:= sysupgrade.bin factory.img factory-NA.img
194 KERNEL
:= kernel-bin | patch-cmdline | lzma
-d20 | netgear-uImage lzma
195 IMAGE
/default
= append-kernel
$$$$(BLOCKSIZE
) | netgear-squashfs | append-rootfs | pad-rootfs
196 IMAGE
/sysupgrade.bin
= $$(IMAGE
/default
) | check-size
$$$$(IMAGE_SIZE
)
197 IMAGE
/factory.img
= $$(IMAGE
/default
) | netgear-dni | check-size
$$$$(IMAGE_SIZE
)
198 IMAGE
/factory-NA.img
= $$(IMAGE
/default
) | netgear-dni NA | check-size
$$$$(IMAGE_SIZE
)
201 define Device
/wndr3700v2
203 NETGEAR_BOARD_ID
= WNDR3700v2
204 NETGEAR_KERNEL_MAGIC
= 0x33373031
205 NETGEAR_HW_ID
= 29763654+16+64
207 MTDPARTS
= spi0.0
:320k
(u-boot
)ro
,128k
(u-boot-env
)ro
,15872k
(firmware
),64k
(art
)ro
208 IMAGES
:= sysupgrade.bin factory.img
211 define Device
/wndr3800
213 NETGEAR_BOARD_ID
= WNDR3800
214 NETGEAR_HW_ID
= 29763654+16+128
217 define Device
/wndr3800ch
219 NETGEAR_BOARD_ID
= WNDR3800CH
222 define Device
/wndrmac
224 NETGEAR_BOARD_ID
= WNDRMAC
227 define Device
/wndrmacv2
229 NETGEAR_BOARD_ID
= WNDRMACv2
232 TARGET_DEVICES
+= wndr3700 wndr3700v2 wndr3800 wndr3800ch wndrmac wndrmacv2
236 DEVICE_PROFILE
:= CAP324
238 MTDPARTS
= spi0.0
:256k
(u-boot
),64k
(u-boot-env
)ro
,15296k
(firmware
),640k
(certs
),64k
(nvram
),64k
(art
)
241 TARGET_DEVICES
+= cap324
243 define Device
/cap324-nocloud
245 DEVICE_PROFILE
:= CAP324
247 MTDPARTS
= spi0.0
:256k
(u-boot
),64k
(u-boot-env
)ro
,16000k
(firmware
),64k
(art
)
250 TARGET_DEVICES
+= cap324-nocloud
254 DEVICE_PROFILE
:= CR3000
256 MTDPARTS
= spi0.0
:256k
(u-boot
),64k
(u-boot-env
)ro
,7104k
(firmware
),640k
(certs
),64k
(nvram
),64k
(art
)
259 TARGET_DEVICES
+= cr3000
261 define Device
/cr3000-nocloud
263 DEVICE_PROFILE
:= CR3000
265 MTDPARTS
= spi0.0
:256k
(u-boot
),64k
(u-boot-env
)ro
,7808k
(firmware
),64k
(art
)
268 TARGET_DEVICES
+= cr3000-nocloud
272 DEVICE_PROFILE
:= CR5000
274 MTDPARTS
= spi0.0
:256k
(u-boot
),64k
(u-boot-env
)ro
,7104k
(firmware
),640k
(certs
),64k
(nvram
),64k
(art
)
277 TARGET_DEVICES
+= cr5000
279 define Device
/cr5000-nocloud
281 DEVICE_PROFILE
:= CR5000
283 MTDPARTS
= spi0.0
:256k
(u-boot
),64k
(u-boot-env
)ro
,7808k
(firmware
),64k
(art
)
286 TARGET_DEVICES
+= cr5000-nocloud
288 define Device
/antminer-s1
289 $(Device
/tplink-8mlzma
)
290 BOARDNAME
:= ANTMINER-S1
291 DEVICE_PROFILE
:= ANTMINERS1
292 TPLINK_HWID
:= 0x04440101
293 CONSOLE
:= ttyATH0
,115200
296 define Device
/antminer-s3
297 $(Device
/tplink-8mlzma
)
298 BOARDNAME
:= ANTMINER-S3
299 DEVICE_PROFILE
:= ANTMINERS3
300 TPLINK_HWID
:= 0x04440301
301 CONSOLE
:= ttyATH0
,115200
304 define Device
/antrouter-r1
305 $(Device
/tplink-8mlzma
)
306 BOARDNAME
:= ANTROUTER-R1
307 DEVICE_PROFILE
:= ANTROUTERR1
308 TPLINK_HWID
:= 0x44440101
309 CONSOLE
:= ttyATH0
,115200
312 define Device
/el-m150
313 $(Device
/tplink-8mlzma
)
315 DEVICE_PROFILE
:= ELM150
316 TPLINK_HWID
:= 0x01500101
317 CONSOLE
:= ttyATH0
,115200
320 define Device
/el-mini
321 $(Device
/tplink-8mlzma
)
323 DEVICE_PROFILE
:= ELMINI
324 TPLINK_HWID
:= 0x01530001
325 CONSOLE
:= ttyATH0
,115200
327 TARGET_DEVICES
+= antminer-s1 antminer-s3 antrouter-r1 el-m150 el-mini
329 define Device
/gl-inet-6408A-v1
330 $(Device
/tplink-8mlzma
)
332 DEVICE_PROFILE
:= GLINET
333 TPLINK_HWID
:= 0x08000001
334 CONSOLE
:= ttyATH0
,115200
337 define Device
/gl-inet-6416A-v1
338 $(Device
/tplink-16mlzma
)
340 DEVICE_PROFILE
:= GLINET
341 TPLINK_HWID
:= 0x08000001
342 CONSOLE
:= ttyATH0
,115200
344 TARGET_DEVICES
+= gl-inet-6408A-v1 gl-inet-6416A-v1
346 define Device
/rnx-n360rt
348 BOARDNAME
:= TL-WR941ND
349 DEVICE_PROFILE
:= RNXN360RT
350 TPLINK_HWID
:= 0x09410002
351 TPLINK_HWREV
:= 0x00420001
353 TARGET_DEVICES
+= rnx-n360rt
355 define Device
/mc-mac1200r
356 $(Device
/tplink-8mlzma
)
357 BOARDNAME
:= MC-MAC1200R
358 DEVICE_PROFILE
:= MAC1200R
359 TPLINK_HWID
:= 0x12000001
361 TARGET_DEVICES
+= mc-mac1200r
363 define Device
/minibox-v1
364 $(Device
/tplink-16mlzma
)
365 BOARDNAME
:= MINIBOX-V1
366 DEVICE_PROFILE
:= MINIBOXV1
367 TPLINK_HWID
:= 0x3C000201
368 CONSOLE
:= ttyATH0
,115200
370 TARGET_DEVICES
+= minibox-v1
373 $(Device
/tplink-16mlzma
)
375 DEVICE_PROFILE
:= OMYG1
376 TPLINK_HWID
:= 0x06660101
380 $(Device
/tplink-8mlzma
)
382 DEVICE_PROFILE
:= OMYX1
383 TPLINK_HWID
:= 0x06660201
385 TARGET_DEVICES
+= omy-g1 omy-x1
387 define Device
/onion-omega
388 $(Device
/tplink-16mlzma
)
389 BOARDNAME
:= ONION-OMEGA
390 DEVICE_PROFILE
:= OMEGA
391 TPLINK_HWID
:= 0x04700001
392 CONSOLE
:= ttyATH0
,115200
394 TARGET_DEVICES
+= onion-omega
396 define Device
/smart-300
397 $(Device
/tplink-8mlzma
)
398 BOARDNAME
:= SMART-300
399 DEVICE_PROFILE
:= SMART-300
400 TPLINK_HWID
:= 0x93410001
402 TARGET_DEVICES
+= smart-300
404 define Device
/tellstick-znet-lite
405 $(Device
/tplink-16mlzma
)
406 BOARDNAME
:= TELLSTICK-ZNET-LITE
407 DEVICE_PROFILE
:= TELLSTICKZNETLITE
408 TPLINK_HWID
:= 0x00726001
409 CONSOLE
:= ttyATH0
,115200
411 TARGET_DEVICES
+= tellstick-znet-lite
414 $(Device
/tplink-16mlzma
)
415 BOARDNAME
:= GS-OOLITE
416 DEVICE_PROFILE
:= OOLITE
417 TPLINK_HWID
:= 0x3C000101
418 CONSOLE
:= ttyATH0
,115200
420 TARGET_DEVICES
+= oolite
422 # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
423 # UBNT_TYPE e.g. one of (BZ, XM, XW)
424 # UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
425 define Device
/ubnt-xm
426 DEVICE_PROFILE
:= UBNT
428 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7552k
(firmware
),256k
(cfg
)ro
,64k
(EEPROM
)ro
432 IMAGES
:= sysupgrade.bin factory.bin
433 IMAGE
/factory.bin
= $$(IMAGE
/sysupgrade.bin
) | mkubntimage-split
434 IMAGE
/sysupgrade.bin
= append-kernel
$$$$(BLOCKSIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
437 define Device
/ubnt-xw
438 DEVICE_PROFILE
:= UBNT
440 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7552k
(firmware
),256k
(cfg
)ro
,64k
(EEPROM
)ro
444 IMAGES
:= sysupgrade.bin factory.bin
445 IMAGE
/factory.bin
= $$(IMAGE
/sysupgrade.bin
) | mkubntimage-split
446 IMAGE
/sysupgrade.bin
= append-kernel
$$$$(BLOCKSIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
449 define Device
/ubnt-bz
450 DEVICE_PROFILE
:= UBNT
452 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7552k
(firmware
),256k
(cfg
)ro
,64k
(EEPROM
)ro
456 IMAGES
:= sysupgrade.bin factory.bin
457 IMAGE
/factory.bin
= $$(IMAGE
/sysupgrade.bin
) | mkubntimage-split
458 IMAGE
/sysupgrade.bin
= append-kernel
$$$$(BLOCKSIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
461 define Device
/ubnt-unifiac
462 DEVICE_PROFILE
:= UBNT
464 MTDPARTS
= spi0.0
:384k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7744k
(firmware
),7744k
(ubnt-airos
)ro
,128k
(bs
)ro
,256k
(cfg
)ro
,64k
(EEPROM
)ro
465 IMAGES
:= sysupgrade.bin
466 IMAGE
/sysupgrade.bin
= append-kernel
$$$$(BLOCKSIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
469 define Device
/rw2458n
474 define Device
/ubnt-airrouter
479 define Device
/ubnt-bullet-m
484 define Device
/ubnt-rocket-m
489 define Device
/ubnt-nano-m
493 TARGET_DEVICES
+= rw2458n ubnt-airrouter ubnt-bullet-m ubnt-rocket-m ubnt-nano-m
495 define Device
/ubnt-unifi
498 DEVICE_PROFILE
:= UBNT UBNTUNIFI
501 define Device
/ubnt-unifiac-lite
502 $(Device
/ubnt-unifiac
)
503 DEVICE_PROFILE
:= UBNT UBNTUNIFIACLITE
504 BOARDNAME
:= UBNT-UF-AC-LITE
507 define Device
/ubnt-unifiac-pro
508 $(Device
/ubnt-unifiac
)
509 DEVICE_PROFILE
:= UBNT UBNTUNIFIACPRO
510 BOARDNAME
:= UBNT-UF-AC-PRO
513 define Device
/ubnt-unifi-outdoor
515 BOARDNAME
:= UBNT-U20
516 DEVICE_PROFILE
:= UBNT UBNTUNIFIOUTDOOR
518 TARGET_DEVICES
+= ubnt-unifi ubnt-unifiac-lite ubnt-unifiac-pro ubnt-unifi-outdoor
520 define Device
/ubnt-nano-m-xw
522 BOARDNAME
:= UBNT-NM-XW
525 define Device
/ubnt-loco-m-xw
527 BOARDNAME
:= UBNT-LOCO-XW
530 define Device
/ubnt-rocket-m-xw
532 BOARDNAME
:= UBNT-RM-XW
535 define Device
/ubnt-rocket-m-ti
537 BOARDNAME
:= UBNT-RM-TI
541 TARGET_DEVICES
+= ubnt-nano-m-xw ubnt-loco-m-xw ubnt-rocket-m-xw ubnt-rocket-m-ti
543 define Device
/ubnt-air-gateway
545 BOARDNAME
:= UBNT-AGW
549 CONSOLE
= ttyATH0
,115200
551 TARGET_DEVICES
+= ubnt-air-gateway
553 define Device
/ubnt-air-gateway-pro
555 BOARDNAME
:= UBNT-AGWP
558 CONSOLE
= ttyS0
,115200
560 TARGET_DEVICES
+= ubnt-air-gateway-pro
562 define Device
/ubdev01
564 MTDPARTS
:= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7488k
(firmware
),64k
(certs
),256k
(cfg
)ro
,64k
(EEPROM
)ro
566 UBNT_BOARD
:= UBDEV01
571 TARGET_DEVICES
+= ubdev01
573 define Device
/ubnt-routerstation
575 IMAGES
:= sysupgrade.bin factory.bin
576 IMAGE
/factory.bin
= append-rootfs | pad-rootfs | mkubntimage
577 IMAGE
/sysupgrade.bin
= append-rootfs | pad-rootfs | combined-image | check-size
$$$$(IMAGE_SIZE
)
578 KERNEL
:= kernel-bin | patch-cmdline | lzma | pad-to
$$(BLOCKSIZE
)
581 define Device
/ubnt-rs
582 $(Device
/ubnt-routerstation
)
584 DEVICE_PROFILE
:= Madwifi UBNT UBNTRS
590 define Device
/ubnt-rspro
591 $(Device
/ubnt-routerstation
)
592 BOARDNAME
:= UBNT-RSPRO
593 DEVICE_PROFILE
:= Madwifi UBNT UBNTRSPRO
596 UBNT_CHIP
:= ar7100pro
599 define Device
/ubnt-ls-sr71
600 $(Device
/ubnt-routerstation
)
601 BOARDNAME
:= UBNT-LS-SR71
602 DEVICE_PROFILE
:= Madwifi UBNT
603 UBNT_BOARD
:= LS-SR71
608 TARGET_DEVICES
+= ubnt-rs ubnt-rspro ubnt-ls-sr71
610 define Device
/ubnt-uap-pro
613 MTDPARTS
:= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1536k
(kernel
),14208k
(rootfs
),256k
(cfg
)ro
,64k
(EEPROM
)ro
,15744k@
0x50000(firmware
)
617 DEVICE_PROFILE
:= UBNT UAPPRO
618 KERNEL
:= kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 kernel0
619 IMAGES
:= sysupgrade.bin factory.bin
620 IMAGE
/sysupgrade.bin
= append-kernel
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
621 IMAGE
/factory.bin
= $$(IMAGE
/sysupgrade.bin
) | mkubntimage2
624 define Device
/ubnt-unifi-outdoor-plus
625 $(Device
/ubnt-uap-pro
)
627 BOARDNAME
:= UBNT-UOP
628 DEVICE_PROFILE
:= UBNT
631 TARGET_DEVICES
+= ubnt-uap-pro ubnt-unifi-outdoor-plus
633 rootfs_type
=$(patsubst jffs2-
%,jffs2
,$(patsubst squashfs-
%,squashfs
,$(1)))
638 $(BIN_DIR
)/$(IMG_PREFIX
)-$(2)-$(call rootfs_type
,$(1))
642 $(patsubst %-256k
,0x40000,$(patsubst %-128k
,0x20000,$(patsubst %-64k
,0x10000,$(patsubst squashfs
%,0x4,$(patsubst root.
%,%,$(1))))))
646 $(call imgname
,$(1),$(2))-sysupgrade.bin
650 $(call imgname
,$(1),$(2))-factory.bin
656 $(if
$(1),board
=$(1) )$(if
$(2),console
=$(2)$(COMMA
)$(3))
660 $(shell sz
=`echo '$(2)' | sed -ne 's/.*[:$(COMMA)]\([0-9]*\)k[@]*[0-9a-zx]*($(1)).*/\1/p'`; [ -n
"$$sz" ] && echo
$$(($$sz * 1024)))
665 # $(1) : name of image build method to be used, e.g., AthLzma.
666 # $(2) : name of the build template to be used, e.g. 64k, 64kraw, 128k, etc.
667 # $(3) : name of the profile to be defined.
669 # $(5)~$(7) : arguments for $(mkcmdline)
670 # board=$(1) console=$(2),$(3)
671 # $(8)~$(14): extra arguments.
673 # $(1): action name, e.g. loader, buildkernel, squashfs, etc.
674 define Image
/Build
/Profile
/$(3)
675 $$(call Image
/Build
/Template
/$(2)/$$(1),$(1),$(4),$$(call mkcmdline
,$(5),$(6),$(7)),$(8),$(9),$(10),$(11),$(12),$(13),$(14))
677 SINGLE_PROFILES
+= $(3)
680 # $(1), name of the MultiProfile to be added.
681 # $(2), name of Profiles to be included in the MultiProfile.
683 define Image
/Build
/Profile
/$(1)
685 $$(call Image
/Build
/Profile
/$p,$$(1))
690 LOADER_MAKE
:= $(NO_TRACE_MAKE
) -C lzma-loader KDIR
=$(KDIR
)
692 VMLINUX
:=$(BIN_DIR
)/$(IMG_PREFIX
)-vmlinux
693 UIMAGE
:=$(BIN_DIR
)/$(IMG_PREFIX
)-uImage
697 # $(3): extra arguments for lzma.
699 $(STAGING_DIR_HOST
)/bin
/lzma e
$(1) -lc1
-lp2
-pb2
$(3) $(2)
703 cp
$(KDIR
)/vmlinux
$(3) $(KDIR_TMP
)/vmlinux
$(3)-$(1)
704 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(KDIR_TMP
)/vmlinux
$(3)-$(1) "$(strip $(2))"
707 define PatchKernel
/initramfs
708 $(call PatchKernel
,$(1),$(2),-initramfs
)
709 cp
$(KDIR_TMP
)/vmlinux-initramfs-
$(1) $(call imgname
,initramfs
,$(1)).bin
713 # $(2): kernel command line.
714 # $(3): extra argumetns for lzma.
715 # $(4): name suffix, e.g. "-initramfs".
716 define PatchKernelLzma
717 cp
$(KDIR
)/vmlinux
$(4) $(KDIR_TMP
)/vmlinux
$(4)-$(1)
718 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(KDIR_TMP
)/vmlinux
$(4)-$(1) "$(strip $(2))"
719 $(call CompressLzma
,$(KDIR_TMP
)/vmlinux
$(4)-$(1),$(KDIR_TMP
)/vmlinux
$(4)-$(1).bin.lzma
,$(3))
722 define PatchKernelGzip
723 cp
$(KDIR
)/vmlinux
$(3) $(KDIR_TMP
)/vmlinux
$(3)-$(1)
724 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(KDIR_TMP
)/vmlinux
$(3)-$(1) "$(strip $(2))"
725 gzip
-9n
-c
$(KDIR_TMP
)/vmlinux
$(3)-$(1) > $(KDIR_TMP
)/vmlinux
$(3)-$(1).bin.gz
728 ifneq ($(SUBTARGET
),mikrotik
)
729 # $(1): compression method of the data.
730 # $(2): extra arguments.
731 # $(3): input data file.
734 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C
$(1) $(2) \
735 -e
0x80060000 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
740 # $(2): kernel command line.
741 # $(3): extra arguments for lzma.
742 # $(4): name suffix, e.g. "-initramfs".
743 # $(5): extra arguments for mkimage.
745 $(call PatchKernelLzma
,$(1),$(2),$(3),$(4))
746 $(call MkuImage
,lzma
,$(5),$(KDIR_TMP
)/vmlinux
$(4)-$(1).bin.lzma
,$(KDIR_TMP
)/vmlinux
$(4)-$(1).uImage
)
749 define MkuImageLzma
/initramfs
750 $(call PatchKernelLzma
,$(1),$(2),$(3),-initramfs
)
751 $(call MkuImage
,lzma
,$(4),$(KDIR_TMP
)/vmlinux-initramfs-
$(1).bin.lzma
,$(call imgname
,initramfs
,$(1))-uImage.bin
)
755 $(call PatchKernelGzip
,$(1),$(2))
756 $(call MkuImage
,gzip
,,$(KDIR_TMP
)/vmlinux-
$(1).bin.gz
,$(KDIR_TMP
)/vmlinux-
$(1).uImage
)
759 define MkuImageGzip
/initramfs
760 $(call PatchKernelGzip
,$(1),$(2),-initramfs
)
761 $(call MkuImage
,gzip
,,$(KDIR_TMP
)/vmlinux-initramfs-
$(1).bin.gz
,$(call imgname
,initramfs
,$(1))-uImage.bin
)
765 $(call MkuImage
,lzma
,-M
0x4f4b4c49,$(KDIR
)/vmlinux.bin.lzma
,$(KDIR_TMP
)/vmlinux-
$(1).okli
)
769 # $(1): name of the 1st file.
770 # $(2): size limit of the 1st file if it is greater than 262144, or
771 # the erase size of the flash if it is greater than zero and less
773 # $(3): name of the 2nd file.
774 # $(4): size limit of the 2nd file if $(2) is greater than 262144, otherwise
775 # it is the size limit of the output file
776 # $(5): name of the output file.
777 # $(6): padding size.
779 if
[ $(2) -eq
0 ]; then \
780 filename
="$(3)"; fstype
=$$$${filename
##*\.}; \
781 case
"$$$${fstype}" in \
782 "jffs2-64k") bs
=65536;; \
783 "jffs2-128k") bs
=131072;; \
784 "jffs2-256k") bs
=262144;; \
785 *) bs
=`stat -c%s $(1)`;; \
787 ( dd if
=$(1) bs
=$$$${bs} conv
=sync
; cat
$(3) ) > $(5); \
788 if
[ -n
"$(6)" ]; then \
789 case
"$$$${fstype}" in \
791 padjffs2
$(5) $(6); \
795 if
[ `stat -c%s $(5)` -gt
$(4) ]; then \
796 echo
"Warning: $(5) is too big (> $(4) bytes)" >&2; \
799 else if
[ $(2) -gt
262144 ]; then \
800 if
[ `stat -c%s "$(1)"` -gt
$(2) ]; then \
801 echo
"Warning: $(1) is too big (> $(2) bytes)" >&2; \
802 else if
[ `stat -c%s $(3)` -gt
$(4) ]; then \
803 echo
"Warning: $(3) is too big (> $(4) bytes)" >&2; \
805 ( dd if
=$(1) bs
=$(2) conv
=sync
; dd if
=$(3) ) > $(5); \
808 ( dd if
=$(1) bs
=$(2) conv
=sync
; dd if
=$(3) ) > $(5); \
809 if
[ `stat -c%s $(5)` -gt
$(4) ]; then \
810 echo
"Warning: $(5) is too big (> $(4) bytes)" >&2; \
818 # $(3): kernel image size limit.
819 # $(4): rootfs image size limit.
820 # $(5): padding argument for padjffs2.
821 Sysupgrade
/KR
=$(call CatFiles
,$(2),$(3),$(KDIR
)/root.
$(1),$(4),$(call sysupname
,$(1),$(5)))
822 Sysupgrade
/KRuImage
=$(call CatFiles
,$(KDIR_TMP
)/vmlinux-
$(2).uImage
,$(3),$(KDIR
)/root.
$(1),$(4),$(call sysupname
,$(1),$(2)),$(5))
823 Sysupgrade
/RKuImage
=$(call CatFiles
,$(KDIR
)/root.
$(1),$(4),$(KDIR_TMP
)/vmlinux-
$(2).uImage
,$(3),$(call sysupname
,$(1),$(2)))
825 # $(1): ubinize ini file
826 # $(2): working directory
828 # $(4): physical erase block size
829 # $(5): minimum I/O unit size
830 # $(6): custom options
833 ( cd
$(2); $(STAGING_DIR_HOST
)/bin
/ubinize
-o
$(3) -p
$(4) -m
$(5) $(6) $(1))
837 # Embed lzma-compressed kernel inside lzma-loader.
839 # $(1), suffix of output filename, e.g. generic, lowercase board name, etc.
840 # $(2), suffix of target file to build, e.g. bin, gz, elf
841 # $(3), kernel command line to pass from lzma-loader to kernel
843 # $(5), suffix of kernel filename, e.g. -initramfs, or empty
844 define Image
/BuildLoader
845 -rm -rf
$(KDIR
)/lzma-loader
846 $(LOADER_MAKE
) LOADER
=loader-
$(1).
$(2) KERNEL_CMDLINE
="$(3)"\
847 LZMA_TEXT_START
=0x80a00000 LOADADDR
=0x80060000 \
848 LOADER_DATA
="$(KDIR)/vmlinux$(5).bin.lzma" BOARD
="$(1)" \
850 -$(CP
) $(KDIR
)/loader-
$(1).
$(2) $(KDIR
)/loader-
$(1)$(5).
$(2)
854 # Build lzma-loader alone which will search for lzma-compressed kernel identified by
855 # uImage header with magic "OKLI" at boot time.
857 # $(4), offset into the flash space to start searching uImage magic "OKLI".
858 # $(5), size of search range starting at $(4). With 0 as the value, uImage
859 # header is expected to be at precisely $(4)
860 define Image
/BuildLoaderAlone
861 -rm -rf
$(KDIR
)/lzma-loader
862 $(LOADER_MAKE
) LOADER
=loader-
$(1).
$(2) KERNEL_CMDLINE
="$(3)" \
863 LZMA_TEXT_START
=0x80a00000 LOADADDR
=0x80060000 \
864 BOARD
="$(1)" FLASH_OFFS
=$(4) FLASH_MAX
=$(5) \
872 alfa_ap120c_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,13312k
(rootfs
),1536k
(kernel
),1152k
(unknown
)ro
,64k
(art
)ro
;spi0.1
:-(unknown
)
873 alfa_ap96_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,256k
(u-boot-env
)ro
,13312k
(rootfs
),2048k
(kernel
),512k
(caldata
)ro
,15360k@
0x80000(firmware
)
874 alfa_mtdlayout_8M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,6144k
(rootfs
),1600k
(kernel
),64k
(nvram
),64k
(art
)ro
,7744k@
0x50000(firmware
)
875 alfa_mtdlayout_16M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,15936k
(firmware
),64k
(nvram
),64k
(art
)ro
876 all0258n_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
),64k
(u-boot-env
),6272k
(firmware
),1536k
(failsafe
),64k
(art
)
877 all0315n_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,256k
(u-boot-env
),13568k
(firmware
),2048k
(failsafe
),256k
(art
)ro
878 ap81_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,5120k
(rootfs
),2688k
(kernel
),64k
(art
)ro
,7808k@
0x50000(firmware
)
879 ap83_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,128k
(u-boot-env
)ro
,4096k
(rootfs
),3648k
(kernel
),64k
(art
)ro
,7744k@
0x60000(firmware
)
880 ap96_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(u-boot-env
)ro
,6144k
(rootfs
),1728k
(kernel
),64k
(art
)ro
,7872k@
0x40000(firmware
)
881 ap113_mtd_layout
=mtdparts
=spi0.0
:64k
(u-boot
),3008k
(rootfs
),896k
(uImage
),64k
(NVRAM
),64k
(ART
),3904k@
0x10000(firmware
)
882 ap121_mtdlayout_2M
=mtdparts
=spi0.0
:64k
(u-boot
)ro
,1216k
(rootfs
),704k
(kernel
),64k
(art
)ro
,1920k@
0x10000(firmware
)
883 ap121_mtdlayout_4M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,2448k
(rootfs
),1200k
(kernel
),64k
(nvram
),64k
(art
)ro
,3648k@
0x50000(firmware
)
884 ap121_mtdlayout_8M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,6144k
(rootfs
),1600k
(kernel
),64k
(nvram
),64k
(art
)ro
,7744k@
0x50000(firmware
)
885 ap121_mtdlayout_16M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,10944k
(rootfs
),4992k
(kernel
),64k
(nvram
),64k
(art
)ro
,15936k@
0x50000(firmware
)
886 ap132_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1408k
(kernel
),6400k
(rootfs
),64k
(art
),7808k@
0x50000(firmware
)
887 ap135_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,14528k
(rootfs
),1472k
(kernel
),64k
(art
)ro
,16000k@
0x50000(firmware
)
888 ap136_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,6336k
(rootfs
),1408k
(kernel
),64k
(mib0
),64k
(art
)ro
,7744k@
0x50000(firmware
)
889 ap143_mtdlayout_8M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,6336k
(rootfs
),1472k
(kernel
),64k
(art
)ro
,7744k@
0x50000(firmware
)
890 ap143_mtdlayout_16M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,14528k
(rootfs
),1472k
(kernel
),64k
(art
)ro
,16000k@
0x50000(firmware
)
891 ap147_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,14528k
(rootfs
),1472k
(kernel
),64k
(art
),16000k@
0x50000(firmware
)
892 ap152_mtdlayout_16M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,14528k
(rootfs
),1472k
(kernel
),64k
(art
)ro
,16000k@
0x50000(firmware
)
893 bxu2000n2_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1408k
(kernel
),8448k
(rootfs
),6016k
(user
),64k
(cfg
),64k
(oem
),64k
(art
)ro
894 cameo_ap81_mtdlayout
=mtdparts
=spi0.0
:128k
(u-boot
)ro
,64k
(config
)ro
,3840k
(firmware
),64k
(art
)ro
895 cameo_ap91_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(nvram
)ro
,3712k
(firmware
),64k
(mac
)ro
,64k
(art
)ro
896 cameo_ap99_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(nvram
)ro
,3520k
(firmware
),64k
(mac
)ro
,192k
(lp
)ro
,64k
(art
)ro
897 cameo_ap121_mtdlayout
=mtdparts
=spi0.0
:64k
(u-boot
)ro
,64k
(art
)ro
,64k
(mac
)ro
,64k
(nvram
)ro
,192k
(language
)ro
,3648k
(firmware
)
898 cameo_ap121_mtdlayout_8M
=mtdparts
=spi0.0
:64k
(u-boot
)ro
,64k
(art
)ro
,64k
(mac
)ro
,64k
(nvram
)ro
,256k
(language
)ro
,7680k@
0x80000(firmware
)
899 cameo_ap123_mtdlayout_4M
=mtdparts
=spi0.0
:64k
(u-boot
)ro
,64k
(nvram
)ro
,3712k
(firmware
),192k
(lang
)ro
,64k
(art
)ro
900 cameo_db120_mtdlayout
=mtdparts
=spi0.0
:64k
(uboot
)ro
,64k
(nvram
)ro
,15936k
(firmware
),192k
(lang
)ro
,64k
(mac
)ro
,64k
(art
)ro
901 cameo_db120_mtdlayout_8M
=mtdparts
=spi0.0
:64k
(uboot
)ro
,64k
(nvram
)ro
,7872k
(firmware
),128k
(lang
)ro
,64k
(art
)ro
902 cap4200ag_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
),64k
(u-boot-env
),320k
(custom
)ro
,1536k
(kernel
),12096k
(rootfs
),2048k
(failsafe
),64k
(art
),13632k@
0xa0000(firmware
)
903 eap300v2_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
),320k
(custom
),13632k
(firmware
),2048k
(failsafe
),64k
(art
)ro
904 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
)
905 dgl_5500_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(nvram
)ro
,15296k
(firmware
),192k
(lang
)ro
,512k
(my-dlink
)ro
,64k
(mac
)ro
,64k
(art
)ro
906 dlan_hotspot_mtdlayout
=mtdparts
=spi0.0
:128k
(u-boot
)ro
,64k
(Config1
)ro
,64k
(Config2
)ro
,7872k@
0x40000(firmware
),64k
(art
)ro
907 dlan_pro_500_wp_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,64k
(Config1
)ro
,64k
(Config2
)ro
,7680k@
0x70000(firmware
),64k
(art
)ro
908 dlan_pro_1200_ac_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,64k
(Config1
)ro
,64k
(Config2
)ro
,15872k@
0x70000(firmware
),64k
(art
)ro
909 cameo_ap94_mtdlayout
=mtdparts
=spi0.0
:256k
(uboot
)ro
,64k
(config
)ro
,6208k
(firmware
),64k
(caldata
)ro
,1600k
(unknown
)ro
,64k@
0x7f0000(caldata_copy
)
910 cameo_ap94_mtdlayout_fat
=mtdparts
=spi0.0
:256k
(uboot
)ro
,64k
(config
)ro
,7808k
(firmware
),64k
(caldata
)ro
,64k@
0x660000(caldata_orig
),6208k@
0x50000(firmware_orig
)
911 esr900_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1408k
(kernel
),13248k
(rootfs
),1024k
(manufacture
)ro
,64k
(backup
)ro
,320k
(storage
)ro
,64k
(caldata
)ro
,14656k@
0x40000(firmware
)
912 esr1750_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1408k
(kernel
),13248k
(rootfs
),1024k
(manufacture
)ro
,64k
(backup
)ro
,320k
(storage
)ro
,64k
(caldata
)ro
,14656k@
0x40000(firmware
)
913 epg5000_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1408k
(kernel
),13248k
(rootfs
),1024k
(manufacture
)ro
,64k
(backup
)ro
,320k
(storage
)ro
,64k
(caldata
)ro
,14656k@
0x40000(firmware
)
914 ew-dorin_mtdlayout_4M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
),3712k
(firmware
),64k
(art
)
915 ew-dorin_mtdlayout_16M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
),16000k
(firmware
),64k
(art
)ro
916 f9k1115v2_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
),14464k
(rootfs
),1408k
(kernel
),64k
(nvram
)ro
,64k
(envram
)ro
,64k
(art
)ro
,15872k@
0x50000(firmware
)
917 dlrtdev_mtdlayout
=mtdparts
=spi0.0
:256k
(uboot
)ro
,64k
(config
)ro
,6208k
(firmware
),64k
(caldata
)ro
,640k
(certs
),960k
(unknown
)ro
,64k@
0x7f0000(caldata_copy
)
918 dlrtdev_mtdlayout_fat
=mtdparts
=spi0.0
:256k
(uboot
)ro
,64k
(config
)ro
,7168k
(firmware
),640k
(certs
),64k
(caldata
)ro
,64k@
0x660000(caldata_orig
),6208k@
0x50000(firmware_orig
)
919 dragino2_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,16000k
(firmware
),64k
(config
)ro
,64k
(art
)ro
920 hiwifi_hc6361_mtdlayout
=mtdparts
=spi0.0
:64k
(u-boot
)ro
,64k
(bdinfo
)ro
,1280k
(kernel
),14848k
(rootfs
),64k
(backup
)ro
,64k
(art
)ro
,16128k@
0x20000(firmware
)
921 mr12_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,256k
(u-boot-env
)ro
,13440k
(rootfs
),2304k
(kernel
),128k
(art
)ro
,15744k@
0x80000(firmware
)
922 mr16_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,256k
(u-boot-env
)ro
,13440k
(rootfs
),2304k
(kernel
),128k
(art
)ro
,15744k@
0x80000(firmware
)
923 pb92_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,2752k
(rootfs
),896k
(kernel
),64k
(nvram
),64k
(art
)ro
,3648k@
0x50000(firmware
)
924 planex_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7744k
(firmware
),128k
(art
)ro
925 ubntxm_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7552k
(firmware
),256k
(cfg
)ro
,64k
(EEPROM
)ro
926 uap_pro_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1536k
(kernel
),14208k
(rootfs
),256k
(cfg
)ro
,64k
(EEPROM
)ro
,15744k@
0x50000(firmware
)
927 ubdev_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7488k
(firmware
),64k
(certs
),256k
(cfg
)ro
,64k
(EEPROM
)ro
928 whrhpg300n_mtdlayout
=mtdparts
=spi0.0
:248k
(u-boot
)ro
,8k
(u-boot-env
)ro
,3712k
(firmware
),64k
(art
)ro
929 wlr8100_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1408k
(kernel
),14080k
(rootfs
),192k
(unknown
)ro
,64k
(art
)ro
,384k
(unknown2
)ro
,15488k@
0x40000(firmware
)
930 wpj342_mtdlayout_16M
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,16128k
(firmware
),64k
(art
)ro
931 wpj344_mtdlayout_16M
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,16128k
(firmware
),64k
(art
)ro
932 dr344_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
)
933 wpj531_mtdlayout_16M
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,16128k
(firmware
),64k
(art
)ro
934 wpj558_mtdlayout_16M
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,16128k
(firmware
),64k
(art
)ro
935 wndap360_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1728k
(kernel
),6016k
(rootfs
),64k
(nvram
)ro
,64k
(art
)ro
,7744k@
0x50000(firmware
)
936 wnr2200_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7808k
(firmware
),64k
(art
)ro
937 wnr2000v3_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,3712k
(firmware
),64k
(art
)ro
938 wnr2000v4_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(u-boot-env
)ro
,3776k
(firmware
),64k
(art
)ro
939 r6100_mtdlayout
=mtdparts
=ar934x-nfc
:128k
(u-boot
)ro
,256k
(caldata
),256k
(caldata-backup
),512k
(config
),512k
(pot
),2048k
(kernel
),122240k
(ubi
),25600k@
0x1a0000(firmware
),2048k
(language
),3072k
(traffic_meter
)
940 tew823dru_mtdlayout
=mtdparts
=spi0.0
:192k
(u-boot
)ro
,64k
(nvram
)ro
,15296k
(firmware
),192k
(lang
)ro
,512k
(my-dlink
)ro
,64k
(mac
)ro
,64k
(art
)ro
941 wndr4300_mtdlayout
=mtdparts
=ar934x-nfc
:256k
(u-boot
)ro
,256k
(u-boot-env
)ro
,256k
(caldata
),512k
(pot
),2048k
(language
),512k
(config
),3072k
(traffic_meter
),2048k
(kernel
),23552k
(ubi
),25600k@
0x6c0000(firmware
),256k
(caldata_backup
),-(reserved
)
942 zcn1523h_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,6208k
(rootfs
),1472k
(kernel
),64k
(configure
)ro
,64k
(mfg
)ro
,64k
(art
)ro
,7680k@
0x50000(firmware
)
943 mynet_n600_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,64k
(devdata
)ro
,64k
(devconf
)ro
,15872k
(firmware
),64k
(radiocfg
)ro
944 mynet_rext_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,7808k
(firmware
),64k
(nvram
)ro
,64k
(ART
)ro
945 zyx_nbg6716_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(env
)ro
,64k
(RFdata
)ro
,-(nbu
);ar934x-nfc
:2048k
(zyxel_rfsd
),2048k
(romd
),1024k
(header
),2048k
(kernel
),-(ubi
)
946 qihoo_c301_mtdlayout
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
),64k
(devdata
),64k
(devconf
),15744k
(firmware
),64k
(warm_start
),64k
(action_image_config
),64k
(radiocfg
)ro
;spi0.1
:15360k
(upgrade2
),1024k
(privatedata
)
947 yun_mtdlayout_8M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,6464k
(rootfs
),1280k
(kernel
),64k
(nvram
),64k
(art
),7744k@
0x50000(firmware
)
948 yun_mtdlayout_16M
=mtdparts
=spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,14656k
(rootfs
),1280k
(kernel
),64k
(nvram
),64k
(art
),15936k@
0x50000(firmware
)
951 define Image
/BuildKernel
952 cp
$(KDIR
)/vmlinux.elf
$(VMLINUX
).elf
953 cp
$(KDIR
)/vmlinux
$(VMLINUX
).bin
954 dd if
=$(KDIR
)/vmlinux.bin.lzma of
=$(VMLINUX
).lzma bs
=65536 conv
=sync
955 dd if
=$(KDIR
)/vmlinux.bin.gz of
=$(VMLINUX
).gz bs
=65536 conv
=sync
956 $(call MkuImage
,gzip
,,$(KDIR
)/vmlinux.bin.gz
,$(UIMAGE
)-gzip.bin
)
957 $(call MkuImage
,lzma
,,$(KDIR
)/vmlinux.bin.lzma
,$(UIMAGE
)-lzma.bin
)
958 cp
$(KDIR
)/loader-generic.elf
$(VMLINUX
)-lzma.elf
959 -mkdir
-p
$(KDIR_TMP
)
960 $(call Image
/Build
/Profile
/$(IMAGE_PROFILE
),buildkernel
)
963 define Image
/BuildKernel
/Initramfs
964 cp
$(KDIR
)/vmlinux-initramfs.elf
$(VMLINUX
)-initramfs.elf
965 cp
$(KDIR
)/vmlinux-initramfs
$(VMLINUX
)-initramfs.bin
966 dd if
=$(KDIR
)/vmlinux-initramfs.bin.lzma of
=$(VMLINUX
)-initramfs.lzma bs
=65536 conv
=sync
967 dd if
=$(KDIR
)/vmlinux-initramfs.bin.gz of
=$(VMLINUX
)-initramfs.gz bs
=65536 conv
=sync
968 $(call MkuImage
,gzip
,,$(KDIR
)/vmlinux-initramfs.bin.gz
,$(UIMAGE
)-initramfs-gzip.bin
)
969 $(call MkuImage
,lzma
,,$(KDIR
)/vmlinux-initramfs.bin.lzma
,$(UIMAGE
)-initramfs-lzma.bin
)
970 cp
$(KDIR
)/loader-generic-initramfs.elf
$(VMLINUX
)-initramfs-lzma.elf
971 $(call Image
/Build
/Initramfs
)
974 Image
/Build
/WRT400N
/buildkernel
=$(call MkuImageLzma
,$(2),$(3))
976 define Image
/Build
/WRT400N
977 $(call Sysupgrade
/KRuImage
,$(1),$(2),1310720,6488064)
978 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
979 wrt400n
$(KDIR_TMP
)/vmlinux-
$(2).uImage
$(KDIR
)/root.
$(1) $(call factoryname
,$(1),$(2)); \
984 define Image
/Build
/CameoAP94
/buildkernel
985 $(call MkuImageLzma
,$(2),$(3) $(4))
986 $(call MkuImageLzma
,$(2)-fat
,$(3) $(5))
989 define Image
/Build
/CameoAP94
990 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(4)))
991 $(eval fwsize_fat
=$(call mtdpartsize
,firmware
,$(5)))
992 $(call Sysupgrade
/KRuImage
,$(1),$(2),0,$$$$(($(fwsize
)-4*64*1024)),64)
993 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
995 dd if
=$(call sysupname
,$(1),$(2)); \
997 ) > $(call imgname
,$(1),$(2))-backup-loader.bin
; \
998 if
[ `stat -c%s $(call sysupname,$(1),$(2))` -gt
4194304 ]; then \
999 echo
"Warning: $(call sysupname,$(1),$(2)) is too big" >&2; \
1002 dd if
=$(call sysupname
,$(1),$(2)) bs
=4096k conv
=sync
; \
1004 ) > $(call factoryname
,$(1),$(2)); \
1007 $(call CatFiles
,$(KDIR_TMP
)/vmlinux-
$(2)-fat.uImage
,0,$(KDIR
)/root.
$(1),$$$$(($(fwsize_fat
)-4*64*1024)),$(KDIR_TMP
)/$(2)-fat.bin
,64)
1008 if
[ -e
"$(KDIR_TMP)/$(2)-fat.bin" ]; then \
1009 echo
-n
"" > $(KDIR_TMP
)/$(2)-fat.dummy
; \
1010 sh
$(TOPDIR
)/scripts
/combined-image.sh \
1011 "$(KDIR_TMP)/$(2)-fat.bin" \
1012 "$(KDIR_TMP)/$(2)-fat.dummy" \
1013 $(call sysupname
,$(1),$(2)-fat
); \
1017 define Image
/Build
/WZRHP
1018 $(call Sysupgrade
/KRuImage
,$(1),$(2),0,$$$$(($(3)-4*$(4)*1024)),$(4))
1019 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1021 echo
-n
-e
"# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
1022 dd if
=$(call sysupname
,$(1),$(2)); \
1023 ) > $(call imgname
,$(1),$(2))-tftp.bin
; \
1024 buffalo-enc
-p
$(5) -v
1.99 \
1025 -i
$(call sysupname
,$(1),$(2)) \
1026 -o
$(KDIR_TMP
)/$(2).enc
; \
1027 buffalo-tag
-b
$(5) -p
$(5) -a ath
-v
1.99 -m
1.01 -l mlang8 \
1028 -w
3 -c
0x80041000 -d
0x801e8000 -f
1 -r M_ \
1029 -i
$(KDIR_TMP
)/$(2).enc \
1030 -o
$(call factoryname
,$(1),$(2)); \
1034 Image
/Build
/WZRHP64K
/buildkernel
=$(call MkuImageLzma
,$(2),$(3))
1035 Image
/Build
/WZRHP64K
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1036 Image
/Build
/WZRHP64K
=$(call Image
/Build
/WZRHP
,$(1),$(2),33095680,64,$(4))
1038 Image
/Build
/WZRHP128K
/buildkernel
=$(call MkuImageLzma
,$(2),$(3))
1039 Image
/Build
/WZRHP128K
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1040 Image
/Build
/WZRHP128K
=$(call Image
/Build
/WZRHP
,$(1),$(2),33030144,128,$(4))
1043 Image
/Build
/WHRHPG300N
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4))
1044 Image
/Build
/WHRHPG300N
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1046 define Image
/Build
/WHRHPG300N
1047 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(4)))
1048 $(call Sysupgrade
/KRuImage
,$(1),$(2),0,$$$$(($(fwsize
)-4*64*1024)),64)
1049 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1051 echo
-n
-e
"# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
1052 dd if
=$(call sysupname
,$(1),$(2)); \
1053 ) > $(call imgname
,$(1),$(2))-tftp.bin
; \
1054 buffalo-enc
-p
$(5) -v
1.99 \
1055 -i
$(call sysupname
,$(1),$(2)) \
1056 -o
$(KDIR_TMP
)/$(2).enc
; \
1057 buffalo-tag
-b
$(5) -p
$(5) -a ath
-v
1.99 -m
1.01 -l mlang8 \
1058 -w
3 -c
0x80041000 -d
0x801e8000 -f
1 -r M_ \
1059 -i
$(KDIR_TMP
)/$(2).enc \
1060 -o
$(call factoryname
,$(1),$(2)); \
1065 define Image
/Build
/Cameo
1066 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(4)))
1067 $(call Sysupgrade
/KRuImage
,$(1),$(2),0,$$$$(($(fwsize
)-4*64*1024)),64)
1068 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1069 factory_size
=$$$$(($(fwsize
) - $(6))); \
1071 dd if
=$(call sysupname
,$(1),$(2)) bs
=$$$${factory_size} conv
=sync
; \
1073 ) > $(call factoryname
,$(1),$(2)); \
1077 Image
/Build
/CameoAP81
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(cameo_ap81_mtdlayout
))
1078 Image
/Build
/CameoAP81
=$(call Image
/Build
/Cameo
,$(1),$(2),$(3),$(cameo_ap81_mtdlayout
),$(4),65536)
1079 Image
/Build
/CameoAP81
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(cameo_ap81_mtdlayout
))
1081 Image
/Build
/CameoAP91
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(cameo_ap91_mtdlayout
))
1082 Image
/Build
/CameoAP91
=$(call Image
/Build
/Cameo
,$(1),$(2),$(3),$(cameo_ap91_mtdlayout
),$(4),65536)
1083 Image
/Build
/CameoAP91
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(cameo_ap91_mtdlayout
))
1085 Image
/Build
/CameoAP99
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(cameo_ap99_mtdlayout
))
1086 Image
/Build
/CameoAP99
=$(call Image
/Build
/Cameo
,$(1),$(2),$(3),$(cameo_ap99_mtdlayout
),$(4),65536)
1087 Image
/Build
/CameoAP99
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(cameo_ap99_mtdlayout
))
1089 Image
/Build
/CameoAP123_4M
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(cameo_ap123_mtdlayout_4M
))
1090 Image
/Build
/CameoAP123_4M
=$(call Image
/Build
/Cameo
,$(1),$(2),$(3),$(cameo_ap123_mtdlayout_4M
),$(4),26)
1091 Image
/Build
/CameoAP123_4M
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(cameo_ap123_mtdlayout_4M
))
1093 Image
/Build
/CameoAP135
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4))
1094 Image
/Build
/CameoAP135
=$(call Image
/Build
/Cameo
,$(1),$(2),$(3),$(4),$(5),26)
1095 Image
/Build
/CameoAP135
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1097 Image
/Build
/CameoDB120
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(cameo_db120_mtdlayout
))
1098 Image
/Build
/CameoDB120
=$(call Image
/Build
/Cameo
,$(1),$(2),$(3),$(cameo_db120_mtdlayout
),$(4),26)
1099 Image
/Build
/CameoDB120
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(cameo_db120_mtdlayout
))
1101 Image
/Build
/CameoDB120_8M
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(cameo_db120_mtdlayout_8M
))
1102 Image
/Build
/CameoDB120_8M
=$(call Image
/Build
/Cameo
,$(1),$(2),$(3),$(cameo_db120_mtdlayout_8M
),$(4),26)
1103 Image
/Build
/CameoDB120_8M
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(cameo_db120_mtdlayout_8M
))
1105 define Image
/Build
/CameoHornet
1106 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(4)))
1107 $(call Sysupgrade
/KRuImage
,$(1),$(2),0,$$$$(($(fwsize
)-4*64*1024)),64)
1108 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1110 [ -n
"$$$$r" ] && dashr
="-$$$$r" || dashr
=; \
1111 [ -z
"$$$$r" ] && r
="DEF"; \
1112 mkcameofw
-M HORNET
-R
"$$$$r" -S
$(5) -V
$(6) -c \
1113 -K
$(8) -I
$(fwsize
) \
1114 -k
"$(call sysupname,$(1),$(2))" \
1115 -o
$(call imgname
,$(1),$(2))-factory
$$$$dashr.bin
; \
1121 Image
/Build
/CameoAP121
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(cameo_ap121_mtdlayout
))
1122 Image
/Build
/CameoAP121
=$(call Image
/Build
/CameoHornet
,$(1),$(2),$(3),$(cameo_ap121_mtdlayout
),$(4),$(5),$(6),0xe0000)
1123 Image
/Build
/CameoAP121
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(cameo_ap121_mtdlayout
))
1125 Image
/Build
/CameoAP121_8M
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(cameo_ap121_mtdlayout_8M
))
1126 Image
/Build
/CameoAP121_8M
=$(call Image
/Build
/CameoHornet
,$(1),$(2),$(3),$(cameo_ap121_mtdlayout_8M
),$(4),$(5),$(6),0x100000)
1127 Image
/Build
/CameoAP121_8M
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(cameo_ap121_mtdlayout_8M
))
1129 define Image
/Build
/dLAN
1130 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(4)))
1131 $(eval rootsize
=$(call mtdpartsize
,rootfs
,$(4)))
1132 $(eval kernsize
=$(call mtdpartsize
,kernel
,$(4)))
1133 $(call Sysupgrade
/$(5),$(1),$(2),$(if
$(6),$(6),$(kernsize
)),$(if
$(rootsize
),$(rootsize
),$(fwsize
)))
1134 if
[ -e
"$(call factoryname,$(1),$(2))" ]; then \
1135 dd if
=$(KDIR_TMP
)/vmlinux-
$(2).uImage \
1136 of
=$(call imgname
,kernel
,$(2)).bin bs
=64k conv
=sync
; \
1137 dd if
=$(KDIR
)/root.
$(1) \
1138 of
=$(call imgname
,$(1),$(2)-rootfs
).bin bs
=128k conv
=sync
; \
1142 Image
/Build
/dLANLzma
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4))
1143 Image
/Build
/dLANLzma
=$(call Image
/Build
/dLAN
,$(1),$(2),$(3),$(4),$(5),$(6),$(7))
1144 Image
/Build
/dLANLzma
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1146 define Image
/Build
/Ath
1147 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(4)))
1148 $(eval rootsize
=$(call mtdpartsize
,rootfs
,$(4)))
1149 $(eval kernsize
=$(call mtdpartsize
,kernel
,$(4)))
1150 $(call Sysupgrade
/$(5),$(1),$(2),$(if
$(6),$(6),$(kernsize
)),$(if
$(rootsize
),$(rootsize
),$(fwsize
)))
1151 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1152 dd if
=$(KDIR_TMP
)/vmlinux-
$(2).uImage \
1153 of
=$(call imgname
,kernel
,$(2)).bin bs
=64k conv
=sync
; \
1154 dd if
=$(KDIR
)/root.
$(1) \
1155 of
=$(call imgname
,$(1),$(2)-rootfs
).bin bs
=128k conv
=sync
; \
1159 Image
/Build
/AthGzip
/buildkernel
=$(call MkuImageGzip
,$(2),$(3) $(4))
1160 Image
/Build
/AthGzip
=$(call Image
/Build
/Ath
,$(1),$(2),$(3),$(4),$(5),$(6),$(7))
1161 Image
/Build
/AthGzip
/initramfs
=$(call MkuImageGzip
/initramfs
,$(2),$(3) $(4))
1163 Image
/Build
/AthLzma
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4))
1164 Image
/Build
/AthLzma
=$(call Image
/Build
/Ath
,$(1),$(2),$(3),$(4),$(5),$(6),$(7))
1165 Image
/Build
/AthLzma
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1168 Image
/Build
/Belkin
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4))
1169 Image
/Build
/Belkin
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1171 define Image
/Build
/Belkin
1172 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(4)))
1173 $(eval kernsize
=$(call mtdpartsize
,kernel
,$(4)))
1174 $(eval rootsize
=$(call mtdpartsize
,rootfs
,$(4)))
1175 $(call Sysupgrade
/RKuImage
,$(1),$(2),$(kernsize
),$(rootsize
))
1176 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1177 edimax_fw_header
-m
$(5) -v
"OpenWrt$(REVISION)" \
1179 -i
$(KDIR_TMP
)/vmlinux-
$(2).uImage \
1180 -o
$(KDIR_TMP
)/$(2)-uImage
; \
1181 edimax_fw_header
-m
$(5) -v
"OpenWrt$(REVISION)" \
1183 -i
$(KDIR
)/root.
$(1) \
1184 -o
$(KDIR_TMP
)/$(2)-rootfs
; \
1186 dd if
=$(KDIR_TMP
)/$(2)-rootfs
; \
1187 dd if
=$(KDIR_TMP
)/$(2)-uImage
; \
1188 ) > "$(call factoryname,$(1),$(2))"; \
1192 define Image
/Build
/EnGenius
1193 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(4)))
1194 $(eval rootsize
=$(call mtdpartsize
,rootfs
,$(4)))
1195 $(eval kernsize
=$(call mtdpartsize
,kernel
,$(4)))
1196 $(call Sysupgrade
/$(5),$(1),$(2),$(if
$(6),$(6),$(kernsize
)),$(if
$(rootsize
),$(rootsize
),$(fwsize
)))
1197 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1198 dd if
=$(KDIR_TMP
)/vmlinux-
$(2).uImage \
1199 of
=$(call imgname
,kernel
,$(2)).bin bs
=64k conv
=sync
; \
1200 dd if
=$(KDIR
)/root.
$(1) \
1201 of
=$(call imgname
,$(1),$(2)-rootfs
).bin bs
=128k conv
=sync
; \
1202 mksenaofw
-e
$(call sysupname
,$(1),$(2)) \
1203 -o
$(call imgname
,$(1),$(2))-factory.dlf \
1204 -r
0x101 -p
$(7) -t
2; \
1208 Image
/Build
/EnGenius
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4))
1209 Image
/Build
/EnGenius
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1212 define MkuImageHiWiFi
1213 # Field ih_name needs to start with "tw150v1"
1214 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C
$(1) $(2) \
1215 -e
0x80060000 -n
'tw150v1 MIPS OpenWrt Linux-$(LINUX_VERSION)' \
1219 define MkuImageLzmaHiWiFi
1220 $(call PatchKernelLzma
,$(1),$(2),$(3),$(4))
1221 $(call MkuImageHiWiFi
,lzma
,$(5),$(KDIR_TMP
)/vmlinux
$(4)-$(1).bin.lzma
,$(KDIR_TMP
)/vmlinux
$(4)-$(1).uImage
)
1224 Image
/Build
/HiWiFi
/buildkernel
=$(call MkuImageLzmaHiWiFi
,$(2),$(3) $(4))
1225 Image
/Build
/HiWiFi
=$(call Image
/Build
/Ath
,$(1),$(2),$(3),$(4),$(5),$(6),$(7))
1226 Image
/Build
/HiWiFi
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1228 Image
/Build
/PB4X
/buildkernel
=$(call PatchKernelLzma
,$(2),$(3))
1230 define Image
/Build
/PB4X
1231 dd if
=$(KDIR_TMP
)/vmlinux-
$(2).bin.lzma \
1232 of
=$(call imgname
,kernel
,$(2)).bin bs
=64k conv
=sync
1233 dd if
=$(KDIR
)/root.
$(1) \
1234 of
=$(call imgname
,$(1),$(2)-rootfs
).bin bs
=128k conv
=sync
1235 -sh
$(TOPDIR
)/scripts
/combined-image.sh \
1236 "$(call imgname,kernel,$(2)).bin" \
1237 "$(call imgname,$(1),$(2)-rootfs).bin" \
1238 $(call sysupname
,$(1),$(2))
1242 Image
/Build
/MyLoader
/buildkernel
=$(call PatchKernelLzma
,$(2),$(3))
1243 Image
/Build
/MyLoader
/initramfs
=$(call PatchKernel
/initramfs
,$(2),$(3))
1245 define Image
/Build
/MyLoader
1246 $(eval fwsize
=$(shell echo
$$(($(4)-0x30000-4*64*1024))))
1247 $(eval fwimage
=$(KDIR_TMP
)/$(2)-$(5)-firmware.bin
)
1248 $(call CatFiles
,$(KDIR_TMP
)/vmlinux-
$(2).bin.lzma
,65536,$(KDIR
)/root.
$(1),$(fwsize
),$(fwimage
))
1249 if
[ -e
"$(fwimage)" ]; then \
1250 $(STAGING_DIR_HOST
)/bin
/mkmylofw
-B
$(2) -s
$(4) -v \
1251 -p0x00030000
:0:al
:0x80060000:firmware
:$(fwimage
) \
1252 $(call imgname
,$(1),$(2))-$(5)-factory.img
; \
1253 echo
-n
"" > $(KDIR_TMP
)/empty.bin
; \
1254 sh
$(TOPDIR
)/scripts
/combined-image.sh \
1255 $(fwimage
) $(KDIR_TMP
)/empty.bin \
1256 $(call imgname
,$(1),$(2))-$(5)-sysupgrade.bin
; \
1260 Image
/Build
/Planex
/initramfs
=$(call MkuImageGzip
/initramfs
,$(2),$(3) $(planex_mtdlayout
))
1261 Image
/Build
/Planex
/loader
=$(call Image
/BuildLoaderAlone
,$(1),gz
,$(2) $(planex_mtdlayout
),0x52000,0)
1263 define Image
/Build
/Planex
/buildkernel
1264 [ -e
"$(KDIR)/loader-$(2).gz" ]
1265 $(call MkuImageOKLI
,$(2))
1267 dd if
=$(KDIR
)/loader-
$(2).gz bs
=8128 count
=1 conv
=sync
; \
1268 dd if
=$(KDIR_TMP
)/vmlinux-
$(2).okli
; \
1269 ) > $(KDIR_TMP
)/kernel-
$(2).bin
1270 $(call MkuImage
,gzip
,,$(KDIR_TMP
)/kernel-
$(2).bin
,$(KDIR_TMP
)/vmlinux-
$(2).uImage
)
1273 define Image
/Build
/Planex
1274 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(planex_mtdlayout
)))
1275 $(call Sysupgrade
/KRuImage
,$(1),$(2),0,$$$$(($(fwsize
)-4*64*1024)),64)
1276 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1277 $(STAGING_DIR_HOST
)/bin
/mkplanexfw \
1280 -i
$(call sysupname
,$(1),$(2)) \
1281 -o
$(call factoryname
,$(1),$(2)); \
1286 Image
/Build
/ALFA
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4))
1287 Image
/Build
/ALFA
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1289 define Image
/Build
/ALFA
1290 $(call Sysupgrade
/RKuImage
,$(1),$(2),$(5),$(6))
1291 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1292 rm -rf
$(KDIR
)/$(1); \
1293 mkdir
-p
$(KDIR
)/$(1); \
1295 cp
$(KDIR_TMP
)/vmlinux-
$(2).uImage
$(KDIR
)/$(1)/$(7); \
1296 cp
$(KDIR
)/root.
$(1) $(KDIR
)/$(1)/$(8); \
1297 $(TAR
) zcf
$(call factoryname
,$(1),$(2)) -C
$(KDIR
)/$(1) $(7) $(8); \
1299 echo WRM7222C | dd bs
=32 count
=1 conv
=sync
; \
1301 ) >> $(call factoryname
,$(1),$(2)); \
1306 Image
/Build
/Seama
/loader
=$(call Image
/BuildLoader
,$(1),bin
,$(2) $(3),0x80060000)
1308 define Image
/Build
/Seama
1309 [ -e
"$(KDIR)/loader-$(2).bin" ]
1310 $(call CompressLzma
,$(KDIR
)/loader-
$(2).bin
,$(KDIR_TMP
)/loader-
$(2).bin.lzma
)
1311 -rm -f
$(KDIR_TMP
)/image-
$(2).tmp
1312 $(call CatFiles
,$(KDIR_TMP
)/loader-
$(2).bin.lzma
,$$$$(($(6) - 64)),$(KDIR
)/root.
$(1),$(7),$(KDIR_TMP
)/image-
$(2).tmp
)
1313 [ -e
"$(KDIR_TMP)/image-$(2).tmp" ] && { \
1314 head
-c
-4 "$(KDIR_TMP)/image-$(2).tmp" > "$(KDIR_TMP)/image-$(2).no-jffs2mark.tmp"; \
1315 $(STAGING_DIR_HOST
)/bin
/seama \
1316 -i
$(KDIR_TMP
)/image-
$(2).no-jffs2mark.tmp \
1317 -m
"dev=/dev/mtdblock/1" -m
"type=firmware"; \
1318 $(STAGING_DIR_HOST
)/bin
/seama \
1319 -s
$(call imgname
,$(1),$(2))-factory.bin \
1320 -m
"signature=$(5)" \
1321 -i
$(KDIR_TMP
)/image-
$(2).no-jffs2mark.tmp.seama
; \
1322 tail
-c
4 "$(KDIR_TMP)/image-$(2).tmp" >> $(call imgname
,$(1),$(2))-factory.bin
; \
1324 cat
$(KDIR_TMP
)/loader-
$(2).bin.lzma
> $(KDIR_TMP
)/image-
$(2)-sysupgrade.tmp
1325 $(STAGING_DIR_HOST
)/bin
/seama \
1326 -i
$(KDIR_TMP
)/image-
$(2)-sysupgrade.tmp \
1327 -m
"dev=/dev/mtdblock/1" -m
"type=firmware"
1328 $(call CatFiles
,$(KDIR_TMP
)/image-
$(2)-sysupgrade.tmp.seama
,$(6),$(KDIR
)/root.
$(1),$(7),$(call sysupname
,$(1),$(2)))
1331 define Image
/Build
/Seama
/initramfs
1332 $(call PatchKernelLzma
,$(2),$(3) $(4),,-initramfs
)
1333 $(STAGING_DIR_HOST
)/bin
/seama \
1334 -i
$(KDIR_TMP
)/vmlinux-initramfs-
$(2).bin.lzma \
1335 -m
"dev=/dev/mtdblock/1" -m
"type=firmware"
1336 cat
$(KDIR_TMP
)/vmlinux-initramfs-
$(2).bin.lzma.seama
> $(call imgname
,initramfs
,$(2))-seama.bin
1339 Image
/Build
/Senao
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4))
1340 Image
/Build
/Senao
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1342 define Image
/Build
/Senao
1343 mkdir
-p
$(KDIR_TMP
)/$(2)/
1344 touch
$(KDIR_TMP
)/$(2)/FWINFO-OpenWrt-
$(REVISION
)-$(2)
1345 -$(CP
) .
/$(2)/* $(KDIR_TMP
)/$(2)/
1346 dd if
=$(KDIR_TMP
)/vmlinux-
$(2).uImage \
1347 of
=$(KDIR_TMP
)/$(2)/openwrt-senao-
$(2)-uImage-lzma.bin bs
=64k conv
=sync
1348 dd if
=$(KDIR
)/root.
$(1) \
1349 of
=$(KDIR_TMP
)/$(2)/openwrt-senao-
$(2)-root.
$(1) bs
=64k conv
=sync
1351 cd
$(KDIR_TMP
)/$(2)/; \
1352 $(TAR
) -cz
-f
$(call factoryname
,$(1),$(2)) * \
1354 -rm -rf
$(KDIR_TMP
)/$(2)/
1355 -sh
$(TOPDIR
)/scripts
/combined-image.sh \
1356 $(KDIR_TMP
)/vmlinux-
$(2).uImage \
1358 $(call sysupname
,$(1),$(2))
1361 define Image
/Build
/CyberTAN
1362 echo
-n
'' > $(KDIR_TMP
)/empty.bin
1363 $(STAGING_DIR_HOST
)/bin
/trx
-o
$(KDIR
)/image.tmp \
1364 -f
$(KDIR_TMP
)/vmlinux-
$(2).uImage
-F
$(KDIR_TMP
)/empty.bin \
1365 -x
32 -a
0x10000 -x
-32 -f
$(KDIR
)/root.
$(1)
1366 -$(STAGING_DIR_HOST
)/bin
/addpattern
-B
$(2) -v v
$(5) \
1367 -i
$(KDIR
)/image.tmp \
1368 -o
$(call sysupname
,$(1),$(2))
1369 $(STAGING_DIR_HOST
)/bin
/trx
-o
$(KDIR
)/image.tmp
-f
$(KDIR_TMP
)/vmlinux-
$(2).uImage \
1370 -x
32 -a
0x10000 -x
-32 -f
$(KDIR
)/root.
$(1)
1371 -$(STAGING_DIR_HOST
)/bin
/addpattern
-B
$(2) -v v
$(5) -g \
1372 -i
$(KDIR
)/image.tmp \
1373 -o
$(call factoryname
,$(1),$(2))
1374 rm $(KDIR
)/image.tmp
1377 Image
/Build
/CyberTANGZIP
/loader
=$(call Image
/BuildLoader
,$(1),gz
,$(2),0x80060000)
1378 Image
/Build
/CyberTANGZIP
/buildkernel
=$(call MkuImage
,gzip
,,$(KDIR
)/loader-
$(2).gz
,$(KDIR_TMP
)/vmlinux-
$(2).uImage
)
1379 Image
/Build
/CyberTANGZIP
=$(call Image
/Build
/CyberTAN
,$(1),$(2),$(3),$(4),$(5))
1381 Image
/Build
/CyberTANLZMA
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4))
1382 Image
/Build
/CyberTANLZMA
=$(call Image
/Build
/CyberTAN
,$(1),$(2),$(3),$(4),$(5))
1385 define Build
/MerakiNAND
1386 -$(STAGING_DIR_HOST
)/bin
/mkmerakifw \
1387 -B
$(BOARDNAME
) -s \
1393 Image
/Build
/Netgear
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4),,-M
$(5))
1395 define Image
/Build
/Netgear
/buildkernel
1396 $(call MkuImageLzma
,$(2),$(3) $(4),-d20
,,-M
$(5))
1397 -rm -rf
$(KDIR_TMP
)/$(2)
1398 mkdir
-p
$(KDIR_TMP
)/$(2)/image
1399 cat
$(KDIR_TMP
)/vmlinux-
$(2).uImage
> $(KDIR_TMP
)/$(2)/image
/uImage
1400 $(STAGING_DIR_HOST
)/bin
/mksquashfs-lzma \
1401 $(KDIR_TMP
)/$(2) $(KDIR_TMP
)/vmlinux-
$(2).uImage.squashfs.tmp1 \
1402 -noappend
-root-owned
-be
-b
65536 \
1403 $(if
$(SOURCE_DATE_EPOCH
),-fixed-time
$(SOURCE_DATE_EPOCH
))
1405 cat
$(KDIR_TMP
)/vmlinux-
$(2).uImage.squashfs.tmp1
; \
1406 dd if
=/dev
/zero bs
=1k count
=1 \
1407 ) > $(KDIR_TMP
)/vmlinux-
$(2).uImage.squashfs.tmp2
1408 mkimage
-A mips
-O linux
-T filesystem
-C none
-M
$(5) \
1409 -a
0xbf070000 -e
0xbf070000 \
1410 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
1411 -d
$(KDIR_TMP
)/vmlinux-
$(2).uImage.squashfs.tmp2 \
1412 $(KDIR_TMP
)/vmlinux-
$(2).uImage.squashfs
1415 define Image
/Build
/Netgear
1416 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(4)))
1417 $(call CatFiles
,$(KDIR_TMP
)/vmlinux-
$(2).uImage.squashfs
,0,$(KDIR
)/root.
$(1),$(fwsize
),$(call sysupname
,$(1),$(2)),64)
1418 if
[ -e
$(call sysupname
,$(1),$(2)) ]; then \
1419 for r in
$(7) ; do \
1420 [ -n
"$$$$r" ] && dashr
="-$$$$r" || dashr
= ; \
1421 $(STAGING_DIR_HOST
)/bin
/mkdniimg \
1422 -B
$(6) -v OpenWrt.
$(REVISION
) -r
"$$$$r" $(8) \
1423 -i
$(call sysupname
,$(1),$(2)) \
1424 -o
$(call imgname
,$(1),$(2))-factory
$$$$dashr.img
; \
1430 Image
/Build
/NetgearLzma
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4),,-M
$(5))
1431 Image
/Build
/NetgearLzma
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4),-d20
,,-M
$(5))
1433 define Image
/Build
/NetgearLzma
1434 $(eval fwsize
=$(call mtdpartsize
,firmware
,$(4)))
1435 $(call CatFiles
,$(KDIR_TMP
)/vmlinux-
$(2).uImage
,0,$(KDIR
)/root.
$(1),$(fwsize
),$(call sysupname
,$(1),$(2)),64)
1439 Image
/Build
/NetgearNAND
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4),,-M
$(5))
1442 # $(2): Board name (small caps)
1443 # $(3): Kernel board specific cmdline
1444 # $(4): Kernel mtdparts definition
1445 # $(5): U-Boot magic
1446 define Image
/Build
/NetgearNAND
/buildkernel
1447 $(eval kernelsize
=$(call mtdpartsize
,kernel
,$(4)))
1448 $(call PatchKernelLzma
,$(2),$(3) $(4),-d20
)
1449 dd if
=$(KDIR_TMP
)/vmlinux-
$(2).bin.lzma \
1450 of
=$(KDIR_TMP
)/vmlinux-
$(2).bin.tmp \
1451 bs
=$$$$(($(kernelsize
)-131072-2*64-1)) \
1453 $(call MkuImage
,lzma
,-M
$(5),$(KDIR_TMP
)/vmlinux-
$(2).bin.tmp
,$(KDIR_TMP
)/vmlinux-
$(2).uImage
)
1454 echo
-ne
'\xff' >> $(KDIR_TMP
)/vmlinux-
$(2).uImage
1455 # create a fake rootfs image
1456 dd if
=/dev
/zero of
=$(KDIR_TMP
)/fakeroot-
$(2) bs
=131072 count
=1
1457 mkimage
-A mips
-O linux
-T filesystem
-C none \
1458 -a
0xbf070000 -e
0xbf070000 \
1459 -n
'MIPS OpenWrt fakeroot' \
1460 -d
$(KDIR_TMP
)/fakeroot-
$(2) \
1462 $(KDIR_TMP
)/fakeroot-
$(2).uImage
1463 # append the fake rootfs image to the kernel, it will reside in the last
1464 # erase block of the kernel partition
1465 cat
$(KDIR_TMP
)/fakeroot-
$(2).uImage
>> $(KDIR_TMP
)/vmlinux-
$(2).uImage
1469 # $(1): rootfs image suffix
1470 # $(2): Board name (small caps)
1471 # $(3): Kernel board specific cmdline
1472 # $(4): Kernel mtdparts definition
1473 # $(5): U-Boot magic
1474 # $(6): Board name (upper caps)
1475 # $(7): firmware region code (not used yet)
1476 # $(8): DNI Hardware version
1477 # $(9): suffix of the configuration file for ubinize
1478 define Image
/Build
/NetgearNAND
1479 $(eval firmwaresize
=$(call mtdpartsize
,firmware
,$(4)))
1480 $(eval kernelsize
=$(call mtdpartsize
,kernel
,$(4)))
1481 $(eval imageraw
=$(KDIR_TMP
)/$(2)-raw.img
)
1482 $(CP
) $(KDIR
)/root.squashfs-raw
$(KDIR_TMP
)/root.squashfs
1483 echo
-ne
'\xde\xad\xc0\xde' > $(KDIR_TMP
)/jffs2.eof
1484 $(call ubinize
,ubinize-
$(9).ini
,$(KDIR_TMP
),$(KDIR_TMP
)/$(2)-root.ubi
,128KiB
,2048,-E
5)
1486 dd if
=$(KDIR_TMP
)/vmlinux-
$(2).uImage
; \
1487 dd if
=$(KDIR_TMP
)/$(2)-root.ubi \
1489 $(STAGING_DIR_HOST
)/bin
/mkdniimg \
1490 -B
$(6) -v OpenWrt.
$(REVISION
) -r
"$$$$r" $(8) \
1492 -o
$(call imgname
,ubi
,$(2))-factory.img
1494 $(call Image
/Build
/SysupgradeNAND
,$(2),squashfs
,$(KDIR_TMP
)/vmlinux-
$(2).uImage
)
1498 ifdef CONFIG_PACKAGE_uboot-ar71xx-nbg460n_550n_550nh
1499 Image
/Build
/ZyXEL
/buildkernel
=$(call MkuImageLzma
,$(2),$(3))
1501 define Image
/Build
/ZyXEL
1502 $(call Sysupgrade
/KRuImage
,$(1),$(2),917504,2752512)
1503 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1504 if
[ ! -f
$(BIN_DIR
)/$(IMG_PREFIX
)-$(2)-u-boot.bin
]; then \
1505 echo
"Warning: $(IMG_PREFIX)-$(2)-u-boot.bin not found" >&2; \
1507 $(STAGING_DIR_HOST
)/bin
/mkzynfw \
1509 -b
$(BIN_DIR
)/$(IMG_PREFIX
)-$(2)-u-boot.bin \
1510 -r
$(call sysupname
,$(1),$(2)):0x10000 \
1511 -o
$(call factoryname
,$(1),$(2)); \
1516 define Device
/NBG6616
1520 MTDPARTS
= spi0.0
:192k
(u-boot
)ro
,64k
(env
)ro
,64k
(RFdata
)ro
,384k
(zyxel_rfsd
),384k
(romd
),64k
(header
),2048k
(kernel
),13184k
(rootfs
),15232k@
0x120000(firmware
)
1522 IMAGES
:= sysupgrade.bin
1523 KERNEL
:= kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot
/vmlinux.lzma.uImage
1524 IMAGE
/sysupgrade.bin
= append-kernel
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
1525 # We cannot currently build a factory image. It is the sysupgrade image
1526 # prefixed with a header (which is actually written into the MTD device).
1527 # The header is 2kiB and is filled with 0xff. The format seems to be:
1529 # 2 bytes: checksum of the data partition (big endian)
1530 # 4 bytes: length of the contained image file (big endian)
1531 # 32 bytes: Firmware Version string (NUL terminated, 0xff padded)
1533 # 2 bytes: checksum over the header partition (big endian)
1534 # 32 bytes: Model (e.g. "NBG6616", NUL termiated, 0xff padded)
1535 # rest: 0xff padding
1537 # The checksums are calculated by adding up all bytes and if a 16bit
1538 # overflow occurs, one is added and the sum is masked to 16 bit:
1539 # csum = csum + databyte; if (csum > 0xffff) { csum += 1; csum &= 0xffff };
1540 # Should the file have an odd number of bytes then the byte len-0x800 is
1541 # used additionally.
1542 # The checksum for the header is calcualted over the first 2048 bytes with
1543 # the firmware checksum as the placeholder during calculation.
1545 # The header is padded with 0xff to the erase block size of the device.
1548 TARGET_DEVICES
+= NBG6616
1550 define Image
/Build
/ZyXELNAND
/buildkernel
1551 $(eval kernelsize
=$(call mtdpartsize
,kernel
,$(5)))
1552 $(call MkuImageLzma
,$(2),$(3) $(5) $(6))
1553 mkdir
-p
$(KDIR_TMP
)/$(2)/image
/boot
1554 cp
$(KDIR_TMP
)/vmlinux-
$(2).uImage
$(KDIR_TMP
)/$(2)/image
/boot
/vmlinux.lzma.uImage
1555 $(STAGING_DIR_HOST
)/bin
/mkfs.jffs2 \
1556 --pad
=$(kernelsize
) --big-endian
--squash-uids
-v
-e
128KiB \
1557 -o
$(KDIR_TMP
)/$(2)-kernel.jffs2 \
1558 -d
$(KDIR_TMP
)/$(2)/image \
1559 2>&1 1>/dev
/null | awk
'/^.+$$$$/'
1560 -rm -rf
$(KDIR_TMP
)/$(2)
1563 define Image
/Build
/ZyXELNAND
1564 if
[ "$(1)" != "squashfs" ]; then \
1565 echo Only squashfs is supported
; \
1568 $(eval firmwaresize
=$(call mtdpartsize
,firmware
,$(4)))
1569 $(eval kernelsize
=$(call mtdpartsize
,kernel
,$(4)))
1570 $(eval imageraw
=$(KDIR_TMP
)/$(2)-raw.img
)
1571 $(CP
) $(KDIR
)/root.
$(1) $(KDIR_TMP
)/ubi_root.img
1572 $(call ubinize
,ubinize-
$(2).ini
,$(KDIR_TMP
),$(KDIR_TMP
)/$(2)-root.ubi
,128KiB
,2048,-E
5)
1574 dd if
=$(KDIR_TMP
)/$(2)-kernel.jffs2
; \
1575 dd if
=$(KDIR_TMP
)/$(2)-root.ubi \
1577 dd if
=$(imageraw
) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-$(2)-$(1)-factory.bin \
1579 $(call Image
/Build
/SysupgradeNAND
,$(2),squashfs
,$(KDIR_TMP
)/$(2)-kernel.jffs2
)
1583 Image
/Build
/OpenMesh
/buildkernel
=$(call MkuImageLzma
,$(2))
1585 define Image
/Build
/OpenMesh
1586 -sh
$(TOPDIR
)/scripts
/om-fwupgradecfg-gen.sh \
1588 "$(BUILD_DIR)/fwupgrade.cfg-$(4)" \
1589 "$(KDIR_TMP)/vmlinux-$(2).uImage" \
1591 -sh
$(TOPDIR
)/scripts
/combined-ext-image.sh \
1592 "$(4)" "$(call factoryname,$(1),$(2))" \
1593 "$(BUILD_DIR)/fwupgrade.cfg-$(4)" "fwupgrade.cfg" \
1594 "$(KDIR_TMP)/vmlinux-$(2).uImage" "kernel" \
1595 "$(KDIR)/root.$(1)" "rootfs"
1599 Image
/Build
/Zcomax
/buildkernel
=$(call MkuImageLzma
,$(2),$(3) $(4))
1600 Image
/Build
/Zcomax
/initramfs
=$(call MkuImageLzma
/initramfs
,$(2),$(3) $(4))
1602 define Image
/Build
/Zcomax
1603 $(call Sysupgrade
/RKuImage
,$(1),$(2),1507328,6356992)
1604 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
1605 $(STAGING_DIR_HOST
)/bin
/mkzcfw \
1607 -k
$(KDIR_TMP
)/vmlinux-
$(2).uImage \
1608 -r
$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) \
1609 -o
$(call imgname
,$(1),$(2))-factory.img
; \
1614 # $(1): template name to be defined, etc. squashfs-only, 64k, 64kraw, etc.
1615 # $(2): jffs2 blocksize.
1616 define Jffs2Template
1617 define Image
/Build
/Template
/$(1)/jffs2-
$(2)
1618 $$(call Image
/Build
/$$(1),jffs2-
$(2),$$(2),$$(3),$$(4),$$(5),$$(6),$$(7),$$(8),$$(9),$$(10))
1622 # $(1): template name to be defined.
1623 # $(2): squashfs suffix to be used.
1624 # $(3): jffs2 suffix to be used.
1625 define BuildTemplate
1626 # $(1) : name of build method.
1627 # $(2) : board name.
1628 # $(3) : kernel command line.
1629 # $(4)~$(8): extra arguments.
1630 define Image
/Build
/Template
/$(1)/initramfs
1631 $$(call Image
/Build
/$$(1)/initramfs
,initramfs
,$$(2),$$(3),$$(4),$$(5),$$(6),$$(7),$$(8),$$(9),$$(10))
1633 define Image
/Build
/Template
/$(1)/loader
1634 $$(call Image
/Build
/$$(1)/loader
,$$(2),$$(3),$$(4),$$(5),$$(6),$$(7),$$(8),$$(9),$$(10))
1636 define Image
/Build
/Template
/$(1)/buildkernel
1637 $$(call Image
/Build
/$$(1)/buildkernel
,,$$(2),$$(3),$$(4),$$(5),$$(6),$$(7),$$(8),$$(9),$$(10))
1639 define Image
/Build
/Template
/$(1)/squashfs
1640 $$(call Image
/Build
/$$(1),squashfs
$(2),$$(2),$$(3),$$(4),$$(5),$$(6),$$(7),$$(8),$$(9),$$(10))
1642 $(if
$(3),$(foreach bs
,$(3),$(eval
$(call Jffs2Template
,$(1),$(bs
)))))
1645 $(eval
$(call BuildTemplate
,squashfs-only
))
1646 $(eval
$(call BuildTemplate
,64k
,-64k
,64k
))
1647 $(eval
$(call BuildTemplate
,64kraw
,-raw
,64k
))
1648 $(eval
$(call BuildTemplate
,64kraw-nojffs
,-raw
))
1649 $(eval
$(call BuildTemplate
,128k
,,128k
))
1650 $(eval
$(call BuildTemplate
,128kraw
,-raw
,128k
))
1651 $(eval
$(call BuildTemplate
,256k
,,256k
))
1652 $(eval
$(call BuildTemplate
,all,,64k
128k
256k
))
1654 ifeq ($(SUBTARGET
),generic
)
1659 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,128k
(u-boot-env
)ro
,2048k
(kernel
),13824k
(rootfs
),13824k
(opt
)ro
,2624k
(failsafe
)ro
,64k
(art
)ro
,15872k@
0x60000(firmware
)
1660 IMAGE
/sysupgrade.bin
= append-kernel
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
1663 TARGET_DEVICES
+= c-55
1665 $(eval
$(call SingleProfile
,ALFA
,64k
,ALFANX
,alfa-nx
,ALFA-NX
,ttyS0
,115200,$$(alfa_mtdlayout_8M
),1638400,6291456,vmlinux.gz.uImage
,pb9x-2.6
.31-jffs2
))
1666 $(eval
$(call SingleProfile
,ALFA
,64k
,HORNETUB
,hornet-ub
,HORNET-UB
,ttyATH0
,115200,$$(alfa_mtdlayout_8M
),1638400,6291456,kernel_image
,rootfs_image
))
1667 $(eval
$(call SingleProfile
,ALFA
,64k
,TUBE2H8M
,tube2h-8M
,TUBE2H
,ttyATH0
,115200,$$(alfa_mtdlayout_8M
),1638400,6291456,kernel.image
,rootfs.image
))
1669 $(eval
$(call SingleProfile
,AthGzip
,64k
,AP81
,ap81
,AP81
,ttyS0
,115200,$$(ap81_mtdlayout
),RKuImage
))
1670 $(eval
$(call SingleProfile
,AthGzip
,64k
,AP83
,ap83
,AP83
,ttyS0
,115200,$$(ap83_mtdlayout
),RKuImage
))
1671 $(eval
$(call SingleProfile
,AthGzip
,64k
,AP96
,ap96
,AP96
,ttyS0
,115200,$$(ap96_mtdlayout
),RKuImage
))
1672 $(eval
$(call SingleProfile
,AthGzip
,64k
,WNDAP360
,wndap360
,WNDAP360
,ttyS0
,9600,$$(wndap360_mtdlayout
),KRuImage
))
1674 $(eval
$(call SingleProfile
,AthLzma
,64k
,ALFAAP120C
,alfa-ap120c
,ALFA-AP120C
,ttyS0
,115200,$$(alfa_ap120c_mtdlayout
),RKuImage
))
1675 $(eval
$(call SingleProfile
,AthLzma
,64k
,ALFAAP96
,alfa-ap96
,ALFA-AP96
,ttyS0
,115200,$$(alfa_ap96_mtdlayout
),RKuImage
))
1676 $(eval
$(call SingleProfile
,AthLzma
,64k
,ALL0258N
,all0258n
,ALL0258N
,ttyS0
,115200,$$(all0258n_mtdlayout
),KRuImage
,65536))
1677 $(eval
$(call SingleProfile
,AthLzma
,256k
,ALL0315N
,all0315n
,ALL0315N
,ttyS0
,115200,$$(all0315n_mtdlayout
),KRuImage
,262144))
1678 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP113
,ap113
,AP113
,ttyS0
,115200,$$(ap113_mtd_layout
),RK
))
1679 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP121_2M
,ap121-2M
,AP121
,ttyATH0
,115200,$$(ap121_mtdlayout_2M
),RKuImage
))
1680 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP121_4M
,ap121-4M
,AP121
,ttyATH0
,115200,$$(ap121_mtdlayout_4M
),RKuImage
))
1681 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP121_8M
,ap121-8M
,AP121
,ttyATH0
,115200,$$(ap121_mtdlayout_8M
),RKuImage
))
1682 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP121_16M
,ap121-16M
,AP121
,ttyATH0
,115200,$$(ap121_mtdlayout_16M
),RKuImage
))
1683 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP121MINI
,ap121-mini
,AP121-MINI
,ttyATH0
,115200,$$(ap121_mtdlayout_4M
),RKuImage
))
1684 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP132
,ap132
,AP132
,ttyS0
,115200,$$(ap132_mtdlayout
),KRuImage
))
1685 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP135
,ap135-020
,AP135-020
,ttyS0
,115200,$$(ap135_mtdlayout
),RKuImage
))
1686 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP136_010
,ap136-010
,AP136-010
,ttyS0
,115200,$$(ap136_mtdlayout
),RKuImage
))
1687 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP136_020
,ap136-020
,AP136-020
,ttyS0
,115200,$$(ap136_mtdlayout
),RKuImage
))
1688 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP143_8M
,ap143-8M
,AP143
,ttyS0
,115200,$$(ap143_mtdlayout_8M
),RKuImage
))
1689 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP143_16M
,ap143-16M
,AP143
,ttyS0
,115200,$$(ap143_mtdlayout_16M
),RKuImage
))
1690 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP147_010
,ap147-010
,AP147-010
,ttyS0
,115200,$$(ap147_mtdlayout
),RKuImage
))
1691 $(eval
$(call SingleProfile
,AthLzma
,64k
,AP152_16M
,ap152-16M
,AP152
,ttyS0
,115200,$$(ap152_mtdlayout_16M
),RKuImage
))
1692 $(eval
$(call SingleProfile
,AthLzma
,64k
,BXU2000N2
,bxu2000n-2-a1
,BXU2000n-2-A1
,ttyS0
,115200,$$(bxu2000n2_mtdlayout
),RKuImage
))
1693 $(eval
$(call SingleProfile
,AthLzma
,64k
,CAP4200AG
,cap4200ag
,CAP4200AG
,ttyS0
,115200,$$(cap4200ag_mtdlayout
),KRuImage
))
1694 $(eval
$(call SingleProfile
,AthLzma
,64k
,DB120
,db120
,DB120
,ttyS0
,115200,$$(db120_mtdlayout
),RKuImage
))
1695 $(eval
$(call SingleProfile
,AthLzma
,64k
,DRAGINO2
,dragino2
,DRAGINO2
,ttyATH0
,115200,$$(dragino2_mtdlayout
),KRuImage
,65536))
1696 $(eval
$(call SingleProfile
,AthLzma
,64k
,EWDORINAP
,ew-dorin
,EW-DORIN
,ttyATH0
,115200,$$(ew-dorin_mtdlayout_4M
),KRuImage
,65536))
1697 $(eval
$(call SingleProfile
,AthLzma
,64k
,EWDORINRT
,ew-dorin-router
,EW-DORIN-ROUTER
,ttyATH0
,115200,$$(ew-dorin_mtdlayout_4M
),KRuImage
,65536))
1698 $(eval
$(call SingleProfile
,AthLzma
,64k
,EWDORIN16M
,ew-dorin-16M
,EW-DORIN
,ttyATH0
,115200,$$(ew-dorin_mtdlayout_16M
),KRuImage
,65536))
1699 $(eval
$(call SingleProfile
,AthLzma
,64k
,HORNETUBx2
,hornet-ub-x2
,HORNET-UB
,ttyATH0
,115200,$$(alfa_mtdlayout_16M
),KRuImage
,65536))
1700 $(eval
$(call SingleProfile
,AthLzma
,64k
,MR12
,mr12
,MR12
,ttyS0
,115200,$$(mr12_mtdlayout
),RKuImage
))
1701 $(eval
$(call SingleProfile
,AthLzma
,64k
,MR16
,mr16
,MR16
,ttyS0
,115200,$$(mr16_mtdlayout
),RKuImage
))
1702 $(eval
$(call SingleProfile
,AthLzma
,64k
,PB92
,pb92
,PB92
,ttyS0
,115200,$$(pb92_mtdlayout
),KRuImage
))
1703 $(eval
$(call SingleProfile
,AthLzma
,64k
,TUBE2H16M
,tube2h-16M
,TUBE2H
,ttyATH0
,115200,$$(alfa_mtdlayout_16M
),KRuImage
,65536))
1704 $(eval
$(call SingleProfile
,AthLzma
,64k
,WLR8100
,wlr8100
,WLR8100
,ttyS0
,115200,$$(wlr8100_mtdlayout
),KRuImage
))
1705 $(eval
$(call SingleProfile
,AthLzma
,64k
,WPJ342_16M
,wpj342-16M
,WPJ342
,ttyS0
,115200,$$(wpj342_mtdlayout_16M
),KRuImage
,65536))
1706 $(eval
$(call SingleProfile
,AthLzma
,64k
,WPJ344_16M
,wpj344-16M
,WPJ344
,ttyS0
,115200,$$(wpj344_mtdlayout_16M
),KRuImage
,65536))
1707 $(eval
$(call SingleProfile
,AthLzma
,64k
,DR344
,dr344
,DR344
,ttyS0
,115200,$$(dr344_mtdlayout
),RKuImage
))
1708 $(eval
$(call SingleProfile
,AthLzma
,64k
,WPJ531_16M
,wpj531-16M
,WPJ531
,ttyS0
,115200,$$(wpj531_mtdlayout_16M
),KRuImage
,65536))
1709 $(eval
$(call SingleProfile
,AthLzma
,64k
,WPJ558_16M
,wpj558-16M
,WPJ558
,ttyS0
,115200,$$(wpj558_mtdlayout_16M
),KRuImage
,65536))
1710 $(eval
$(call SingleProfile
,AthLzma
,64k
,YUN_8M
,yun-8M
,Yun
,ttyATH0
,250000,$$(yun_mtdlayout_8M
),RKuImage
))
1711 $(eval
$(call SingleProfile
,AthLzma
,64k
,YUN_16M
,yun-16M
,Yun
,ttyATH0
,250000,$$(yun_mtdlayout_16M
),RKuImage
))
1713 $(eval
$(call SingleProfile
,Belkin
,64k
,F9K1115V2
,f9k1115v2
,F9K1115V2
,ttyS0
,115200,$$(f9k1115v2_mtdlayout
),BR-6679BAC
))
1715 $(eval
$(call SingleProfile
,CameoAP91
,64kraw
,DIR600A1
,dir-600-a1
,DIR-600-A1
,ttyS0
,115200,"AP91-AR7240-RT-090223-00"))
1716 $(eval
$(call SingleProfile
,CameoAP91
,64kraw
,DIR601A1
,dir-601-a1
,DIR-600-A1
,ttyS0
,115200,"AP91-AR7240-RT-090223-02"))
1717 $(eval
$(call SingleProfile
,CameoAP91
,64kraw
,FR54RTR
,fr-54rtr
,DIR-600-A1
,ttyS0
,115200,"AP91-AR7240-RT-090223-01"))
1719 $(eval
$(call SingleProfile
,CameoAP99
,64kraw
,DIR615E1
,dir-615-e1
,DIR-615-E1
,ttyS0
,115200,"AP93-AR7240-RT-081028-00"))
1720 $(eval
$(call SingleProfile
,CameoAP99
,64kraw
,DIR615E4
,dir-615-e4
,DIR-615-E4
,ttyS0
,115200,"AP99-AR7240-RT-091105-05"))
1722 $(eval
$(call SingleProfile
,CameoAP123_4M
,64kraw
,DIR615I1
,dir-615-i1
,DIR-615-I1
,ttyS0
,115200,"00DB120AR9341-RT-1012I1-00"))
1723 $(eval
$(call SingleProfile
,CameoAP123_4M
,64kraw
,DIR615I3
,dir-615-i3
,DIR-615-I1
,ttyS0
,115200,"00DB120AR9341-RT-101214-00"))
1725 $(eval
$(call SingleProfile
,CameoAP81
,64kraw-nojffs
,A02RBW300N
,a02-rb-w300n
,TEW-632BRP
,ttyS0
,115200,"AP81-AR9130-RT-070614-03"))
1726 $(eval
$(call SingleProfile
,CameoAP81
,64kraw-nojffs
,DIR615C1
,dir-615-c1
,DIR-615-C1
,ttyS0
,115200,"AP81-AR9130-RT-070614-02"))
1727 $(eval
$(call SingleProfile
,CameoAP81
,64kraw-nojffs
,TEW632BRP
,tew-632brp
,TEW-632BRP
,ttyS0
,115200,"AP81-AR9130-RT-070614-00"))
1728 $(eval
$(call SingleProfile
,CameoAP81
,64kraw-nojffs
,TEW652BRP_FW
,tew-652brp
,TEW-632BRP
,ttyS0
,115200,"AP81-AR9130-RT-080609-05"))
1729 $(eval
$(call SingleProfile
,CameoAP81
,64kraw-nojffs
,TEW652BRP_RECOVERY
,tew-652brp-recovery
,TEW-632BRP
,ttyS0
,115200,"AP81-AR9130-RT-070614-02"))
1731 $(eval
$(call SingleProfile
,CameoAP121
,64kraw-nojffs
,TEW712BR
,tew-712br
,TEW-712BR
,ttyATH0
,115200,"HORNET-RT-TEW712BR-3",1.99,""))
1732 $(eval
$(call SingleProfile
,CameoAP121
,64kraw-nojffs
,DIR601B1
,dir-601-b1
,TEW-712BR
,ttyATH0
,115200,"HORNET-RT-DIR601B1-3",2.99.99,"" "NA"))
1733 $(eval
$(call SingleProfile
,CameoAP121_8M
,64kraw-nojffs
,DIR505A1
,dir-505-a1
,DIR-505-A1
,ttyATH0
,115200,"HORNET-PACKET-DIR505A1-3",1.99.99,""))
1735 $(eval
$(call SingleProfile
,CameoAP135
,64kraw
,DGL5500A1
,dgl-5500-a1
,DGL-5500-A1
,ttyS0
,115200,$$(dgl_5500_mtdlayout
),"00AP135AR9558-RT-130508-00"))
1736 $(eval
$(call SingleProfile
,CameoAP135
,64kraw
,TEW823DRU
,tew-823dru
,TEW-823DRU
,ttyS0
,115200,$$(tew823dru_mtdlayout
) mem
=256M
,"00AP135AR9558-RT-131129-00"))
1738 $(eval
$(call SingleProfile
,CameoDB120
,64kraw
,DHP1565A1
,dhp-1565-a1
,DHP-1565-A1
,ttyS0
,115200,"00DB120AR9344-RT-101214-00"))
1739 $(eval
$(call SingleProfile
,CameoDB120
,64kraw
,DIR825C1
,dir-825-c1
,DIR-825-C1
,ttyS0
,115200,"00DB120AR9344-RT-101214-00"))
1740 $(eval
$(call SingleProfile
,CameoDB120
,64kraw
,DIR835A1
,dir-835-a1
,DIR-835-A1
,ttyS0
,115200,"00DB120AR9344-RT-101214-00"))
1742 $(eval
$(call SingleProfile
,CameoDB120_8M
,64kraw
,TEW732BR
,tew-732br
,TEW-732BR
,ttyS0
,115200,"00DB120AR9341-RT-120906-NA"))
1744 $(eval
$(call SingleProfile
,CyberTANGZIP
,64k
,WRT160NL
,wrt160nl
,WRT160NL
,ttyS0
,115200,,1.00.01))
1746 $(eval
$(call SingleProfile
,CyberTANLZMA
,64k
,MYNETREXT
,mynet-rext
,MYNET-REXT
,ttyS0
,115200,$$(mynet_rext_mtdlayout
) root
=31:2,1.00.01))
1748 $(eval
$(call SingleProfile
,CameoAP94
,64kraw
,DIR825B1
,dir-825-b1
,DIR-825-B1
,ttyS0
,115200,$$(cameo_ap94_mtdlayout
),$$(cameo_ap94_mtdlayout_fat
),01AP94-AR7161-RT-080619-00
,00AP94-AR7161-RT-080619-00
))
1749 $(eval
$(call SingleProfile
,CameoAP94
,64kraw
,TEW673GRU
,tew-673gru
,TEW-673GRU
,ttyS0
,115200,$$(cameo_ap94_mtdlayout
),$$(cameo_ap94_mtdlayout_fat
),01AP94-AR7161-RT-080619-01
,00AP94-AR7161-RT-080619-01
))
1750 $(eval
$(call SingleProfile
,CameoAP94
,64kraw
,DLRTDEV01
,dlrtdev01
,DIR-825-B1
,ttyS0
,115200,$$(dlrtdev_mtdlayout
),$$(dlrtdev_mtdlayout_fat
),01AP94-AR7161-RT-080619-00
,00AP94-AR7161-RT-080619-00
))
1752 $(eval
$(call SingleProfile
,dLANLzma
,64k
,dLAN_Hotspot
,dlan-hotspot
,dLAN-Hotspot
,ttyATH0
,115200,$$(dlan_hotspot_mtdlayout
) mem
=64M
,KRuImage
,65536))
1753 $(eval
$(call SingleProfile
,dLANLzma
,64k
,dLAN_pro_500_wp
,dlan-pro-500-wp
,dLAN-pro-500-wp
,ttyS0
,115200,$$(dlan_pro_500_wp_mtdlayout
) mem
=128M
,KRuImage
,65536))
1754 $(eval
$(call SingleProfile
,dLANLzma
,64k
,dLAN_pro_1200_ac
,dlan-pro-1200-ac
,dLAN-pro-1200-ac
,ttyS0
,115200,$$(dlan_pro_1200_ac_mtdlayout
) mem
=128M
,KRuImage
,65536))
1756 $(eval
$(call SingleProfile
,EnGenius
,64k
,ESR900
,esr900
,ESR900
,ttyS0
,115200,$$(esr900_mtdlayout
),KRuImage
,,0x4e))
1757 $(eval
$(call SingleProfile
,EnGenius
,64k
,ESR1750
,esr1750
,ESR1750
,ttyS0
,115200,$$(esr1750_mtdlayout
),KRuImage
,,0x61))
1758 $(eval
$(call SingleProfile
,EnGenius
,64k
,EPG5000
,epg5000
,EPG5000
,ttyS0
,115200,$$(epg5000_mtdlayout
),KRuImage
,,0x71))
1760 $(eval
$(call SingleProfile
,HiWiFi
,64k
,HIWIFI_HC6361
,hiwifi-hc6361
,HiWiFi-HC6361
,ttyATH0
,115200,$$(hiwifi_hc6361_mtdlayout
),KRuImage
))
1762 $(eval
$(call SingleProfile
,MyLoader
,64k
,WP543_2M
,wp543
,,ttyS0
,115200,0x200000,2M
))
1763 $(eval
$(call SingleProfile
,MyLoader
,64k
,WP543_4M
,wp543
,,ttyS0
,115200,0x400000,4M
))
1764 $(eval
$(call SingleProfile
,MyLoader
,64k
,WP543_8M
,wp543
,,ttyS0
,115200,0x800000,8M
))
1765 $(eval
$(call SingleProfile
,MyLoader
,64k
,WP543_16M
,wp543
,,ttyS0
,115200,0x1000000,16M
))
1766 $(eval
$(call SingleProfile
,MyLoader
,64k
,WPE72_4M
,wpe72
,,ttyS0
,115200,0x400000,4M
))
1767 $(eval
$(call SingleProfile
,MyLoader
,64k
,WPE72_8M
,wpe72
,,ttyS0
,115200,0x800000,8M
))
1768 $(eval
$(call SingleProfile
,MyLoader
,64k
,WPE72_16M
,wpe72
,,ttyS0
,115200,0x1000000,16M
))
1770 $(eval
$(call SingleProfile
,Netgear
,64kraw
,WNR2000V3
,wnr2000v3
,WNR2000V3
,ttyS0
,115200,$$(wnr2000v3_mtdlayout
),0x32303033,WNR2000V3
,"" NA
,-H
29763551+04+32))
1771 $(eval
$(call SingleProfile
,NetgearLzma
,64kraw
,WNR2000V4
,wnr2000v4
,WNR2000V4
,ttyS0
,115200,$$(wnr2000v4_mtdlayout
),0x32303034,WNR2000V4
,"" NA
,))
1772 $(eval
$(call SingleProfile
,Netgear
,64kraw
,WNR2200
,wnr2200
,WNR2200
,ttyS0
,115200,$$(wnr2200_mtdlayout
),0x32323030,wnr2200
,"" NA
,))
1773 $(eval
$(call SingleProfile
,Netgear
,64kraw
,REALWNR612V2
,wnr612v2
,WNR612V2
,ttyS0
,115200,$$(wnr2000v3_mtdlayout
),0x32303631,WNR612V2
,"",))
1774 $(eval
$(call SingleProfile
,Netgear
,64kraw
,N150R
,n150r
,WNR612V2
,ttyS0
,115200,$$(wnr2000v3_mtdlayout
),0x32303631,N150R
,"",))
1775 $(eval
$(call SingleProfile
,Netgear
,64kraw
,REALWNR1000V2
,wnr1000v2
,WNR1000V2
,ttyS0
,115200,$$(wnr2000v3_mtdlayout
),0x31303031,WNR1000V2
,"",))
1776 $(eval
$(call SingleProfile
,Netgear
,64kraw
,WNR1000V2_VC
,wnr1000v2-vc
,WNR1000V2
,ttyS0
,115200,$$(wnr2000v3_mtdlayout
),0x31303030,WNR1000V2-VC
,"",))
1777 $(eval
$(call SingleProfile
,Netgear
,64kraw
,WPN824N
,wpn824n
,WPN824N
,ttyS0
,115200,$$(wnr2000v3_mtdlayout
),0x31313030,WPN824N
,"" NA
,))
1779 $(eval
$(call SingleProfile
,OpenMesh
,squashfs-only
,OM2P
,om2p
,,,,OM2P
))
1780 $(eval
$(call SingleProfile
,OpenMesh
,squashfs-only
,OM5P
,om5p
,,,,OM5P
))
1781 $(eval
$(call SingleProfile
,OpenMesh
,squashfs-only
,OM5PAC
,om5pac
,,,,OM5PAC
))
1782 $(eval
$(call SingleProfile
,OpenMesh
,squashfs-only
,MR600
,mr600
,,,,MR600
))
1783 $(eval
$(call SingleProfile
,OpenMesh
,squashfs-only
,MR900
,mr900
,,,,MR900
))
1784 $(eval
$(call SingleProfile
,OpenMesh
,squashfs-only
,MR1750
,mr1750
,,,,MR1750
))
1786 $(eval
$(call SingleProfile
,PB4X
,128k
,ALL0305
,all0305
,ALL0305
,ttyS0
,115200))
1787 $(eval
$(call SingleProfile
,PB4X
,128k
,EAP7660D
,eap7660d
,EAP7660D
,ttyS0
,115200))
1788 $(eval
$(call SingleProfile
,PB4X
,64k
,JA76PF
,ja76pf
,JA76PF
,ttyS0
,115200))
1789 $(eval
$(call SingleProfile
,PB4X
,64k
,JA76PF2
,ja76pf2
,JA76PF2
,ttyS0
,115200))
1790 $(eval
$(call SingleProfile
,PB4X
,64k
,JWAP003
,jwap003
,JWAP003
,ttyS0
,115200))
1791 $(eval
$(call SingleProfile
,PB4X
,64k
,PB42
,pb42
,PB42
,ttyS0
,115200))
1792 $(eval
$(call SingleProfile
,PB4X
,64k
,PB44
,pb44
,PB44
,ttyS0
,115200))
1794 $(eval
$(call SingleProfile
,Planex
,64kraw
,MZKW04NU
,mzk-w04nu
,MZK-W04NU
,ttyS0
,115200))
1795 $(eval
$(call SingleProfile
,Planex
,64kraw
,MZKW300NH
,mzk-w300nh
,MZK-W300NH
,ttyS0
,115200))
1797 $(eval
$(call SingleProfile
,Seama
,64k
,MYNETN600
,mynet-n600
,MYNET-N600
,ttyS0
,115200,$$(mynet_n600_mtdlayout
),wrgnd16_wd_db600
,65536,16187392))
1798 $(eval
$(call SingleProfile
,Seama
,64k
,MYNETN750
,mynet-n750
,MYNET-N750
,ttyS0
,115200,$$(mynet_n600_mtdlayout
),wrgnd13_wd_av
,65536,16187392))
1800 $(eval
$(call SingleProfile
,Seama
,64k
,QIHOO360
,qihoo-c301
,QIHOO-C301
,ttyS0
,115200,$$(qihoo_c301_mtdlayout
),wrgac26_qihoo360_360rg
,65536,16121856))
1802 $(eval
$(call SingleProfile
,Senao
,squashfs-only
,EAP300V2
,eap300v2
,EAP300V2
,ttyS0
,115200,$$(eap300v2_mtdlayout
)))
1804 $(eval
$(call SingleProfile
,WHRHPG300N
,64kraw
,WHRG301N
,whr-g301n
,WHR-G301N
,ttyS0
,115200,$$(whrhpg300n_mtdlayout
),WHR-G301N
))
1805 $(eval
$(call SingleProfile
,WHRHPG300N
,64kraw
,WHRHPG300N
,whr-hp-g300n
,WHR-HP-G300N
,ttyS0
,115200,$$(whrhpg300n_mtdlayout
),WHR-HP-G300N
))
1806 $(eval
$(call SingleProfile
,WHRHPG300N
,64kraw
,WHRHPGN
,whr-hp-gn
,WHR-HP-GN
,ttyS0
,115200,$$(whrhpg300n_mtdlayout
),WHR-HP-GN
))
1807 $(eval
$(call SingleProfile
,WHRHPG300N
,64kraw
,WLAEAG300N
,wlae-ag300n
,WLAE-AG300N
,ttyS0
,115200,$$(whrhpg300n_mtdlayout
),WLAE-AG300N
))
1809 $(eval
$(call SingleProfile
,WRT400N
,64k
,WRT400N
,wrt400n
,WRT400N
,ttyS0
,115200))
1811 $(eval
$(call SingleProfile
,WZRHP128K
,128kraw
,WZRHPG300NH
,wzr-hp-g300nh
,WZR-HP-G300NH
,ttyS0
,115200,WZR-HP-G300NH
))
1812 $(eval
$(call SingleProfile
,WZRHP64K
,64kraw
,WZRHPG300NH2
,wzr-hp-g300nh2
,WZR-HP-G300NH2
,ttyS0
,115200,WZR-HP-G300NH2
))
1813 $(eval
$(call SingleProfile
,WZRHP64K
,64kraw
,WZRHPAG300H
,wzr-hp-ag300h
,WZR-HP-AG300H
,ttyS0
,115200,WZR-HP-AG300H
))
1814 $(eval
$(call SingleProfile
,WZRHP64K
,64kraw
,WZRHPG450H
,wzr-hp-g450h
,WZR-HP-G450H
,ttyS0
,115200,WZR-HP-AG450H
))
1815 $(eval
$(call SingleProfile
,WZRHP64K
,64kraw
,WZR600DHP
,wzr-600dhp
,WZR-HP-AG300H
,ttyS0
,115200,WZR-600DHP
))
1816 $(eval
$(call SingleProfile
,WZRHP64K
,64kraw
,WZR450HP2
,wzr-450hp2
,WZR-450HP2
,ttyS0
,115200,WZR-450HP2
))
1818 $(eval
$(call SingleProfile
,Zcomax
,64k
,ZCN1523H28
,zcn-1523h-2-8
,ZCN-1523H-2
,ttyS0
,115200,$$(zcn1523h_mtdlayout
)))
1819 $(eval
$(call SingleProfile
,Zcomax
,64k
,ZCN1523H516
,zcn-1523h-5-16
,ZCN-1523H-5
,ttyS0
,115200,$$(zcn1523h_mtdlayout
)))
1821 $(eval
$(call SingleProfile
,ZyXEL
,64k
,NBG_460N_550N_550NH
,nbg460n_550n_550nh
,NBG460N
,ttyS0
,115200,NBG-460N
))
1823 $(eval
$(call MultiProfile
,AP121
,AP121_2M AP121_4M AP121_8M AP121_16M
))
1824 $(eval
$(call MultiProfile
,AP136
,AP136_010 AP136_020
))
1825 $(eval
$(call MultiProfile
,AP143
,AP143_8M AP143_16M
))
1826 $(eval
$(call MultiProfile
,AP147
,AP147_010
))
1827 $(eval
$(call MultiProfile
,AP152
,AP152_16M
))
1828 $(eval
$(call MultiProfile
,DIR615IX
,DIR615I1 DIR615I3
))
1829 $(eval
$(call MultiProfile
,EWDORIN
, EWDORINAP EWDORINRT EWDORIN16M
))
1830 $(eval
$(call MultiProfile
,OPENMESH
,OM2P OM5P OM5PAC MR600 MR900 MR1750
))
1831 $(eval
$(call MultiProfile
,TEW652BRP
,TEW652BRP_FW TEW652BRP_RECOVERY
))
1832 $(eval
$(call MultiProfile
,TUBE2H
,TUBE2H8M TUBE2H16M
))
1833 $(eval
$(call MultiProfile
,WNR612V2
,REALWNR612V2 N150R
))
1834 $(eval
$(call MultiProfile
,WNR1000V2
,REALWNR1000V2 WNR1000V2_VC
))
1835 $(eval
$(call MultiProfile
,WP543
,WP543_2M WP543_4M WP543_8M WP543_16M
))
1836 $(eval
$(call MultiProfile
,WPE72
,WPE72_4M WPE72_8M WPE72_16M
))
1837 $(eval
$(call MultiProfile
,WPJ342
,WPJ342_16M
))
1838 $(eval
$(call MultiProfile
,WPJ344
,WPJ344_16M
))
1839 $(eval
$(call MultiProfile
,WPJ531
,WPJ531_16M
))
1840 $(eval
$(call MultiProfile
,WPJ558
,WPJ558_16M
))
1841 $(eval
$(call MultiProfile
,Yun
,YUN_16M YUN_8M
))
1843 $(eval
$(call MultiProfile
,Minimal
,$(SINGLE_PROFILES
)))
1844 $(eval
$(call MultiProfile
,Madwifi
,EAP7660D WP543
))
1845 endif # ifeq ($(SUBTARGET),generic)
1847 ifeq ($(SUBTARGET
),nand
)
1852 CONSOLE
= ttyS0
,115200
1853 MTDPARTS
= ar934x-nfc
:512k
(nandloader
)ro
,8M
(kernel
),8M
(recovery
),113664k
(ubi
),128k@
130944k
(odm-caldata
)ro
1854 IMAGES
:= sysupgrade.
tar
1855 KERNEL
:= kernel-bin | patch-cmdline | MerakiNAND
1856 KERNEL_INITRAMFS
:= kernel-bin | patch-cmdline | MerakiNAND
1857 IMAGE
/sysupgrade.
tar := sysupgrade-nand
1859 TARGET_DEVICES
+= mr18
1861 $(eval
$(call SingleProfile
,NetgearNAND
,64k
,WNDR3700V4
,wndr3700v4
,WNDR3700_V4
,ttyS0
,115200,$$(wndr4300_mtdlayout
),0x33373033,WNDR3700v4
,"",-H
29763948+128+128,wndr4300
))
1862 $(eval
$(call SingleProfile
,NetgearNAND
,64k
,WNDR4300V1
,wndr4300
,WNDR4300
,ttyS0
,115200,$$(wndr4300_mtdlayout
),0x33373033,WNDR4300
,"",-H
29763948+0+128+128+2x2
+3x3
,wndr4300
))
1863 $(eval
$(call SingleProfile
,NetgearNAND
,64k
,R6100
,r6100
,R6100
,ttyS0
,115200,$$(r6100_mtdlayout
),0x36303030,R6100
,"",-H
29764434+0+128+128+2x2
+2x2
,wndr4300
))
1865 $(eval
$(call SingleProfile
,ZyXELNAND
,128k
,NBG6716
,nbg6716
,NBG6716
,ttyS0
,115200,NBG6716
,$$(zyx_nbg6716_mtdlayout
),mem
=256M
))
1867 $(eval
$(call MultiProfile
,WNDR4300
,WNDR3700V4 WNDR4300V1
))
1868 endif # ifeq ($(SUBTARGET),nand)
1871 $(eval
$(call MultiProfile
,Default
,$(SINGLE_PROFILES
)))
1873 define Image
/Build
/squashfs
1874 cp
$(KDIR
)/root.squashfs
$(KDIR
)/root.squashfs-raw
1875 cp
$(KDIR
)/root.squashfs
$(KDIR
)/root.squashfs-64k
1876 $(STAGING_DIR_HOST
)/bin
/padjffs2
$(KDIR
)/root.squashfs-64k
64
1877 cp
$(KDIR
)/root.squashfs-64k
$(BIN_DIR
)/$(IMG_PREFIX
)-root.squashfs-64k
1878 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
1879 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) bs
=128k conv
=sync
1882 define Image
/Build
/jffs2
1883 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) bs
=128k conv
=sync
1886 define Image
/Build
/Initramfs
1887 $(call Image
/Build
/Profile
/$(IMAGE_PROFILE
),initramfs
)
1890 define Image
/Prepare
1891 gzip
-9n
-c
$(KDIR
)/vmlinux
> $(KDIR
)/vmlinux.bin.gz
1892 $(call CompressLzma
,$(KDIR
)/vmlinux
,$(KDIR
)/vmlinux.bin.lzma
)
1893 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),)
1894 gzip
-9n
-c
$(KDIR
)/vmlinux-initramfs
> $(KDIR
)/vmlinux-initramfs.bin.gz
1895 $(call CompressLzma
,$(KDIR
)/vmlinux-initramfs
,$(KDIR
)/vmlinux-initramfs.bin.lzma
)
1896 $(call Image
/BuildLoader
,generic
,elf
,,,-initramfs
)
1898 $(call Image
/BuildLoader
,generic
,elf
)
1899 $(call Image
/Build
/Profile
/$(if
$(CONFIG_IB
),Default
,$(IMAGE_PROFILE
)),loader
)
1902 # $(1): filesystem type.
1904 $(call Image
/Build
/$(call rootfs_type
,$(1)),$(1))
1905 $(call Image
/Build
/Profile
/$(IMAGE_PROFILE
),$(1))
1908 $(eval
$(call BuildImage
))