1 ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS
),)
2 define Image
/mkfs
/ubifs
/generate
3 $(CP
) .
/ubinize
$(1).cfg
$(KDIR
)
5 $(STAGING_DIR_HOST
)/bin
/ubinize \
6 $(if
$($(PROFILE
)_UBI_OPTS
),$($(PROFILE
)_UBI_OPTS
),$(shell echo
$(UBI_OPTS
))) \
7 -o
$(KDIR
)/root
$(1).ubi \
12 define Image
/mkfs
/ubifs
/legacy
14 $(if
$($(PROFILE
)_UBIFS_OPTS
)$(UBIFS_OPTS
),
15 $(STAGING_DIR_HOST
)/bin
/mkfs.ubifs \
16 $(if
$($(PROFILE
)_UBIFS_OPTS
),$($(PROFILE
)_UBIFS_OPTS
),$(UBIFS_OPTS
)) \
17 $(if
$(CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP
),--space-fixup
) \
18 $(if
$(CONFIG_TARGET_UBIFS_COMPRESSION_NONE
),--compr
=none
) \
19 $(if
$(CONFIG_TARGET_UBIFS_COMPRESSION_LZO
),--compr
=lzo
) \
20 $(if
$(CONFIG_TARGET_UBIFS_COMPRESSION_ZLIB
),--compr
=zlib
) \
21 $(if
$(shell echo
$(CONFIG_TARGET_UBIFS_JOURNAL_SIZE
)),--jrn-size
=$(CONFIG_TARGET_UBIFS_JOURNAL_SIZE
)) \
23 -o
$(KDIR
)/root.ubifs \
26 $(call Image
/Build
,ubifs
)
28 $(if
$($(PROFILE
)_UBI_OPTS
)$(UBI_OPTS
),
29 $(if
$(wildcard .
/ubinize.cfg
),$(call Image
/mkfs
/ubifs
/generate
,))
30 $(if
$(wildcard .
/ubinize-overlay.cfg
),$(call Image
/mkfs
/ubifs
/generate
,-overlay
))
32 $(if
$(wildcard .
/ubinize.cfg
),$(call Image
/Build
,ubi
))
36 LegacyDevice
/Dump
= $(Device
/Dump
)
38 define LegacyDevice
/Check
39 $(Device
/Check
/Common
)
40 _TARGET_PREPARE
:= $$(if
$$(_PROFILE_SET
),legacy-images-prepare
,prepare-disabled
)
41 _TARGET
:= $$(if
$$(_PROFILE_SET
),legacy-images
,install-disabled
)
42 $$(if
$$(_PROFILE_SET
),install: legacy-images-make
)
44 $$(if
$$(_PROFILE_SET
),kernel_prepare
: legacy-images-prepare-make
)
48 ifdef TARGET_PER_DEVICE_ROOTFS
49 define Image
/Build
/Profile
/Filesystem
50 cp
$(KDIR
)/root.
$(2)+pkg
=$(3) $(KDIR
)/root.
$(2)
51 $(call Image
/Build
/$(2),$(2))
52 $(call Image
/Build
/Profile
,$(1),$(2))
55 Image
/Build
/Profile
/Filesystem
= $(Image
/Build
/Profile
)
58 define LegacyDevice
/Build
59 $$(_TARGET
): legacy-image-
$(1)
60 $$(_TARGET_PREPARE
): legacy-image-prepare-
$(1)
61 .PHONY
: legacy-image-prepare-
$(1) legacy-image-
$(1)
63 legacy-image-prepare-
$(1):
64 $$(call Image
/Prepare
/Profile
,$(1))
67 ifdef CONFIG_TARGET_PER_DEVICE_ROOTFS
68 ROOTFS
/$(1) := $(foreach fs
,$(TARGET_FILESYSTEMS
), \
69 $(KDIR
)/root.
$(fs
)$$(strip $(if
$(CONFIG_TARGET_PER_DEVICE_ROOTFS
),+pkg
=$$(ROOTFS_ID
/$(1)))) \
72 $$(ROOTFS
/$(1)): target-dir-
$$(ROOTFS_ID
/$(1))
73 legacy-images-make
: $$(if
$$(_PROFILE_SET
),$$(ROOTFS
/$(1)))
78 $$(call Image
/BuildKernel
/Profile
,$(1))
79 $(foreach fs
,$(TARGET_FILESYSTEMS
),
80 $$(call Image
/Build
/Profile
/Filesystem
,$(1),$(fs
),$$(ROOTFS_ID
/$(1)))
86 $(call Device
/InitProfile
,$(1))
87 $(call Device
/Default
,$(1))
88 $(call LegacyDevice
/Default
,$(1))
89 $(call LegacyDevice
/$(1),$(1))
90 $(call LegacyDevice
/Check
,$(1))
91 $(call LegacyDevice
/$(if
$(DUMP
),Dump
,Build
),$(1))