From 4ba38c1a3fd4ec8e28aad19e35f84fb9373f9dd5 Mon Sep 17 00:00:00 2001 From: Theotime Combes Date: Fri, 12 Jun 2020 12:46:59 +0000 Subject: Add F2FS support for APEX build system Add the new property payload_fs_type in apex module type. Either 'f2fs' or 'ext4'. Default 'ext4'. Test: m Bug: 158453869 Change-Id: I36f373251bd597e11acb62af75437a87e2a531ec Merged-In: I36f373251bd597e11acb62af75437a87e2a531ec --- apex/builder.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apex/builder.go') diff --git a/apex/builder.go b/apex/builder.go index 0a1ec3eb3..3a148c4a8 100644 --- a/apex/builder.go +++ b/apex/builder.go @@ -63,6 +63,8 @@ func init() { pctx.HostBinToolVariable("jsonmodify", "jsonmodify") pctx.HostBinToolVariable("conv_apex_manifest", "conv_apex_manifest") pctx.HostBinToolVariable("extract_apks", "extract_apks") + pctx.HostBinToolVariable("make_f2fs", "make_f2fs") + pctx.HostBinToolVariable("sload_f2fs", "sload_f2fs") } var ( @@ -116,12 +118,12 @@ var ( `--payload_type image ` + `--key ${key} ${opt_flags} ${image_dir} ${out} `, CommandDeps: []string{"${apexer}", "${avbtool}", "${e2fsdroid}", "${merge_zips}", - "${mke2fs}", "${resize2fs}", "${sefcontext_compile}", + "${mke2fs}", "${resize2fs}", "${sefcontext_compile}", "${make_f2fs}", "${sload_f2fs}", "${soong_zip}", "${zipalign}", "${aapt2}", "prebuilts/sdk/current/public/android.jar"}, Rspfile: "${out}.copy_commands", RspfileContent: "${copy_commands}", Description: "APEX ${image_dir} => ${out}", - }, "tool_path", "image_dir", "copy_commands", "file_contexts", "canned_fs_config", "key", "opt_flags", "manifest") + }, "tool_path", "image_dir", "copy_commands", "file_contexts", "canned_fs_config", "key", "opt_flags", "manifest", "payload_fs_type") zipApexRule = pctx.StaticRule("zipApexRule", blueprint.RuleParams{ Command: `rm -rf ${image_dir} && mkdir -p ${image_dir} && ` + @@ -582,6 +584,8 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) { optFlags = append(optFlags, "--manifest_json "+a.manifestJsonOut.String()) } + optFlags = append(optFlags, "--payload_fs_type "+a.payloadFsType.string()) + ctx.Build(pctx, android.BuildParams{ Rule: apexRule, Implicits: implicitInputs, -- cgit v1.2.3-59-g8ed1b