From 376d72f7912a3c5cba1ac336582d2ecf5a2d2615 Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Wed, 1 Nov 2023 15:40:25 +0900 Subject: [PATCH] Add mount_point property to android_filesystem The motivation is to support vendor images for microdroid, like the real vendor images having "/vendor" as their mount point. This will help add vendor_file_contexts easily. Bug: 306313100 Test: manually build an image with file_contexts Change-Id: I2e4bbf108eaa1da4f310ebb4099c4d1b42096436 --- filesystem/filesystem.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index 023c69adf..f2efd463f 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -104,6 +104,9 @@ type filesystemProperties struct { // When set, passed to mkuserimg_mke2fs --mke2fs_uuid & --mke2fs_hash_seed. // Otherwise, they'll be set as random which might cause indeterministic build output. Uuid *string + + // Mount point for this image. Default is "/" + Mount_point *string } // android_filesystem packages a set of modules and their transitive dependencies into a filesystem @@ -332,7 +335,7 @@ func (f *filesystem) buildPropFile(ctx android.ModuleContext) (propFile android. } addStr("fs_type", fsTypeStr(f.fsType(ctx))) - addStr("mount_point", "/") + addStr("mount_point", proptools.StringDefault(f.properties.Mount_point, "/")) addStr("use_dynamic_partition_size", "true") addPath("ext_mkuserimg", ctx.Config().HostToolPath(ctx, "mkuserimg_mke2fs")) // b/177813163 deps of the host tools have to be added. Remove this.