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.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
11 $(BIN_DIR
)/$(IMG_PREFIX
)-$(2)-$(1)
15 $(call imgname
,$(1),$(2))-sysupgrade.bin
18 VMLINUX
:=$(IMG_PREFIX
)-vmlinux
19 UIMAGE
:=$(IMG_PREFIX
)-uImage
21 define Image
/Build
/Initramfs
22 $(call Image
/Build
/Profile
/$(PROFILE
),initramfs
)
27 loadaddr-y
:= 0x80000000
28 loadaddr-
$(CONFIG_TARGET_ramips_rt288x
) := 0x88000000
29 loadaddr-
$(CONFIG_TARGET_ramips_mt7621
) := 0x80001000
31 KERNEL_LOADADDR
:= $(loadaddr-y
)
33 KERNEL_DTB
= kernel-bin | patch-dtb | lzma
35 KERNEL
:= $(KERNEL_DTB
) | uImage lzma
36 IMAGES
:= sysupgrade.bin
37 IMAGE_SIZE
:= $(ralink_default_fw_size_8M
)
38 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
41 define Build
/patch-dtb
42 $(call Image
/BuildDTB
,..
/dts
/$(DTS
).dts
,$@.dtb
)
43 $(STAGING_DIR_HOST
)/bin
/patch-dtb
$@
$@.dtb
47 $(STAGING_DIR_HOST
)/bin
/trx \
55 $(STAGING_DIR_HOST
)/bin
/seama
-i
$@
$(1)
59 define Build
/seama-seal
60 $(call Build
/seama
,-s
$@.seama
$(1))
63 define Build
/relocate-kernel
65 dd if
=$(KDIR
)/loader.bin bs
=32 conv
=sync
&& \
66 perl
-e
'@s = stat("$@"); print pack("V", @s[7])' && \
72 define Build
/ubnt-erx-factory-compat
73 echo
'21001:6' > $@.compat
74 $(TAR
) -cf
$@
--transform
='s/^.*/compat/' $@.compat
78 define Build
/ubnt-erx-factory-kernel
79 if
[ -e
$(BIN_DIR
)/$(KERNEL_INITRAMFS_IMAGE
) ]; then \
80 $(TAR
) -rf
$@
--transform
='s/^.*/vmlinux.tmp/' $(BIN_DIR
)/$(KERNEL_INITRAMFS_IMAGE
); \
82 md5sum
--binary
$(BIN_DIR
)/$(KERNEL_INITRAMFS_IMAGE
) | awk
'{print $$1}'> $@.md5
; \
83 $(TAR
) -rf
$@
--transform
='s/^.*/vmlinux.tmp.md5/' $@.md5
; \
88 define Build
/ubnt-erx-factory-rootfs
89 echo
"dummy" > $@.rootfs
90 $(TAR
) -rf
$@
--transform
='s/^.*/squashfs.tmp/' $@.rootfs
92 md5sum
--binary
$@.rootfs | awk
'{print $$1}'> $@.md5
93 $(TAR
) -rf
$@
--transform
='s/^.*/squashfs.tmp.md5/' $@.md5
98 define Build
/ubnt-erx-factory-version
99 echo
'$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $@.version
100 $(TAR
) -rf
$@
--transform
='s/^.*/version.tmp/' $@.version
104 #We need kernel+initrams fit into kernel partition
105 define Build
/ubnt-erx-factory-check-size
106 @
[ $$(($(subst k
,* 1024,$(subst m
, * 1024k
,$(1))))) -ge
"$$($(TAR) -xf $@ vmlinux.tmp -O | wc -c)" ] ||
{ \
107 echo
"WARNING: Initramfs kernel for image $@ is too big (kernel size: $$($(TAR) -xf $@ vmlinux.tmp -O | wc -c), max size $(1))" >&2; \
111 @
[ "$$($(TAR) -xf $@ vmlinux.tmp -O | wc -c)" -gt
0 ] ||
{ \
112 echo
"WARNING: Kernel for image $@ not found" >&2; \
117 define MkCombineduImage
118 $(call PatchKernelLzma
,$(2),$(3))
119 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt
`expr $(4) - 64` ]; then \
120 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big" >&2; \
121 else if
[ `stat -c%s "$(KDIR)/root.$(1)"` -gt
$(5) ]; then \
122 echo
"Warning: $(KDIR)/root.$(1) is too big" >&2; \
124 ( dd if
=$(KDIR
)/vmlinux-
$(2).bin.lzma bs
=`expr $(4) - 64` conv
=sync
; dd if
=$(KDIR
)/root.
$(1) ) > $(KDIR
)/vmlinux-
$(2).bin.lzma.combined
; \
126 $(call MkImage
,lzma
,$(KDIR
)/vmlinux-
$(2).bin.lzma.combined
,$(call sysupname
,$(1),$(2)),$(6))
131 # The real magic happens inside these templates
133 # $(1), compression method
134 # $(2), filename of image data
135 # $(3), output filename
137 $(eval imagename
=$(if
$(4),$(4),MIPS OpenWrt Linux-
$(LINUX_VERSION
)))
138 -mkimage
-A mips
-O linux
-T kernel
-C
$(1) -a
$(loadaddr-y
) -e
$(loadaddr-y
) \
144 $(STAGING_DIR_HOST
)/bin
/lzma e
$(1) -lc1
-lp2
-pb2
$(2)
147 define MkImageSysupgrade
/squashfs
148 $(eval output_name
=$(IMG_PREFIX
)-$(2)-$(1)-$(if
$(4),$(4),sysupgrade
).bin
)
149 cat
$(KDIR
)/vmlinux-
$(2).uImage
$(KDIR
)/root.
$(1) > $(KDIR
)/$(output_name
)
150 $(call prepare_generic_squashfs
,$(KDIR
)/$(output_name
))
151 if
[ `stat -c%s "$(KDIR)/$(output_name)"` -gt
$(3) ]; then \
152 echo
"Warning: $(KDIR)/$(output_name) is too big" >&2; \
154 $(CP
) $(KDIR
)/$(output_name
) $(BIN_DIR
)/$(output_name
); \
158 define MkImageTpl
/squashfs
159 $(eval output_name
=$(IMG_PREFIX
)-$(2)-$(1)-$(if
$(4),$(4),sysupgrade
).bin
)
160 $(STAGING_DIR_HOST
)/bin
/mktplinkfw2
-V
"ver. 2.0" -B
"$(2)" -j \
161 -o
$(KDIR
)/$(output_name
) \
162 -k
$(KDIR
)/vmlinux-
$(1)$(4).bin.lzma \
164 $(CP
) $(KDIR
)/$(output_name
) $(BIN_DIR
)/$(output_name
)
167 define MkImageTpl
/initramfs
168 $(eval output_name
=$(IMG_PREFIX
)-$(2)-$(1).bin
)
169 $(STAGING_DIR_HOST
)/bin
/mktplinkfw2
-V
"ver. 2.0" -B
"$(2)" -c \
170 -o
$(KDIR
)/$(output_name
) \
171 -k
$(KDIR
)/vmlinux-
$(1).bin.lzma
172 $(CP
) $(KDIR
)/$(output_name
) $(BIN_DIR
)/$(output_name
)
175 # $(1), lowercase board name like "mt7620a_v22sg"
176 # $(2), DTS filename without .dts extension
177 # $(3), optional filename suffix, e.g. "-initramfs"
178 define PatchKernelLzmaDtb
179 cp
$(KDIR
)/vmlinux
$(3) $(KDIR
)/vmlinux-
$(1)$(3)
180 $(LINUX_DIR
)/scripts
/dtc
/dtc
-O dtb
-o
$(KDIR
)/$(2).dtb ..
/dts
/$(2).dts
181 $(STAGING_DIR_HOST
)/bin
/patch-dtb
$(KDIR
)/vmlinux-
$(1)$(3) $(KDIR
)/$(2).dtb
182 $(call CompressLzma
,$(KDIR
)/vmlinux-
$(1)$(3),$(KDIR
)/vmlinux-
$(1)$(3).bin.lzma
)
185 # $(1), lowercase board name
186 # $(2), DTS filename without .dts extension
187 # $(3), ih_name field of uImage header
188 # $(4), optional filename suffix, e.g. "-initramfs"
189 define MkImageLzmaDtb
190 $(call PatchKernelLzmaDtb
,$(1),$(2),$(4))
191 $(call MkImage
,lzma
,$(KDIR
)/vmlinux-
$(1)$(4).bin.lzma
,$(KDIR
)/vmlinux-
$(1)$(4).uImage
,$(3))
194 # $(1), Rootfs type, e.g. squashfs
195 # $(2), lowercase board name
196 # $(3), DTS filename without .dts extension
197 # $(4), maximum size of sysupgrade image
198 # $(5), uImage header's ih_name field
199 define BuildFirmware
/OF
200 $(call MkImageLzmaDtb
,$(2),$(3),$(5))
201 $(call MkImageSysupgrade
/$(1),$(1),$(2),$(4),$(6))
204 define BuildFirmware
/OF
/tplink
205 $(call PatchKernelLzmaDtb
,$(1),$(2),$(4))
206 $(call MkImageTpl
/$(1),$(1),$(2),$(4),$(5))
209 define BuildFirmware
/OF
/tplink
/initramfs
210 $(call PatchKernelLzmaDtb
,$(2),$(3),-initramfs
)
211 $(call MkImageTpl
/$(1),$(1),$(2),$(4),$(5))
214 # $(1), squashfs/initramfs
215 # $(2), lowercase board name
216 # $(3), DTS filename without .dts extension
217 # $(4), ih_name field of uImage header
218 define BuildFirmware
/OF
/initramfs
219 $(call MkImageLzmaDtb
,$(2),$(3),$(4),-initramfs
)
220 $(CP
) $(KDIR
)/vmlinux-
$(2)-initramfs.uImage
$(call imgname
,$(1),$(2))-uImage.bin
224 # Build images for default ralink layout for 4MB flash
225 # kernel + roots = 0x3b0000
226 # $(1) = squashfs/initramfs
227 # $(2) = lowercase board name
229 ralink_default_fw_size_4M
=3866624
230 BuildFirmware
/Default4M
/squashfs
=$(call BuildFirmware
/OF
,$(1),$(2),$(3),$(ralink_default_fw_size_4M
),$(4))
231 BuildFirmware
/Default4M
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3),$(4))
233 # Build images for default ralink layout for 8MB flash
234 # kernel + roots = 0x7b0000
235 # $(1) = squashfs/initramfs
236 # $(2) = lowercase board name
238 # $(4) = uImage header name field
239 ralink_default_fw_size_8M
=8060928
240 BuildFirmware
/Default8M
/squashfs
=$(call BuildFirmware
/OF
,$(1),$(2),$(3),$(ralink_default_fw_size_8M
),$(4))
241 BuildFirmware
/Default8M
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3),$(4))
242 BuildFirmware
/Tplink
/squashfs
=$(call BuildFirmware
/OF
/tplink
,$(1),$(2),$(3),$(4))
243 BuildFirmware
/Tplink
/initramfs
=$(call BuildFirmware
/OF
/tplink
/initramfs
,$(1),$(2),$(3),$(4))
245 ralink_default_fw_size_16M
=16121856
246 BuildFirmware
/Default16M
/squashfs
=$(call BuildFirmware
/OF
,$(1),$(2),$(3),$(ralink_default_fw_size_16M
),$(4))
247 BuildFirmware
/Default16M
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3),$(4))
249 ralink_default_fw_size_32M
=33226752
250 BuildFirmware
/Default32M
/squashfs
=$(call BuildFirmware
/OF
,$(1),$(2),$(3),$(ralink_default_fw_size_32M
),$(4))
251 BuildFirmware
/Default32M
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3),$(4))
253 # Build images for a custom sized flash layout
254 # $(1) = squashfs/initramfs
255 # $(2) = lowercase board name
257 # $(4) = kernel + rootfs size
258 BuildFirmware
/CustomFlash
/squashfs
=$(call BuildFirmware
/OF
,$(1),$(2),$(3),$(4),$(5),$(6))
259 BuildFirmware
/CustomFlash
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
261 # wrappers for boards that have 4MB and 8MB versions
262 define BuildFirmware
/DefaultDualSize
/squashfs
263 $(call BuildFirmware
/Default4M
/$(1),$(1),$(2)-4M
,$(3)-4M
)
264 $(call BuildFirmware
/Default8M
/$(1),$(1),$(2)-8M
,$(3)-8M
)
266 define BuildFirmware
/DefaultDualSize
/initramfs
267 $(call BuildFirmware
/OF
/initramfs
,$(1),$(2)-4M
,$(3)-4M
)
268 $(call BuildFirmware
/OF
/initramfs
,$(1),$(2)-8M
,$(3)-8M
)
271 # Some boards need a special header inside the uImage to make them bootable
272 define BuildFirmware
/CustomFlashFactory
/squashfs
273 $(call BuildFirmware
/CustomFlash
/$(1),$(1),$(2),$(3),$(4))
274 $(call BuildFirmware
/CustomFlash
/$(1),$(1),$(2),$(3),$(4),$(5),$(6))
276 BuildFirmware
/CustomFlashFactory
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
278 # sign an image to make it work with edimax tftp recovery
279 define BuildFirmware
/Edimax
/squashfs
280 $(call BuildFirmware
/OF
,$(1),$(2),$(3),$(4))
281 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
282 mkedimaximg
-i
$(call sysupname
,$(1),$(2)) \
283 -o
$(call imgname
,$(1),$(2))-factory.bin \
284 -s
$(5) -m
$(6) -f
$(7) -S
$(8); \
287 BuildFirmware
/Edimax
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
289 # build Seama header images
290 define BuildFirmware
/Seama
/squashfs
291 $(call MkImageLzmaDtb
,$(2),$(3),$(5))
292 $(eval output_name
=$(IMG_PREFIX
)-$(2)-$(1)-sysupgrade.bin
)
293 cat
$(KDIR
)/vmlinux-
$(2).bin.lzma
$(KDIR
)/root.
$(1) > $(KDIR
)/img_
$(2).
$(1).tmp
294 if
[ `stat -c%s "$(KDIR)/img_$(2).$(1).tmp"` -gt
$$$$(($(5) - 64)) ]; then \
295 echo
"Warning: $(KDIR)/img_$(2).$(1).tmp is too big" >&2; \
297 dd if
=$(KDIR
)/vmlinux-
$(2).bin.lzma of
=$(KDIR
)/vmlinux-
$(2).bin.lzma.padded bs
=64k conv
=sync
; \
299 dd if
=$(KDIR
)/vmlinux-
$(2).bin.lzma.padded bs
=1 count
=`expr \`stat
-c
%s
$(KDIR
)/vmlinux-
$(2).bin.lzma.padded\
` - 64`; \
300 dd if
=$(KDIR
)/root.
$(1) bs
=64k conv
=sync
; \
301 ) > $(KDIR
)/vmlinux-
$(2).tmp
; \
302 $(STAGING_DIR_HOST
)/bin
/seama \
303 -i
$(KDIR
)/vmlinux-
$(2).tmp \
304 -m
"dev=/dev/mtdblock/2" -m
"type=firmware"; \
305 $(STAGING_DIR_HOST
)/bin
/seama \
306 -s
$(call imgname
,$(1),$(2))-factory.bin \
307 -m
"signature=$(4)" \
308 -i
$(KDIR
)/vmlinux-
$(2).tmp.seama
; \
309 dd if
=$(KDIR
)/vmlinux-
$(2).bin.lzma.padded bs
=1 count
=`expr \`stat
-c
%s
$(KDIR
)/vmlinux-
$(2).bin.lzma.padded\
` - 64` of
=$(KDIR
)/vmlinux-
$(2)-sysupgrade.tmp
; \
310 $(STAGING_DIR_HOST
)/bin
/seama \
311 -i
$(KDIR
)/vmlinux-
$(2)-sysupgrade.tmp \
312 -m
"dev=/dev/mtdblock/2" -m
"type=firmware"; \
314 dd if
=$(KDIR
)/vmlinux-
$(2)-sysupgrade.tmp.seama
; \
315 dd if
=$(KDIR
)/root.
$(1) bs
=64k conv
=sync
; \
316 ) > $(BIN_DIR
)/$(output_name
); \
319 BuildFirmware
/Seama
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
321 # sign Buffalo images
322 define BuildFirmware
/Buffalo
323 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
324 buffalo-enc
-p
$(3) -v
1.76 \
325 -i
$(KDIR
)/vmlinux-
$(2).uImage \
326 -o
$(KDIR
)/vmlinux-
$(2).uImage.enc
; \
327 buffalo-enc
-p
$(3) -v
1.76 \
328 -i
$(KDIR
)/root.
$(1) \
329 -o
$(KDIR
)/root.
$(2).enc
; \
330 buffalo-tag
-b
$(3) -p
$(3) -a ram
-v
1.76 -m
1.01 \
331 -l mlang8
-f
1 -r EU \
332 -i
$(KDIR
)/vmlinux-
$(2).uImage.enc \
333 -i
$(KDIR
)/root.
$(2).enc \
334 -o
$(call imgname
,$(1),$(2))-factory-EU.bin
; \
338 # sign trednet / UMedia images
339 define BuildFirmware
/UMedia
/squashfs
340 $(call BuildFirmware
/Default8M
/$(1),$(1),$(2),$(3))
341 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
342 fix-u-media-header
-T
0x46 -B
$(4) \
343 -i
$(call sysupname
,$(1),$(2)) \
344 -o
$(call imgname
,$(1),$(2))-factory.bin
; \
347 BuildFirmware
/UMedia
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
349 # sign dap 1350 based images
350 dap1350_mtd_size
=7667712
351 define BuildFirmware
/dap1350
/squashfs
352 $(call BuildFirmware
/CustomFlash
/$(1),$(1),$(2),$(3),$(dap1350_mtd_size
))
354 -i
$(call sysupname
,$(1),$(2)) \
355 -o
$(call imgname
,$(1),$(2))-factory.bin
357 BuildFirmware
/dap1350
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
360 define BuildFirmware
/Poray4M
/squashfs
361 $(call BuildFirmware
/Default4M
/$(1),$(1),$(2),$(3))
362 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
363 mkporayfw
-B
$(3) -F
4M \
364 -f
$(call sysupname
,$(1),$(2)) \
365 -o
$(call imgname
,$(1),$(2))-factory.bin
; \
368 BuildFirmware
/Poray4M
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
370 define BuildFirmware
/Poray8M
/squashfs
371 $(call BuildFirmware
/Default8M
/$(1),$(1),$(2),$(3))
372 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
373 mkporayfw
-B
$(3) -F
8M \
374 -f
$(call sysupname
,$(1),$(2)) \
375 -o
$(call imgname
,$(1),$(2))-factory.bin
; \
378 BuildFirmware
/Poray8M
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
380 define BuildFirmware
/PorayDualSize
/squashfs
381 $(call BuildFirmware
/DefaultDualSize
/$(1),$(1),$(2),$(3))
382 if
[ -e
"$(call sysupname,$(1),$(2)-4M)" ]; then \
383 mkporayfw
-B
$(3) -F
4M \
384 -f
$(call sysupname
,$(1),$(2)-4M
) \
385 -o
$(call imgname
,$(1),$(2)-4M
)-factory.bin
; \
387 if
[ -e
"$(call sysupname,$(1),$(2)-8M)" ]; then \
388 mkporayfw
-B
$(3) -F
8M \
389 -f
$(call sysupname
,$(1),$(2)-8M
) \
390 -o
$(call imgname
,$(1),$(2)-8M
)-factory.bin
; \
393 BuildFirmware
/PorayDualSize
/initramfs
=$(call BuildFirmware
/DefaultDualSize
/initramfs
,$(1),$(2),$(3))
395 define BuildFirmware
/Gemtek
/squashfs
396 $(call BuildFirmware
/Default4M
/$(1),$(1),$(2),$(3))
397 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
398 mkheader_gemtek
"$(call sysupname,$(1),$(2))" \
399 "$(call imgname,$(1),$(2))-factory.bin" $(2) || \
400 rm -f
"$(call imgname,$(1),$(2))-factory.bin"; \
403 BuildFirmware
/Gemtek
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
405 # Airlink101 AR670W -- LZMA without uImage header
406 define BuildFirmware
/AR670W
/squashfs
407 $(call PatchKernelLzmaDtb
,$(2),$(3),$(5))
409 $(eval output_name
=$(IMG_PREFIX
)-$(2)-$(1)-$(if
$(4),$(4),sysupgrade
).bin
)
410 $(eval factory_name
=$(IMG_PREFIX
)-$(2)-$(1)-factory.bin
)
412 ( dd if
=$(KDIR
)/vmlinux-
$(2).bin.lzma bs
=65536 \
413 conv
=sync
; dd if
=$(KDIR
)/root.
$(1) ) > $(KDIR
)/$(output_name
)
415 $(call prepare_generic_squashfs
,$(KDIR
)/$(output_name
))
417 if
[ `stat -c%s "$(KDIR)/$(output_name)"` \
418 -gt
$(ralink_default_fw_size_4M
) ]; then \
419 echo
"Warning: $(KDIR)/$(output_name) is too big" >&2; \
421 mkwrgimg
-i
$(KDIR
)/$(output_name
) \
422 -d
"/dev/mtdblock/2" \
423 -s
"wrgn16a_airlink_ar670w" \
424 -o
$(BIN_DIR
)/$(factory_name
); \
425 $(CP
) $(KDIR
)/$(output_name
) $(BIN_DIR
)/$(output_name
); \
433 Image
/Build
/Profile
/AR670W
=$(call BuildFirmware
/AR670W
/$(1),$(1),ar670w
,AR670W
)
435 Image
/Build
/Profile
/AR725W
=$(call BuildFirmware
/Gemtek
/$(1),$(1),ar725w
,AR725W
)
438 belkin_f5d8235v1_mtd_size
=7929856
439 Image
/Build
/Profile
/F5D8235V1
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),f5d8235v1
,F5D8235_V1
,$(belkin_f5d8235v1_mtd_size
))
441 Image
/Build
/Profile
/RTN15
=$(call BuildFirmware
/Default4M
/$(1),$(1),rt-n15
,RT-N15
)
443 Image
/Build
/Profile
/V11STFE
=$(call BuildFirmware
/Default4M
/$(1),$(1),v11st-fe
,V11STFE
)
445 Image
/Build
/Profile
/WLITX4AG300N
=$(call BuildFirmware
/Default4M
/$(1),$(1),wli-tx4-ag300n
,WLI-TX4-AG300N
)
447 Image
/Build
/Profile
/WZRAGL300NH
=$(call BuildFirmware
/Default4M
/$(1),$(1),wzr-agl300nh
,WZR-AGL300NH
)
449 ifeq ($(SUBTARGET
),rt288x
)
450 define Image
/Build
/Profile
/Default
451 $(call Image
/Build
/Profile
/AR670W
,$(1))
452 $(call Image
/Build
/Profile
/AR725W
,$(1))
453 $(call Image
/Build
/Profile
/F5D8235V1
,$(1))
454 $(call Image
/Build
/Profile
/RTN15
,$(1))
455 $(call Image
/Build
/Profile
/V11STFE
,$(1))
456 $(call Image
/Build
/Profile
/WLITX4AG300N
,$(1))
457 $(call Image
/Build
/Profile
/WZRAGL300NH
,$(1))
467 Image
/Build
/Profile
/DIR610A1
=$(call BuildFirmware
/Seama
/$(1),$(1),dir-610-a1
,DIR-610-A1
,wrgn59_dlob.hans_dir610
,$(ralink_default_fw_size_4M
))
469 edimax_3g6200n_mtd_size
=3735552
470 Image
/Build
/Profile
/3G6200N
=$(call BuildFirmware
/Edimax
/$(1),$(1),3g-6200n
,3G-6200N
,$(edimax_3g6200n_mtd_size
),CSYS
,3G62
,0x50000,0xc0000)
472 Image
/Build
/Profile
/3G6200NL
=$(call BuildFirmware
/Edimax
/$(1),$(1),3g-6200nl
,3G-6200NL
,$(edimax_3g6200n_mtd_size
),CSYS
,3G62
,0x50000,0xc0000)
474 Image
/Build
/Profile
/3G300M
=$(call BuildFirmware
/CustomFlashFactory
/$(1),$(1),3g300m
,3G300M
,$(ralink_default_fw_size_4M
),3G150M_SPI Kernel Image
,factory
)
476 Image
/Build
/Profile
/A5-V11
=$(call BuildFirmware
/Poray4M
/$(1),$(1),a5-v11
,A5-V11
)
478 Image
/Build
/Profile
/AIR3GII
=$(call BuildFirmware
/Default4M
/$(1),$(1),air3gii
,AIR3GII
)
480 define BuildFirmware
/UIMAGE_8M
481 $(call MkCombineduImage
,$(1),$(2),$(call mkcmdline
,$(3),$(4),$(5)) $(call mkmtd
/$(6),$(mtdlayout_8M
)),$(kernel_size_8M
),$(rootfs_size_8M
),$(7))
483 define Image
/Build
/Profile
/ALL02393G
484 $(call Image
/Build
/Template
/$(image_type
)/$(1),UIMAGE_8M
,all0239-3g
,ALL0239-3G
,ttyS1
,57600,phys
)
487 Image
/Build
/Profile
/ALL0256N
=$(call BuildFirmware
/DefaultDualSize
/$(1),$(1),all0256n
,ALL0256N
)
489 allnet_all5002_mtd_size
=33226752
490 Image
/Build
/Profile
/ALL5002
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),all5002
,ALL5002
,$(allnet_all5002_mtd_size
))
491 Image
/Build
/Profile
/ALL5003
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),all5003
,ALL5003
,$(allnet_all5002_mtd_size
))
493 argus_atp52b_mtd_size
=7995392
494 Image
/Build
/Profile
/ATP-52B
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),atp-52b
,ATP-52B
,$(argus_atp52b_mtd_size
))
496 asl26555_8mb_mtd_size
=7929856
497 asl26555_16mb_mtd_size
=16252928
498 define BuildFirmware
/ASL26555
/squashfs
499 $(call BuildFirmware
/CustomFlash
/$(1),$(1),$(2)-8M
,$(3)-8M
,$(asl26555_8mb_mtd_size
))
500 $(call BuildFirmware
/CustomFlash
/$(1),$(1),$(2)-16M
,$(3)-16M
,$(asl26555_16mb_mtd_size
))
502 define BuildFirmware
/ASL26555
/initramfs
503 $(call BuildFirmware
/OF
/initramfs
,$(1),$(2)-8M
,$(3)-8M
)
504 $(call BuildFirmware
/OF
/initramfs
,$(1),$(2)-16M
,$(3)-16M
)
506 Image
/Build
/Profile
/ASL26555
=$(call BuildFirmware
/ASL26555
/$(1),$(1),asl26555
,ASL26555
)
508 Image
/Build
/Profile
/AWM002EVB
=$(call BuildFirmware
/DefaultDualSize
/$(1),$(1),awm002-evb
,AWM002-EVB
)
509 Image
/Build
/Profile
/AWM003EVB
=$(call BuildFirmware
/Default8M
/$(1),$(1),awm003-evb
,AWM003-EVB
)
510 Image
/Build
/Profile
/AWAPN2403
=$(call BuildFirmware
/Default4M
/$(1),$(1),awmapn2403
,AWAPN2403
)
512 Image
/Build
/Profile
/BC2
=$(call BuildFirmware
/Default8M
/$(1),$(1),bc2
,BC2
)
514 broadway_mtd_size
=7929856
515 Image
/Build
/Profile
/BROADWAY
=$(call BuildFirmware
/CustomFlashFactory
/$(1),$(1),broadway
,BROADWAY
,$(broadway_mtd_size
),Broadway Kernel Image
,factory
)
517 Image
/Build
/Profile
/CARAMBOLA
=$(call BuildFirmware
/Default8M
/$(1),$(1),carambola
,CARAMBOLA
)
519 Image
/Build
/Profile
/D105
=$(call BuildFirmware
/Default4M
/$(1),$(1),d105
,D105
)
521 define BuildFirmware
/DIR300B1
/squashfs
522 $(call BuildFirmware
/Default4M
/$(1),$(1),$(2),$(3))
523 -mkwrgimg
-s
$(4) -d
/dev
/mtdblock
/2 \
524 -i
$(call sysupname
,$(1),$(2)) \
525 -o
$(call imgname
,$(1),$(2))-factory.bin
527 BuildFirmware
/DIR300B1
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
528 Image
/Build
/Profile
/DIR-300-B1
=$(call BuildFirmware
/DIR300B1
/$(1),$(1),dir-300-b1
,DIR-300-B1
,wrgn23_dlwbr_dir300b
)
529 Image
/Build
/Profile
/DIR-600-B1
=$(call BuildFirmware
/DIR300B1
/$(1),$(1),dir-600-b1
,DIR-600-B1
,wrgn23_dlwbr_dir600b
)
530 Image
/Build
/Profile
/DIR-600-B2
=$(call BuildFirmware
/DIR300B1
/$(1),$(1),dir-600-b2
,DIR-600-B2
,wrgn23_dlwbr_dir600b
)
531 Image
/Build
/Profile
/DIR-615-D
=$(call BuildFirmware
/DIR300B1
/$(1),$(1),dir-615-d
,DIR-615-D
,wrgn23_dlwbr_dir615d
)
533 Image
/Build
/Profile
/DIR-620-A1
=$(call BuildFirmware
/Default8M
/$(1),$(1),dir-620-a1
,DIR-620-A1
)
534 Image
/Build
/Profile
/DIR-620-D1
=$(call BuildFirmware
/Default8M
/$(1),$(1),dir-620-d1
,DIR-620-D1
)
536 define BuildFirmware
/DIR615H1
/squashfs
537 $(call BuildFirmware
/Default4M
/$(1),$(1),dir-615-h1
,DIR-615-H1
)
538 -mksenaofw
-e
$(call sysupname
,$(1),dir-615-h1
) \
539 -o
$(call imgname
,$(1),dir-615-h1
)-factory.bin \
540 -r
0x218 -p
0x30 -t
3
542 BuildFirmware
/DIR615H1
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),dir-615-h1
,DIR-615-H1
)
543 Image
/Build
/Profile
/DIR615H1
=$(call BuildFirmware
/DIR615H1
/$(1),$(1))
545 Image
/Build
/Profile
/DAP1350
=$(call BuildFirmware
/dap1350
/$(1),$(1),dap-1350
,DAP-1350
,RT3052-AP-DAP1350-3
)
547 Image
/Build
/Profile
/DAP1350WW
=$(call BuildFirmware
/dap1350
/$(1),$(1),dap-1350WW
,DAP-1350
,RT3052-AP-DAP1350WW-3
)
549 define BuildFirmware
/DCS930
/squashfs
550 $(call BuildFirmware
/Default4M
/squashfs
,squashfs
,$(2),$(3))
551 dd if
=$(KDIR
)/vmlinux-
$(2).bin.lzma of
=$(KDIR
)/image.
$(2).combined bs
=1048512 count
=1 conv
=sync
552 cat
$(KDIR
)/root.squashfs
>> $(KDIR
)/image.
$(2).combined
553 $(call MkImage
,lzma
,$(KDIR
)/image.
$(2).combined
,$(KDIR
)/image.
$(2))
554 $(call prepare_generic_squashfs
,$(KDIR
)/image.
$(2))
555 if
[ `stat -c%s "$(KDIR)/image.$(2)"` -gt
$(ralink_default_fw_size_4M
) ]; then \
556 echo
"Warning: $(KDIR)/image.$(2) is too big" >&2; \
558 dd if
=$(KDIR
)/image.
$(2) of
=$(KDIR
)/dcs.tmp bs
=64K count
=5 conv
=sync
;\
559 cat
$(KDIR
)/image.
$(2) >> $(KDIR
)/dcs.tmp
; \
560 dd if
=$(KDIR
)/dcs.tmp of
=$(call imgname
,$(1),$(2))-factory.bin bs
=4096k count
=1 conv
=sync
;\
561 $(STAGING_DIR_HOST
)/bin
/mkdcs932
$(call imgname
,$(1),$(2))-factory.bin
; \
564 BuildFirmware
/DCS930
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
565 Image
/Build
/Profile
/DCS930
=$(call BuildFirmware
/DCS930
/$(1),$(1),dcs-930
,DCS-930
)
566 Image
/Build
/Profile
/DCS930LB1
=$(call BuildFirmware
/DCS930
/$(1),$(1),dcs-930l-b1
,DCS-930L-B1
)
568 Image
/Build
/Profile
/ESR-9753
=$(call BuildFirmware
/Default4M
/$(1),$(1),esr-9753
,ESR-9753
)
570 Image
/Build
/Profile
/HW550-3G
=$(call BuildFirmware
/Default8M
/$(1),$(1),hw550-3g
,HW550-3G
)
572 belkin_f5d8235v2_mtd_size
=7929856
573 Image
/Build
/Profile
/F5D8235V2
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),f5d8235v2
,F5D8235_V2
,$(belkin_f5d8235v2_mtd_size
))
576 belkin_f7c027_mtd_size
=7798784
577 Image
/Build
/Profile
/F7C027
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),f7c027
,F7C027
,$(belkin_f7c027_mtd_size
))
579 Image
/Build
/Profile
/FONERA20N
=$(call BuildFirmware
/Edimax
/$(1),$(1),fonera20n
,FONERA20N
,$(ralink_default_fw_size_8M
),RSDK
,NL1T
,0x50000,0xc0000)
581 Image
/Build
/Profile
/RT-N13U
=$(call BuildFirmware
/Default8M
/$(1),$(1),rt-n13u
,RT-N13U
)
583 #Image/Build/Profile/HG255D=$(call BuildFirmware/Default16M/$(1),$(1),hg255d,HG255D)
585 Image
/Build
/Profile
/FREESTATION5
=$(call BuildFirmware
/Default8M
/$(1),$(1),freestation5
,FREESTATION5
)
587 Image
/Build
/Profile
/IP2202
=$(call BuildFirmware
/Default8M
/$(1),$(1),ip2202
,IP2202
)
589 BuildFirmware
/HLKRM04
/squashfs
=$(call BuildFirmware
/Default4M
/squashfs
,$(1),$(2),$(3),$(4))
590 define BuildFirmware
/HLKRM04
/initramfs
591 $(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3),$(4))
592 mkhilinkfw
-e
-i
$(call imgname
,$(1),$(2))-uImage.bin
-o
$(call imgname
,$(1),$(2))-factory.bin
;
594 Image
/Build
/Profile
/HLKRM04
=$(call BuildFirmware
/HLKRM04
/$(1),$(1),hlk-rm04
,HLKRM04
,HLK-RM02
)
596 Image
/Build
/Profile
/HT-TM02
=$(call BuildFirmware
/Default8M
/$(1),$(1),ht-tm02
,HT-TM02
)
598 Image
/Build
/Profile
/M3
=$(call BuildFirmware
/Poray4M
/$(1),$(1),m3
,M3
)
600 Image
/Build
/Profile
/M4
=$(call BuildFirmware
/PorayDualSize
/$(1),$(1),m4
,M4
)
602 Image
/Build
/Profile
/MOFI3500-3GN
=$(call BuildFirmware
/Default8M
/$(1),$(1),mofi3500-3gn
,MOFI3500-3GN
)
604 # Kernel name should be "Linux Kernel Image" to make the OpenWrt image installable from factory Web UI
605 Image
/Build
/Profile
/3G150B
=$(call BuildFirmware
/Default4M
/$(1),$(1),3g150b
,3G150B
,Linux Kernel Image
)
607 Image
/Build
/Profile
/MR102N
=$(call BuildFirmware
/Default8M
/$(1),$(1),mr-102n
,MR-102N
)
609 Image
/Build
/Profile
/MPRA1
=$(call BuildFirmware
/Default4M
/$(1),$(1),mpr-a1
,MPRA1
,Linux Kernel Image
)
610 Image
/Build
/Profile
/MPRA2
=$(call BuildFirmware
/Default8M
/$(1),$(1),mpr-a2
,MPRA2
,Linux Kernel Image
)
612 Image
/Build
/Profile
/DIR-300-B7
=$(call BuildFirmware
/Default4M
/$(1),$(1),dir-300-b7
,DIR-300-B7
)
613 Image
/Build
/Profile
/DIR-320-B1
=$(call BuildFirmware
/Default8M
/$(1),$(1),dir-320-b1
,DIR-320-B1
)
615 Image
/Build
/Profile
/NBG-419N
=$(call BuildFirmware
/Default4M
/$(1),$(1),nbg-419n
,NBG-419N
)
617 Image
/Build
/Profile
/MZKW300NH2
=$(call BuildFirmware
/Edimax
/$(1),$(1),mzk-w300nh2
,MZK-W300NH2
,$(mzkw300nh2_mtd_size
),CSYS
,RN52
,0x50000,0xc0000)
619 Image
/Build
/Profile
/NCS601W
=$(call BuildFirmware
/Default8M
/$(1),$(1),ncs601W
,NCS601W
)
621 nw718_mtd_size
=3801088
622 Image
/Build
/Profile
/NW718
=$(call BuildFirmware
/CustomFlashFactory
/$(1),$(1),nw718m
,NW718
,$(nw718_mtd_size
),ARA1B4NCRNW718
;1,factory
)
624 Image
/Build
/Profile
/M2M
=$(call BuildFirmware
/Default8M
/$(1),$(1),m2m
,M2M
,Linux Kernel Image
)
626 Image
/Build
/Profile
/MINIEMBPLUG
=$(call BuildFirmware
/Default8M
/$(1),$(1),miniembplug
,MINIEMBPLUG
)
628 Image
/Build
/Profile
/MINIEMBWIFI
=$(call BuildFirmware
/Default8M
/$(1),$(1),miniembwifi
,MINIEMBWIFI
)
630 Image
/Build
/Profile
/PSR-680W
=$(call BuildFirmware
/Default4M
/$(1),$(1),psr-680w
,PSR-680W
)
632 Image
/Build
/Profile
/PWH2004
=$(call BuildFirmware
/Default8M
/$(1),$(1),pwh2004
,PWH2004
)
634 Image
/Build
/Profile
/PX-4885
=$(call BuildFirmware
/DefaultDualSize
/$(1),$(1),px-4885
,PX-4885
)
636 Image
/Build
/Profile
/RT5350F-OLINUXINO
=$(call BuildFirmware
/Default8M
/$(1),$(1),rt5350f-olinuxino
,RT5350F-OLINUXINO
)
638 Image
/Build
/Profile
/RT5350F-OLINUXINO-EVB
=$(call BuildFirmware
/Default8M
/$(1),$(1),rt5350f-olinuxino-evb
,RT5350F-OLINUXINO-EVB
)
640 Image
/Build
/Profile
/RTG32B1
=$(call BuildFirmware
/Default4M
/$(1),$(1),rt-g32-b1
,RT-G32-B1
)
642 Image
/Build
/Profile
/RTN10PLUS
=$(call BuildFirmware
/Default4M
/$(1),$(1),rt-n10-plus
,RT-N10-PLUS
)
644 Image
/Build
/Profile
/RUT5XX
=$(call BuildFirmware
/Default8M
/$(1),$(1),rut5xx
,RUT5XX
)
646 Image
/Build
/Profile
/SL-R7205
=$(call BuildFirmware
/Default4M
/$(1),$(1),sl-r7205
,SL-R7205
)
648 Image
/Build
/Profile
/V22RW-2X2
=$(call BuildFirmware
/Default4M
/$(1),$(1),v22rw-2x2
,V22RW-2X2
)
650 vocore_8mb_mtd_size
=8060928
651 vocore_16mb_mtd_size
=16449536
652 define BuildFirmware
/VOCORE
/squashfs
653 $(call BuildFirmware
/CustomFlash
/$(1),$(1),$(2)-8M
,$(3)-8M
,$(vocore_8mb_mtd_size
))
654 $(call BuildFirmware
/CustomFlash
/$(1),$(1),$(2)-16M
,$(3)-16M
,$(vocore_16mb_mtd_size
))
656 define BuildFirmware
/VOCORE
/initramfs
657 $(call BuildFirmware
/OF
/initramfs
,$(1),$(2)-8M
,$(3)-8M
)
658 $(call BuildFirmware
/OF
/initramfs
,$(1),$(2)-16M
,$(3)-16M
)
660 Image
/Build
/Profile
/VOCORE
=$(call BuildFirmware
/VOCORE
/$(1),$(1),vocore
,VOCORE
)
662 Image
/Build
/Profile
/W150M
=$(call BuildFirmware
/CustomFlashFactory
/$(1),$(1),w150m
,W150M
,$(ralink_default_fw_size_4M
),W150M Kernel Image
,factory
)
664 Image
/Build
/Profile
/W306R_V20
=$(call BuildFirmware
/CustomFlashFactory
/$(1),$(1),w306r-v20
,W306R_V20
,$(ralink_default_fw_size_4M
),linkn Kernel Image
,factory
)
666 Image
/Build
/Profile
/W502U
=$(call BuildFirmware
/Default8M
/$(1),$(1),w502u
,W502U
)
668 Image
/Build
/Profile
/WCR150GN
=$(call BuildFirmware
/Default4M
/$(1),$(1),wcr150gn
,WCR150GN
)
670 Image
/Build
/Profile
/MZK-DP150N
=$(call BuildFirmware
/Default4M
/$(1),$(1),mzk-dp150n
,MZK-DP150N
)
672 buffalo_whrg300n_mtd_size
=3801088
673 define BuildFirmware
/WHRG300N
/squashfs
674 $(call BuildFirmware
/Default4M
/$(1),$(1),whr-g300n
,WHR-G300N
)
675 # the following line has a bad argument 3 ... the old Makefile was already broken
676 $(call BuildFirmware
/Buffalo
,$(1),whr-g300n
,whr-g300n
)
677 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
679 echo
-n
-e
"# Airstation FirmWare\nrun u_fw\nreset\n\n" | \
680 dd bs
=512 count
=1 conv
=sync
; \
681 dd if
=$(call sysupname
,$(1),whr-g300n
); \
682 ) > $(KDIR
)/whr-g300n-tftp.tmp
&& \
683 buffalo-tftp
-i
$(KDIR
)/whr-g300n-tftp.tmp \
684 -o
$(call imgname
,$(1),whr-g300n
)-tftp.bin
; \
687 BuildFirmware
/WHRG300N
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),whr-g300n
,WHR-G300N
)
688 Image
/Build
/Profile
/WHRG300N
=$(call BuildFirmware
/WHRG300N
/$(1),$(1))
690 Image
/Build
/Profile
/WIZARD8800
=$(call BuildFirmware
/Default8M
/$(1),$(1),wizard-8800
,WIZARD8800
,Linux Kernel Image
)
692 Image
/Build
/Profile
/WIZFI630A
=$(call BuildFirmware
/Default16M
/$(1),$(1),wizfi630a
,WIZFI630A
)
694 Image
/Build
/Profile
/WL-330N
=$(call BuildFirmware
/Default4M
/$(1),$(1),wl-330n
,WL-330N
)
696 Image
/Build
/Profile
/WL-330N3G
=$(call BuildFirmware
/Default4M
/$(1),$(1),wl-330n3g
,WL-330N3G
)
698 kernel_size_wl341v3
=917504
699 rootfs_size_wl341v3
=2949120
700 define BuildFirmware
/WL-341V3
/squashfs
701 $(call BuildFirmware
/Default4M
/$(1),$(1),wl-341v3
,WL-341V3
)
702 # This code looks broken and really needs to be converted to C
703 if
[ -e
"$(call sysupname,$(1),$(2))" ]; then \
705 dd if
=/dev
/zero bs
=195936 count
=1; \
707 dd if
=/dev
/zero bs
=581 count
=1; \
708 echo
-n
-e
"\x73\x45\x72\x43\x6F\x4D\x6D\x00\x01\x00\x00\x59\x4E\x37\x95\x58\x10\x00\x20\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x03\x00\x00\x80\x00\x00\x00\x00\x03\x00\x00\x10\x12\x00\x00\x00\x10\x73\x45\x72\x43\x6F\x4D\x6D"; \
709 dd if
=/dev
/zero bs
=65552 count
=1; \
710 dd if
=$(KDIR
)/vmlinux-
$(2).uImage bs
=$(kernel_size_wl341v3
) conv
=sync
; \
711 dd if
=$(KDIR
)/root.
$(1) bs
=64k conv
=sync
; \
712 dd if
=/dev
/zero bs
=`expr 4194304 - 262144 - 16 - $(kernel_size_wl341v3) - \( \( \( \`stat
-c
%s
$(KDIR
)/root.
$(1)\
` / 65536 \) + 1 \) \* 65536 \)` count
=1; \
713 echo
-n
-e
"\x11\x03\x80\x00\x10\x12\x90\xF7\x65\x52\x63\x4F\x6D\x4D\x00\x00"; \
714 ) > $(call imgname
,$(1),$(2))-factory.bin
; \
717 BuildFirmware
/WL-341V3
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),wl-341v3
,WL-341V3
)
718 Image
/Build
/Profile
/WL-341V3
=$(call BuildFirmware
/WL-341V3
/$(1),$(1))
720 Image
/Build
/Profile
/WL-351
=$(call BuildFirmware
/Default4M
/$(1),$(1),wl-351
,WL-351
)
722 define BuildFirmware
/WNCE2001
/squashfs
723 $(call BuildFirmware
/Default4M
/$(1),$(1),$(2),$(3))
724 -mkdapimg
-s RT3052-AP-WNCE2001-3
-r WW
-v
1.0.0.99 \
725 -i
$(call sysupname
,$(1),$(2)) \
726 -o
$(call imgname
,$(1),$(2))-factory-worldwide.bin
727 -mkdapimg
-s RT3052-AP-WNCE2001-3
-r NA
-v
1.0.0.99 \
728 -i
$(call sysupname
,$(1),$(2)) \
729 -o
$(call imgname
,$(1),$(2))-factory-northamerica.bin
731 BuildFirmware
/WNCE2001
/initramfs
=$(call BuildFirmware
/OF
/initramfs
,$(1),$(2),$(3))
732 Image
/Build
/Profile
/WNCE2001
=$(call BuildFirmware
/WNCE2001
/$(1),$(1),wnce2001
,WNCE2001
)
734 Image
/Build
/Profile
/WR512-3GN
=$(call BuildFirmware
/DefaultDualSize
/$(1),$(1),wr512-3ng
,WR512-3GN
)
736 Image
/Build
/Profile
/WT1520
=$(call BuildFirmware
/PorayDualSize
/$(1),$(1),wt1520
,WT1520
)
738 Image
/Build
/Profile
/UR-326N4G
=$(call BuildFirmware
/Default4M
/$(1),$(1),ur-326n4g
,UR-326N4G
)
740 Image
/Build
/Profile
/UR-336UN
=$(call BuildFirmware
/Default8M
/$(1),$(1),ur-336un
,UR-336UN
)
742 Image
/Build
/Profile
/WR6202
=$(call BuildFirmware
/Default8M
/$(1),$(1),wr6202
,WR6202
)
744 Image
/Build
/Profile
/X5
=$(call BuildFirmware
/Poray8M
/$(1),$(1),x5
,X5
)
746 Image
/Build
/Profile
/X8
=$(call BuildFirmware
/Poray8M
/$(1),$(1),x8
,X8
)
748 Image
/Build
/Profile
/XDXRN502J
=$(call BuildFirmware
/Default4M
/$(1),$(1),xdxrn502j
,XDXRN502J
)
750 ifeq ($(SUBTARGET
),rt305x
)
751 define Image
/Build
/Profile
/Default
752 $(call Image
/Build
/Profile
/3G6200N
,$(1))
753 $(call Image
/Build
/Profile
/3G6200NL
,$(1))
754 $(call Image
/Build
/Profile
/3G150B
,$(1))
755 $(call Image
/Build
/Profile
/3G300M
,$(1))
756 $(call Image
/Build
/Profile
/A5-V11
,$(1))
757 $(call Image
/Build
/Profile
/AIR3GII
,$(1))
758 $(call Image
/Build
/Profile
/ALL02393G
,$(1))
759 $(call Image
/Build
/Profile
/ALL0256N
,$(1))
760 $(call Image
/Build
/Profile
/ALL5002
,$(1))
761 $(call Image
/Build
/Profile
/ALL5003
,$(1))
762 $(call Image
/Build
/Profile
/ASL26555
,$(1))
763 $(call Image
/Build
/Profile
/ATP-52B
,$(1))
764 $(call Image
/Build
/Profile
/AWM002EVB
,$(1))
765 $(call Image
/Build
/Profile
/AWAPN2403
,$(1))
766 $(call Image
/Build
/Profile
/BC2
,$(1))
767 $(call Image
/Build
/Profile
/BROADWAY
,$(1))
768 $(call Image
/Build
/Profile
/CARAMBOLA
,$(1))
769 $(call Image
/Build
/Profile
/D105
,$(1))
770 $(call Image
/Build
/Profile
/DIR-300-B1
,$(1))
771 $(call Image
/Build
/Profile
/DIR-600-B1
,$(1))
772 $(call Image
/Build
/Profile
/DIR-300-B7
,$(1))
773 $(call Image
/Build
/Profile
/DIR-320-B1
,$(1))
774 $(call Image
/Build
/Profile
/DIR-600-B2
,$(1))
775 $(call Image
/Build
/Profile
/DIR610A1
,$(1))
776 $(call Image
/Build
/Profile
/DIR-615-D
,$(1))
777 $(call Image
/Build
/Profile
/DIR-620-A1
,$(1))
778 $(call Image
/Build
/Profile
/DIR-620-D1
,$(1))
779 $(call Image
/Build
/Profile
/DIR615H1
,$(1))
780 $(call Image
/Build
/Profile
/DAP1350
,$(1))
781 $(call Image
/Build
/Profile
/DAP1350WW
,$(1))
782 $(call Image
/Build
/Profile
/DCS930
,$(1))
783 $(call Image
/Build
/Profile
/DCS930LB1
,$(1))
784 $(call Image
/Build
/Profile
/ESR-9753
,$(1))
785 $(call Image
/Build
/Profile
/F7C027
,$(1))
786 $(call Image
/Build
/Profile
/F5D8235V2
,$(1))
787 $(call Image
/Build
/Profile
/FONERA20N
,$(1))
788 $(call Image
/Build
/Profile
/FREESTATION5
,$(1))
789 # $(call Image/Build/Profile/HG255D,$(1))
790 $(call Image
/Build
/Profile
/HLKRM04
,$(1))
791 $(call Image
/Build
/Profile
/HT-TM02
,$(1))
792 $(call Image
/Build
/Profile
/HW550-3G
,$(1))
793 $(call Image
/Build
/Profile
/IP2202
,$(1))
794 $(call Image
/Build
/Profile
/M2M
,$(1))
795 $(call Image
/Build
/Profile
/M3
,$(1))
796 $(call Image
/Build
/Profile
/M4
,$(1))
797 $(call Image
/Build
/Profile
/MOFI3500-3GN
,$(1))
798 $(call Image
/Build
/Profile
/MR102N
,$(1))
799 $(call Image
/Build
/Profile
/MPRA1
,$(1))
800 $(call Image
/Build
/Profile
/MPRA2
,$(1))
801 $(call Image
/Build
/Profile
/MZKW300NH2
,$(1))
802 $(call Image
/Build
/Profile
/NBG-419N
,$(1))
803 $(call Image
/Build
/Profile
/NCS601W
,$(1))
804 $(call Image
/Build
/Profile
/NW718
,$(1))
805 $(call Image
/Build
/Profile
/MINIEMBWIFI
,$(1))
806 $(call Image
/Build
/Profile
/MINIEMBPLUG
,$(1))
807 $(call Image
/Build
/Profile
/PSR-680W
,$(1))
808 $(call Image
/Build
/Profile
/PWH2004
,$(1))
809 $(call Image
/Build
/Profile
/PX-4885
,$(1))
810 $(call Image
/Build
/Profile
/RT5350F-OLINUXINO
,$(1))
811 $(call Image
/Build
/Profile
/RT5350F-OLINUXINO-EVB
,$(1))
812 $(call Image
/Build
/Profile
/RTG32B1
,$(1))
813 $(call Image
/Build
/Profile
/RTN10PLUS
,$(1))
814 $(call Image
/Build
/Profile
/RT-N13U
,$(1))
815 $(call Image
/Build
/Profile
/RUT5XX
,$(1))
816 $(call Image
/Build
/Profile
/SL-R7205
,$(1))
817 $(call Image
/Build
/Profile
/UR-326N4G
,$(1))
818 $(call Image
/Build
/Profile
/V22RW-2X2
,$(1))
819 $(call Image
/Build
/Profile
/VOCORE
,$(1))
820 $(call Image
/Build
/Profile
/W150M
,$(1))
821 $(call Image
/Build
/Profile
/W306R_V20
,$(1))
822 $(call Image
/Build
/Profile
/W502U
,$(1))
823 $(call Image
/Build
/Profile
/WCR150GN
,$(1))
824 $(call Image
/Build
/Profile
/WHRG300N
,$(1))
825 $(call Image
/Build
/Profile
/WIZARD8800
,$(1))
826 $(call Image
/Build
/Profile
/WIZFI630A
,$(1))
827 $(call Image
/Build
/Profile
/WL-330N
,$(1))
828 $(call Image
/Build
/Profile
/WL-330N3G
,$(1))
829 $(call Image
/Build
/Profile
/WL-341V3
,$(1))
830 $(call Image
/Build
/Profile
/WL-351
,$(1))
831 $(call Image
/Build
/Profile
/WNCE2001
,$(1))
832 $(call Image
/Build
/Profile
/WR512-3GN
,$(1))
833 $(call Image
/Build
/Profile
/WR6202
,$(1))
834 $(call Image
/Build
/Profile
/WT1520
,$(1))
835 $(call Image
/Build
/Profile
/X5
,$(1))
836 $(call Image
/Build
/Profile
/X8
,$(1))
837 $(call Image
/Build
/Profile
/XDXRN502J
,$(1))
838 $(call Image
/Build
/Profile
/MZK-DP150N
,$(1))
846 # RT3662/RT3883 Profiles
849 # $(1) = squashfs/initramfs
850 # $(2) = lowercase board name
856 # $(8) = flash address
857 # $(9) = start address
858 define BuildFirmware
/EdimaxCombined
/squashfs
859 $(call PatchKernelLzmaDtb
,$(2),$(3))
860 $(call MkImage
,lzma
,$(KDIR
)/vmlinux-
$(2).bin.lzma
,$(KDIR
)/vmlinux-
$(2).bin.uImage
)
861 if
[ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.uImage"` -gt
`expr $(4) - 20` ]; then \
862 echo
"Warning: $(KDIR)/vmlinux-$(2).bin.uImage is too big" >&2; \
864 else if
[ `stat -c%s "$(KDIR)/root.$(1)"` -gt
$(5) ]; then \
865 echo
"Warning: $(KDIR)/root.$(1) is too big" >&2; \
868 ( dd if
=$(KDIR
)/vmlinux-
$(2).bin.uImage bs
=`expr $(4) - 20` conv
=sync
; dd if
=$(KDIR
)/root.
$(1) ) > $(KDIR
)/vmlinux-
$(2).bin.uImage.combined
; \
870 mkedimaximg
-i
"$(KDIR)/vmlinux-$(2).bin.uImage.combined" \
871 -o
$(call imgname
,$(1),$(2)).bin \
872 -s
$(6) -m
$(7) -f
$(8) -S
$(9)
875 Image
/Build
/Profile
/CYSWR1100
=$(call BuildFirmware
/Seama
/$(1),$(1),cy-swr1100
,CY-SWR1100
,wrgnd10_samsung_ss815
,$(ralink_default_fw_size_8M
))
877 Image
/Build
/Profile
/DIR645
=$(call BuildFirmware
/Seama
/$(1),$(1),dir-645
,DIR-645
,wrgn39_dlob.hans_dir645
,$(ralink_default_fw_size_8M
))
879 hpm_mtd_size
=16449536
880 Image
/Build
/Profile
/HPM
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),hpm
,HPM
,$(hpm_mtd_size
))
882 define BuildFirmware
/RTN56U
/squashfs
883 $(call BuildFirmware
/Default8M
/$(1),$(1),rt-n56u
,RT-N56U
)
884 -mkrtn56uimg
-s
$(call sysupname
,$(1),rt-n56u
)
885 -cp
$(call sysupname
,$(1),rt-n56u
) $(call imgname
,$(1),rt-n56u
)-factory.bin
886 -mkrtn56uimg
-f
$(call imgname
,$(1),rt-n56u
)-factory.bin
888 Image
/Build
/Profile
/RTN56U
=$(call BuildFirmware
/RTN56U
/$(1),$(1),rt-n56u
,RT-N56U
)
890 Image
/Build
/Profile
/TEW691GR
=$(call BuildFirmware
/UMedia
/$(1),$(1),tew-691gr
,TEW-691GR
,0x026910)
892 Image
/Build
/Profile
/TEW692GR
=$(call BuildFirmware
/UMedia
/$(1),$(1),tew-692gr
,TEW-692GR
,0x026920)
894 kernel_size_BR6475ND
:=2097152
895 rootfs_size_BR6475ND
:=5832704
896 Image
/Build
/Profile
/BR6475ND
=$(call BuildFirmware
/EdimaxCombined
/$(1),$(1),br-6475nd
,BR-6475ND
,$(kernel_size_BR6475ND
),$(rootfs_size_BR6475ND
),CSYS
,RN54
,0x70000,0x01100000)
898 ifeq ($(SUBTARGET
),rt3883
)
899 define Image
/Build
/Profile
/Default
900 $(call Image
/Build
/Profile
/CYSWR1100
,$(1))
901 $(call Image
/Build
/Profile
/DIR645
,$(1))
902 $(call Image
/Build
/Profile
/HPM
,$(1))
903 $(call Image
/Build
/Profile
/RTN56U
,$(1))
904 $(call Image
/Build
/Profile
/BR6475ND
,$(1))
905 $(call Image
/Build
/Profile
/TEW691GR
,$(1))
906 $(call Image
/Build
/Profile
/TEW692GR
,$(1))
914 Image
/Build
/Profile
/E1700
=$(call BuildFirmware
/UMedia
/$(1),$(1),e1700
,E1700
,0x013326)
915 Image
/Build
/Profile
/MT7620a
=$(call BuildFirmware
/Default8M
/$(1),$(1),mt7620a
,MT7620a
)
916 Image
/Build
/Profile
/MT7620a_MT7610e
=$(call BuildFirmware
/Default8M
/$(1),$(1),mt7620a_mt7610e
,MT7620a_MT7610e
)
917 Image
/Build
/Profile
/MT7620a_MT7530
=$(call BuildFirmware
/Default8M
/$(1),$(1),mt7620a_mt7530
,MT7620a_MT7530
)
918 Image
/Build
/Profile
/MT7620a_V22SG
=$(call BuildFirmware
/Default8M
/$(1),$(1),mt7620a_v22sg
,MT7620a_V22SG
)
919 br100_mtd_size
=8126464
920 Image
/Build
/Profile
/AI-BR100
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),ai-br100
,AI-BR100
,$(br100_mtd_size
),Ai-BR
)
921 Image
/Build
/Profile
/RP-N53
=$(call BuildFirmware
/Default8M
/$(1),$(1),rp-n53
,RP-N53
)
922 whr_300hp2_mtd_size
=7012352
923 Image
/Build
/Profile
/WHR300HP2
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),whr-300hp2
,WHR-300HP2
,$(whr_300hp2_mtd_size
))
924 Image
/Build
/Profile
/WHR600D
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),whr-600d
,WHR-600D
,$(whr_300hp2_mtd_size
))
925 whr_1166d_mtd_size
=15400960
926 Image
/Build
/Profile
/WHR1166D
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),whr-1166d
,WHR-1166D
,$(whr_1166d_mtd_size
))
927 dlink810l_mtd_size
=6881280
928 Image
/Build
/Profile
/CF-WR800N
=$(call BuildFirmware
/Default8M
/$(1),$(1),cf-wr800n
,CF-WR800N
)
929 Image
/Build
/Profile
/DIR-810L
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),dir-810l
,DIR-810L
,$(dlink810l_mtd_size
))
930 na930_mtd_size
=20971520
931 Image
/Build
/Profile
/NA930
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),na930
,NA930
,$(na930_mtd_size
))
932 Image
/Build
/Profile
/DB-WRT01
=$(call BuildFirmware
/Default8M
/$(1),$(1),db-wrt01
,DB-WRT01
)
933 Image
/Build
/Profile
/MZK-750DHP
=$(call BuildFirmware
/Default8M
/$(1),$(1),mzk-750dhp
,MZK-750DHP
)
934 Image
/Build
/Profile
/HC5661
=$(call BuildFirmware
/Default16M
/$(1),$(1),hc5661
,HC5661
)
935 Image
/Build
/Profile
/HC5761
=$(call BuildFirmware
/Default16M
/$(1),$(1),hc5761
,HC5761
)
936 Image
/Build
/Profile
/HC5861
=$(call BuildFirmware
/Default16M
/$(1),$(1),hc5861
,HC5861
)
937 Image
/Build
/Profile
/OY-0001
=$(call BuildFirmware
/Default16M
/$(1),$(1),oy-0001
,OY-0001
)
938 Image
/Build
/Profile
/Y1
=$(call BuildFirmware
/Default16M
/$(1),$(1),y1
,Y1
)
939 Image
/Build
/Profile
/Y1S
=$(call BuildFirmware
/Default16M
/$(1),$(1),y1s
,Y1S
)
940 Image
/Build
/Profile
/MLW221
=$(call BuildFirmware
/Default16M
/$(1),$(1),mlw221
,MLW221
)
941 Image
/Build
/Profile
/MLWG2
=$(call BuildFirmware
/Default16M
/$(1),$(1),mlwg2
,MLWG2
)
942 Image
/Build
/Profile
/WMR-300
=$(call BuildFirmware
/Default8M
/$(1),$(1),wmr-300
,WMR-300
)
943 Image
/Build
/Profile
/RT-N14U
=$(call BuildFirmware
/Default8M
/$(1),$(1),rt-n14u
,RT-N14U
)
944 Image
/Build
/Profile
/WRTNODE
=$(call BuildFirmware
/Default16M
/$(1),$(1),wrtnode
,WRTNODE
)
945 Image
/Build
/Profile
/WT3020
=$(call BuildFirmware
/PorayDualSize
/$(1),$(1),wt3020
,WT3020
)
946 Image
/Build
/Profile
/MIWIFI-MINI
=$(call BuildFirmware
/Default16M
/$(1),$(1),miwifi-mini
,MIWIFI-MINI
)
947 Image
/Build
/Profile
/ZTE-Q7
=$(call BuildFirmware
/Default8M
/$(1),$(1),zte-q7
,ZTE-Q7
)
948 Image
/Build
/Profile
/YOUKU-YK1
=$(call BuildFirmware
/Default16M
/$(1),$(1),youku-yk1
,YOUKU-YK1
)
949 Image
/Build
/Profile
/ZBT-WA05
=$(call BuildFirmware
/Default8M
/$(1),$(1),zbt-wa05
,ZBT-WA05
)
950 Image
/Build
/Profile
/ZBT-WR8305RT
=$(call BuildFirmware
/Default8M
/$(1),$(1),zbt-wr8305rt
,ZBT-WR8305RT
)
951 Image
/Build
/Profile
/ArcherC20i
=$(call BuildFirmware
/Tplink
/$(1),$(1),ArcherC20i
,ArcherC20i
)
952 microwrt_mtd_size
=16515072
953 Image
/Build
/Profile
/MicroWRT
=$(call BuildFirmware
/CustomFlash
/$(1),$(1),microwrt
,MicroWRT
,$(microwrt_mtd_size
))
954 Image
/Build
/Profile
/TINY-AC
=$(call BuildFirmware
/Default8M
/$(1),$(1),tiny-ac
,TINY-AC
)
957 ifeq ($(SUBTARGET
),mt7620
)
958 define Image
/Build
/Profile
/Default
959 $(call Image
/Build
/Profile
/E1700
,$(1))
960 $(call Image
/Build
/Profile
/MT7620a
,$(1))
961 $(call Image
/Build
/Profile
/MT7620a_MT7610e
,$(1))
962 $(call Image
/Build
/Profile
/MT7620a_MT7530
,$(1))
963 $(call Image
/Build
/Profile
/MT7620a_V22SG
,$(1))
964 $(call Image
/Build
/Profile
/AI-BR100
,$(1))
965 $(call Image
/Build
/Profile
/CF-WR800N
,$(1))
966 $(call Image
/Build
/Profile
/RP-N53
,$(1))
967 $(call Image
/Build
/Profile
/DIR-810L
,$(1))
968 $(call Image
/Build
/Profile
/WHR300HP2
,$(1))
969 $(call Image
/Build
/Profile
/WHR600D
,$(1))
970 $(call Image
/Build
/Profile
/WHR1166D
,$(1))
971 $(call Image
/Build
/Profile
/DB-WRT01
,$(1))
972 $(call Image
/Build
/Profile
/MZK-750DHP
,$(1))
973 $(call Image
/Build
/Profile
/NA930
,$(1))
974 $(call Image
/Build
/Profile
/HC5661
,$(1))
975 $(call Image
/Build
/Profile
/HC5761
,$(1))
976 $(call Image
/Build
/Profile
/HC5861
,$(1))
977 $(call Image
/Build
/Profile
/OY-0001
,$(1))
978 $(call Image
/Build
/Profile
/Y1
,$(1))
979 $(call Image
/Build
/Profile
/Y1S
,$(1))
980 $(call Image
/Build
/Profile
/MLW221
,$(1))
981 $(call Image
/Build
/Profile
/MLWG2
,$(1))
982 $(call Image
/Build
/Profile
/WMR-300
,$(1))
983 $(call Image
/Build
/Profile
/RT-N14U
,$(1))
984 $(call Image
/Build
/Profile
/WRTNODE
,$(1))
985 $(call Image
/Build
/Profile
/WT3020
,$(1))
986 $(call Image
/Build
/Profile
/MIWIFI-MINI
,$(1))
987 $(call Image
/Build
/Profile
/ZTE-Q7
,$(1))
988 $(call Image
/Build
/Profile
/YOUKU-YK1
,$(1))
989 $(call Image
/Build
/Profile
/ZBT-WA05
,$(1))
990 $(call Image
/Build
/Profile
/ZBT-WR8305RT
,$(1))
991 $(call Image
/Build
/Profile
/ArcherC20i
,$(1))
992 $(call Image
/Build
/Profile
/MicroWRT
,$(1))
993 $(call Image
/Build
/Profile
/TINY-AC
,$(1))
1001 ifeq ($(SUBTARGET
),mt7621
)
1002 TARGET_DEVICES
+= mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500 sap-g3200u3 ubnt-erx witi wf-2881 zbt-wg2626
1005 define Device
/mt7621
1007 IMAGE_SIZE
:= $(ralink_default_fw_size_4M
)
1010 define Device
/wsr-600
1014 define Device
/re6500
1018 define Device
/wsr-1166
1020 IMAGE
/sysupgrade.bin
:= trx | pad-rootfs
1023 define Device
/dir-860l-b1
1025 IMAGES
+= factory.bin
1026 KERNEL
:= kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma
1027 IMAGE
/sysupgrade.bin
:= \
1028 append-kernel | pad-offset
65536 64 | append-rootfs | \
1029 seama
-m
"dev=/dev/mtdblock/2" -m
"type=firmware" | \
1030 pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
1031 IMAGE
/factory.bin
:= \
1032 append-kernel | pad-offset
65536 64 | append-rootfs | pad-rootfs
-x
64 | \
1033 seama
-m
"dev=/dev/mtdblock/2" -m
"type=firmware" | \
1034 check-size
$$$$(IMAGE_SIZE
) | \
1035 seama-seal
-m
"signature=wrgac13_dlink.2013gui_dir860lb"
1038 define Device
/firewrt
1040 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
1043 define Device
/pbr-m1
1045 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
1048 define Device
/sap-g3200u3
1054 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
1057 define Device
/zbt-wg2626
1059 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
1062 define Device
/wf-2881
1066 KERNEL_SIZE
:= 2097152
1067 FILESYSTEMS
:= squashfs
1068 IMAGE
/sysupgrade.bin
:= append-kernel | pad-to
$$(KERNEL_SIZE
) | append-ubi | check-size
$$$$(IMAGE_SIZE
)
1071 define Device
/ubnt-erx
1073 FILESYSTEMS
:= squashfs
1074 KERNEL_SIZE
:= 3145728
1075 KERNEL
:= $(KERNEL_DTB
) | uImage lzma
1076 IMAGES
:= sysupgrade.
tar factory-initramfs.
tar
1077 IMAGE
/factory-initramfs.
tar := ubnt-erx-factory-compat | \
1078 ubnt-erx-factory-kernel | \
1079 ubnt-erx-factory-rootfs | \
1080 ubnt-erx-factory-version | \
1081 ubnt-erx-factory-check-size
$$$$(KERNEL_SIZE
)
1082 IMAGE
/sysupgrade.
tar := sysupgrade-nand
1089 Image
/Build
/Profile
/MT7628
=$(call BuildFirmware
/Default4M
/$(1),$(1),mt7628
,MT7628
)
1091 ifeq ($(SUBTARGET
),mt7628
)
1092 define Image
/Build
/Profile
/Default
1093 $(call Image
/Build
/Profile
/MT7628
,$(1))
1102 Image
/Build
/Profile
/mt7688
=$(call BuildFirmware
/Default16M
/$(1),$(1),mt7688
,MT7688
)
1103 Image
/Build
/Profile
/LinkIt7688
=$(call BuildFirmware
/Default32M
/$(1),$(1),LinkIt7688
,LINKIT7688
)
1105 ifeq ($(SUBTARGET
),mt7688
)
1106 define Image
/Build
/Profile
/Default
1107 $(call Image
/Build
/Profile
/mt7688
,$(1))
1108 $(call Image
/Build
/Profile
/LinkIt7688
,$(1))
1113 ifndef TARGET_DEVICES
1115 # Generic Targets - only needed for legacy image building code
1117 define Image
/BuildKernel
1118 cp
$(KDIR
)/vmlinux.elf
$(BIN_DIR
)/$(VMLINUX
).elf
1119 cp
$(KDIR
)/vmlinux
$(BIN_DIR
)/$(VMLINUX
).bin
1120 $(call CompressLzma
,$(KDIR
)/vmlinux
,$(KDIR
)/vmlinux.bin.lzma
)
1121 $(call MkImage
,lzma
,$(KDIR
)/vmlinux.bin.lzma
,$(KDIR
)/uImage.lzma
)
1122 cp
$(KDIR
)/uImage.lzma
$(BIN_DIR
)/$(UIMAGE
).bin
1125 define Image
/BuildKernel
/Initramfs
1126 cp
$(KDIR
)/vmlinux-initramfs.elf
$(BIN_DIR
)/$(VMLINUX
)-initramfs.elf
1127 cp
$(KDIR
)/vmlinux-initramfs
$(BIN_DIR
)/$(VMLINUX
)-initramfs.bin
1128 $(call CompressLzma
,$(KDIR
)/vmlinux-initramfs
,$(KDIR
)/vmlinux-initramfs.bin.lzma
)
1129 $(call MkImage
,lzma
,$(KDIR
)/vmlinux-initramfs.bin.lzma
,$(KDIR
)/uImage-initramfs.lzma
)
1130 cp
$(KDIR
)/uImage-initramfs.lzma
$(BIN_DIR
)/$(UIMAGE
)-initramfs.bin
1131 $(call Image
/Build
/Initramfs
)
1135 $(call Image
/Build
/$(1))
1136 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) bs
=128k conv
=sync
1137 $(call Image
/Build
/Profile
/$(PROFILE
),$(1))
1141 ifeq ($(SUBTARGET
),mt7621
)
1142 define Image
/Prepare
1143 #define Build/Compile
1144 rm -rf
$(KDIR
)/relocate
1145 $(CP
) ..
/..
/generic
/image
/relocate
$(KDIR
)
1146 $(MAKE
) -C
$(KDIR
)/relocate KERNEL_ADDR
=$(KERNEL_LOADADDR
) CROSS_COMPILE
=$(TARGET_CROSS
)
1147 $(CP
) $(KDIR
)/relocate
/loader.bin
$(KDIR
)/loader.bin
1151 $(eval
$(call BuildImage
))