build: store firmware images in $(KDIR)/tmp - prevents them from being included in...
[openwrt/openwrt.git] / include / image.mk
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 override TARGET_BUILD=
9 include $(INCLUDE_DIR)/prereq.mk
10 include $(INCLUDE_DIR)/kernel.mk
11 include $(INCLUDE_DIR)/host.mk
12 include $(INCLUDE_DIR)/version.mk
13
14 override MAKE:=$(_SINGLE)$(SUBMAKE)
15 override NO_TRACE_MAKE:=$(_SINGLE)$(NO_TRACE_MAKE)
16
17 KDIR=$(KERNEL_BUILD_DIR)
18 DTS_DIR:=$(LINUX_DIR)/arch/$(ARCH)/boot/dts/
19
20 IMG_PREFIX:=openwrt-$(if $(CONFIG_VERSION_FILENAMES),$(VERSION_NUMBER)-)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
21
22 MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt
23
24 ifneq ($(CONFIG_BIG_ENDIAN),)
25 JFFS2OPTS := --big-endian --squash-uids -v
26 else
27 JFFS2OPTS := --little-endian --squash-uids -v
28 endif
29
30 ifeq ($(CONFIG_JFFS2_RTIME),y)
31 JFFS2OPTS += -X rtime
32 endif
33 ifeq ($(CONFIG_JFFS2_ZLIB),y)
34 JFFS2OPTS += -X zlib
35 endif
36 ifeq ($(CONFIG_JFFS2_LZMA),y)
37 JFFS2OPTS += -X lzma --compression-mode=size
38 endif
39 ifneq ($(CONFIG_JFFS2_RTIME),y)
40 JFFS2OPTS += -x rtime
41 endif
42 ifneq ($(CONFIG_JFFS2_ZLIB),y)
43 JFFS2OPTS += -x zlib
44 endif
45 ifneq ($(CONFIG_JFFS2_LZMA),y)
46 JFFS2OPTS += -x lzma
47 endif
48
49 JFFS2OPTS += $(MKFS_DEVTABLE_OPT)
50
51 SQUASHFS_BLOCKSIZE := $(CONFIG_TARGET_SQUASHFS_BLOCK_SIZE)k
52 SQUASHFSOPT := -b $(SQUASHFS_BLOCKSIZE)
53 SQUASHFSOPT += -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1'
54 SQUASHFSCOMP := gzip
55 LZMA_XZ_OPTIONS := -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2
56 ifeq ($(CONFIG_SQUASHFS_LZMA),y)
57 SQUASHFSCOMP := lzma $(LZMA_XZ_OPTIONS)
58 endif
59 ifeq ($(CONFIG_SQUASHFS_XZ),y)
60 ifneq ($(filter arm x86 powerpc sparc,$(LINUX_KARCH)),)
61 BCJ_FILTER:=-Xbcj $(LINUX_KARCH)
62 endif
63 SQUASHFSCOMP := xz $(LZMA_XZ_OPTIONS) $(BCJ_FILTER)
64 endif
65
66 JFFS2_BLOCKSIZE ?= 64k 128k
67
68 fs-types-$(CONFIG_TARGET_ROOTFS_SQUASHFS) += squashfs
69 fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addprefix jffs2-,$(JFFS2_BLOCKSIZE))
70 fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2_NAND) += $(addprefix jffs2-nand-,$(NAND_BLOCKSIZE))
71 fs-types-$(CONFIG_TARGET_ROOTFS_EXT4FS) += ext4
72 fs-types-$(CONFIG_TARGET_ROOTFS_ISO) += iso
73 fs-subtypes-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addsuffix -raw,$(addprefix jffs2-,$(JFFS2_BLOCKSIZE)))
74 fs-subtypes-$(CONFIG_TARGET_ROOTFS_CPIOGZ) += cpiogz
75 fs-subtypes-$(CONFIG_TARGET_ROOTFS_TARGZ) += targz
76
77 TARGET_FILESYSTEMS := $(fs-types-y)
78
79 FS_64K := $(filter-out jffs2-%,$(TARGET_FILESYSTEMS)) jffs2-64k
80 FS_128K := $(filter-out jffs2-%,$(TARGET_FILESYSTEMS)) jffs2-128k
81 FS_256K := $(filter-out jffs2-%,$(TARGET_FILESYSTEMS)) jffs2-256k
82
83 define add_jffs2_mark
84 echo -ne '\xde\xad\xc0\xde' >> $(1)
85 endef
86
87 define toupper
88 $(shell echo $(1) | tr '[:lower:]' '[:upper:]')
89 endef
90
91 define split_args
92 $(foreach data, \
93 $(subst |,$(space),\
94 $(subst $(space),^,$(1))), \
95 $(call $(2),$(strip $(subst ^,$(space),$(data)))))
96 endef
97
98 define build_cmd
99 $(if $(Build/$(word 1,$(1))),,$(error Missing Build/$(word 1,$(1))))
100 $(call Build/$(word 1,$(1)),$(wordlist 2,$(words $(1)),$(1)))
101
102 endef
103
104 define concat_cmd
105 $(call split_args,$(1),build_cmd)
106 endef
107
108 # pad to 4k, 8k, 16k, 64k, 128k, 256k and add jffs2 end-of-filesystem mark
109 define prepare_generic_squashfs
110 $(STAGING_DIR_HOST)/bin/padjffs2 $(1) 4 8 16 64 128 256
111 endef
112
113 define Image/BuildKernel/Initramfs
114 $(call Image/Build/Initramfs)
115 endef
116
117 define Image/BuildKernel/MkuImage
118 mkimage -A $(ARCH) -O linux -T kernel -C $(1) -a $(2) -e $(3) \
119 -n '$(call toupper,$(ARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $(4) $(5)
120 endef
121
122 define Image/BuildKernel/MkFIT
123 $(TOPDIR)/scripts/mkits.sh \
124 -D $(1) -o $(KDIR)/fit-$(1).its -k $(2) $(if $(3),-d $(3)) -C $(4) -a $(5) -e $(6) \
125 -A $(ARCH) -v $(LINUX_VERSION)
126 PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its $(KDIR)/fit-$(1)$(7).itb
127 endef
128
129 define Image/mkfs/jffs2/sub
130 $(STAGING_DIR_HOST)/bin/mkfs.jffs2 $(3) --pad -e $(patsubst %k,%KiB,$(1)) -o $(KDIR)/root.jffs2-$(2) -d $(TARGET_DIR) -v 2>&1 1>/dev/null | awk '/^.+$$$$/'
131 $(call add_jffs2_mark,$(KDIR)/root.jffs2-$(2))
132 endef
133
134 define Image/mkfs/jffs2/sub-raw
135 $(STAGING_DIR_HOST)/bin/mkfs.jffs2 $(3) -e $(patsubst %k,%KiB,$(1)) -o $(KDIR)/root.jffs2-$(2)-raw -d $(TARGET_DIR) -v 2>&1 1>/dev/null | awk '/^.+$$$$/'
136 endef
137
138 define Image/mkfs/jffs2/template
139 Image/mkfs/jffs2-$(1) = $$(call Image/mkfs/jffs2/sub,$(1),$(1),$(JFFS2OPTS))
140 Image/mkfs/jffs2-$(1)-raw = $$(call Image/mkfs/jffs2/sub-raw,$(1),$(1),$(JFFS2OPTS))
141
142 endef
143
144 define Image/mkfs/jffs2-nand/template
145 Image/mkfs/jffs2-nand-$(1) = \
146 $$(call Image/mkfs/jffs2/sub, \
147 $(word 2,$(subst -, ,$(1))),nand-$(1), \
148 $(JFFS2OPTS) --no-cleanmarkers --pagesize=$(word 1,$(subst -, ,$(1))))
149
150 endef
151
152 $(eval $(foreach S,$(JFFS2_BLOCKSIZE),$(call Image/mkfs/jffs2/template,$(S))))
153 $(eval $(foreach S,$(NAND_BLOCKSIZE),$(call Image/mkfs/jffs2-nand/template,$(S))))
154
155 define Image/mkfs/squashfs
156 $(STAGING_DIR_HOST)/bin/mksquashfs4 $(TARGET_DIR) $(KDIR)/root.squashfs -nopad -noappend -root-owned -comp $(SQUASHFSCOMP) $(SQUASHFSOPT) -processors $(if $(CONFIG_PKG_BUILD_JOBS),$(CONFIG_PKG_BUILD_JOBS),1)
157 endef
158
159 # $(1): board name
160 # $(2): rootfs type
161 # $(3): kernel image
162 ifneq ($(CONFIG_NAND_SUPPORT),)
163 define Image/Build/SysupgradeNAND
164 mkdir -p "$(KDIR_TMP)/sysupgrade-$(1)/"
165 echo "BOARD=$(1)" > "$(KDIR_TMP)/sysupgrade-$(1)/CONTROL"
166 [ -z "$(2)" ] || $(CP) "$(KDIR)/root.$(2)" "$(KDIR_TMP)/sysupgrade-$(1)/root"
167 [ -z "$(3)" ] || $(CP) "$(3)" "$(KDIR_TMP)/sysupgrade-$(1)/kernel"
168 (cd "$(KDIR_TMP)"; $(TAR) cvf \
169 "$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-sysupgrade.tar" sysupgrade-$(1))
170 endef
171
172 # $(1) board name
173 # $(2) ubinize-image options (e.g. --uboot-env and/or --kernel kernelimage)
174 # $(3) rootfstype (e.g. squashfs or ubifs)
175 # $(4) options to pass-through to ubinize (i.e. $($(PROFILE)_UBI_OPTS)))
176 define Image/Build/UbinizeImage
177 sh $(TOPDIR)/scripts/ubinize-image.sh $(2) \
178 "$(KDIR)/root.$(3)" \
179 "$(KDIR)/$(IMG_PREFIX)-$(1)-$(3)-ubinized.bin" \
180 $(4)
181 endef
182
183 endif
184
185 ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
186 define Image/mkfs/ubifs/generate
187 $(CP) ./ubinize$(1).cfg $(KDIR)
188 ( cd $(KDIR); \
189 $(STAGING_DIR_HOST)/bin/ubinize \
190 $(if $($(PROFILE)_UBI_OPTS), \
191 $(shell echo $($(PROFILE)_UBI_OPTS)), \
192 $(shell echo $(UBI_OPTS)) \
193 ) \
194 -o $(KDIR)/root$(1).ubi \
195 ubinize$(1).cfg \
196 )
197 endef
198
199 define Image/mkfs/ubifs
200
201 ifneq ($($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS),)
202 $(STAGING_DIR_HOST)/bin/mkfs.ubifs \
203 $(if $($(PROFILE)_UBIFS_OPTS), \
204 $(shell echo $($(PROFILE)_UBIFS_OPTS)), \
205 $(shell echo $(UBIFS_OPTS)) \
206 ) \
207 $(if $(CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP),--space-fixup) \
208 $(if $(CONFIG_TARGET_UBIFS_COMPRESSION_NONE),--force-compr=none) \
209 $(if $(CONFIG_TARGET_UBIFS_COMPRESSION_LZO),--force-compr=lzo) \
210 $(if $(CONFIG_TARGET_UBIFS_COMPRESSION_ZLIB),--force-compr=zlib) \
211 $(if $(shell echo $(CONFIG_TARGET_UBIFS_JOURNAL_SIZE)),--jrn-size=$(CONFIG_TARGET_UBIFS_JOURNAL_SIZE)) \
212 --squash-uids \
213 -o $(KDIR)/root.ubifs \
214 -d $(TARGET_DIR)
215 endif
216 $(call Image/Build,ubifs)
217
218 ifneq ($($(PROFILE)_UBI_OPTS)$(UBI_OPTS),)
219 $(if $(wildcard ./ubinize.cfg),$(call Image/mkfs/ubifs/generate,))
220 $(if $(wildcard ./ubinize-overlay.cfg),$(call Image/mkfs/ubifs/generate,-overlay))
221 endif
222 $(if $(wildcard ./ubinize.cfg),$(call Image/Build,ubi))
223 endef
224 endif
225
226 define Image/mkfs/cpiogz
227 ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
228 endef
229
230 define Image/mkfs/targz
231 $(TAR) -czpf $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE),-$(PROFILE))-rootfs.tar.gz --numeric-owner --owner=0 --group=0 -C $(TARGET_DIR)/ .
232 endef
233
234 E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024)))
235
236 define Image/mkfs/ext4
237 $(STAGING_DIR_HOST)/bin/make_ext4fs \
238 -l $(E2SIZE) -b $(CONFIG_TARGET_EXT4_BLOCKSIZE) \
239 -i $(CONFIG_TARGET_EXT4_MAXINODE) \
240 -m $(CONFIG_TARGET_EXT4_RESERVED_PCT) \
241 $(if $(CONFIG_TARGET_EXT4_JOURNAL),,-J) \
242 $(KDIR)/root.ext4 $(TARGET_DIR)/
243 endef
244
245 define Image/mkfs/prepare/default
246 # Use symbolic permissions to avoid clobbering SUID/SGID/sticky bits
247 - $(FIND) $(TARGET_DIR) -type f -not -perm /0100 -not -name 'ssh_host*' -not -name 'shadow' -print0 | $(XARGS) -0 chmod u+rw,g+r,o+r
248 - $(FIND) $(TARGET_DIR) -type f -perm /0100 -print0 | $(XARGS) -0 chmod u+rwx,g+rx,o+rx
249 - $(FIND) $(TARGET_DIR) -type d -print0 | $(XARGS) -0 chmod u+rwx,g+rx,o+rx
250 $(INSTALL_DIR) $(TARGET_DIR)/tmp $(TARGET_DIR)/overlay
251 chmod 1777 $(TARGET_DIR)/tmp
252 endef
253
254 define Image/mkfs/prepare
255 $(call Image/mkfs/prepare/default)
256 endef
257
258
259 define Image/Checksum
260 ( cd ${BIN_DIR} ; \
261 $(FIND) -maxdepth 1 -type f \! -name 'md5sums' -printf "%P\n" | sort | xargs $1 > $2 \
262 )
263 endef
264
265 define BuildImage/mkfs
266 install: mkfs-$(1)
267 .PHONY: mkfs-$(1)
268 mkfs-$(1): mkfs_prepare
269 $(Image/mkfs/$(1))
270 $(call Build/mkfs/default,$(1))
271 $(call Build/mkfs/$(1),$(1))
272 $(KDIR)/root.$(1): mkfs-$(1)
273
274 endef
275
276 # Build commands that can be called from Device/* templates
277 define Build/uImage
278 mkimage -A $(LINUX_KARCH) \
279 -O linux -T kernel \
280 -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
281 -n '$(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $@ $@.new
282 @mv $@.new $@
283 endef
284
285 define Build/lzma
286 $(STAGING_DIR_HOST)/bin/lzma e $@ -lc1 -lp2 -pb2 $(1) $@.new
287 @mv $@.new $@
288 endef
289
290 define Build/kernel-bin
291 rm -f $@
292 cp $^ $@
293 endef
294
295 define Build/patch-cmdline
296 $(STAGING_DIR_HOST)/bin/patch-cmdline $@ '$(CMDLINE)'
297 endef
298
299 define Build/append-kernel
300 dd if=$(word 1,$^) $(if $(1),bs=$(1) conv=sync) >> $@
301 endef
302
303 define Build/append-rootfs
304 dd if=$(word 2,$^) $(if $(1),bs=$(1) conv=sync) >> $@
305 endef
306
307 define Build/pad-rootfs
308 $(call prepare_generic_squashfs,$@ $(1))
309 endef
310
311 define Build/pad-offset
312 let \
313 size="$$(stat -c%s $@)" \
314 pad="$(word 1, $(1))" \
315 offset="$(word 2, $(1))" \
316 pad="(pad - ((size + offset) % pad)) % pad" \
317 newsize='size + pad'; \
318 dd if=$@ of=$@.new bs=$$newsize count=1 conv=sync
319 mv $@.new $@
320 endef
321
322 define Build/check-size
323 @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -gt "$$(stat -c%s $@)" ] || { \
324 echo "WARNING: Image file $@ is too big" >&2; \
325 rm -f $@; \
326 }
327 endef
328
329
330 define Device/Init
331 PROFILES := $(PROFILE)
332 KERNEL:=
333 KERNEL_INITRAMFS = $$(KERNEL)
334 KERNEL_SIZE:=
335 CMDLINE:=
336
337 IMAGE_PREFIX := $(IMG_PREFIX)-$(1)
338 IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
339 KERNEL_PREFIX = $(1)
340 KERNEL_SUFFIX := -kernel.bin
341 KERNEL_IMAGE = $$(KERNEL_PREFIX)$$(KERNEL_SUFFIX)
342 KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-initramfs
343 KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_SUFFIX)
344 KERNEL_INSTALL :=
345 KERNEL_NAME := vmlinux
346 KERNEL_SIZE :=
347
348 FILESYSTEMS := $(TARGET_FILESYSTEMS)
349 endef
350
351 define Device/ExportVar
352 $(1) : $(2):=$$($(2))
353
354 endef
355 define Device/Export
356 $(foreach var,$(DEVICE_VARS) KERNEL KERNEL_INITRAMFS,$(call Device/ExportVar,$(1),$(var)))
357 $(1) : FILESYSTEM:=$(2)
358 endef
359
360 define Device/Check
361 _TARGET = $$(if $$(filter $(PROFILE),$$(PROFILES)),install,install-disabled)
362 _COMPILE_TARGET = $$(if $(if $(IB),,$(CONFIG_IB)$$(filter $(PROFILE),$$(PROFILES))),compile,compile-disabled)
363 endef
364
365 ifndef IB
366 define Device/Build/initramfs
367 $$(_TARGET): $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
368
369 $(KDIR)/$$(KERNEL_NAME)-initramfs: image_prepare
370 $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_IMAGE)
371 cp $$^ $$@
372
373 $(KDIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_NAME)-initramfs
374 @rm -f $$@
375 $$(call concat_cmd,$$(KERNEL_INITRAMFS))
376 endef
377 endif
378
379 define Device/Build/check_size
380 @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -gt "$$(stat -c%s $@)" ] || { \
381 echo "WARNING: Image file $@ is too big" >&2; \
382 rm -f $@; \
383 }
384 endef
385
386 define Device/Build/compile
387 $$(_COMPILE_TARGET): $(KDIR)/$(1)
388 $(eval $(call Device/Export,$(KDIR)/$(1)))
389 $(KDIR)/$(1):
390 $$(call concat_cmd,$(COMPILE/$(1)))
391
392 endef
393
394 define Device/Build/kernel
395 _KERNEL_IMAGES += $(KDIR)/$$(KERNEL_NAME)
396 $(KDIR)/$$(KERNEL_NAME): image_prepare
397 $$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
398 $(BIN_DIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_IMAGE)
399 cp $$^ $$@
400 $(KDIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME)
401 @rm -f $$@
402 $$(call concat_cmd,$$(KERNEL))
403 $$(if $$(KERNEL_SIZE),$$(call Device/Build/check_size,$$(KERNEL_SIZE)))
404 endef
405
406 define Device/Build/image
407 $$(_TARGET): $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))
408 $(eval $(call Device/Export,$(KDIR)/$(KERNEL_IMAGE),$(1)))
409 $(eval $(call Device/Export,$(KDIR)/$(KERNEL_INITRAMFS_IMAGE),$(1)))
410 $(eval $(call Device/Export,$(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)),$(1)))
411 $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/$$(KERNEL_IMAGE) $(KDIR)/root.$(1)
412 @rm -f $$@
413 [ -f $$(word 1,$$^) -a -f $$(word 2,$$^) ]
414 $$(call concat_cmd,$(if $(IMAGE/$(2)/$(1)),$(IMAGE/$(2)/$(1)),$(IMAGE/$(2))))
415
416 .IGNORE: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))
417 $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2))
418 cp $$^ $$@
419
420 endef
421
422 define Device/Build
423 $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1)))
424 $(call Device/Build/kernel,$(1))
425
426 $$(eval $$(foreach compile,$$(COMPILE), \
427 $$(call Device/Build/compile,$$(compile),$(1))))
428
429 $$(eval $$(foreach image,$$(IMAGES), \
430 $$(foreach fs,$$(filter $(TARGET_FILESYSTEMS),$$(FILESYSTEMS)), \
431 $$(call Device/Build/image,$$(fs),$$(image),$(1)))))
432 endef
433
434 define Device
435 $(call Device/Init,$(1))
436 $(call Device/Default,$(1))
437 $(call Device/Check,$(1))
438 $(call Device/$(1),$(1))
439 $(call Device/Build,$(1))
440
441 endef
442
443 define BuildImage
444
445 download:
446 prepare:
447 compile:
448 clean:
449 image_prepare:
450
451 ifeq ($(IB),)
452 .PHONY: download prepare compile clean image_prepare mkfs_prepare kernel_prepare install
453 compile:
454 $(call Build/Compile)
455
456 clean:
457 $(call Build/Clean)
458
459 image_prepare: compile
460 mkdir -p $(KDIR)/tmp
461 $(call Image/Prepare)
462 endif
463
464 mkfs_prepare: image_prepare
465 $(call Image/mkfs/prepare)
466
467 kernel_prepare: mkfs_prepare
468 $(call Image/BuildKernel)
469 $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Image/BuildKernel/Initramfs))
470 $(call Image/InstallKernel)
471
472 $(foreach device,$(TARGET_DEVICES),$(call Device,$(device)))
473 $(foreach fs,$(TARGET_FILESYSTEMS) $(fs-subtypes-y),$(call BuildImage/mkfs,$(fs)))
474
475 $$(sort $$(_KERNEL_IMAGES)):
476 @touch $$@
477
478 install: kernel_prepare
479 $(foreach fs,$(TARGET_FILESYSTEMS),
480 $(call Image/Build,$(fs))
481 )
482 $(call Image/mkfs/ubifs)
483 $(call Image/Checksum,md5sum --binary,md5sums)
484 $(call Image/Checksum,openssl dgst -sha256,sha256sums)
485
486 endef