Merge "Do not include assets in autogenerated RROs" into main
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 84384a5..b9cb076 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -457,7 +457,7 @@
}
func (f *filesystem) appendToEntry(ctx android.ModuleContext, installedFile android.Path) {
- partitionBaseDir := android.PathForModuleOut(ctx, "root", f.partitionName()).String() + "/"
+ partitionBaseDir := android.PathForModuleOut(ctx, "root", proptools.String(f.properties.Base_dir)).String() + "/"
relPath, inTargetPartition := strings.CutPrefix(installedFile.String(), partitionBaseDir)
if inTargetPartition {
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go
index 86496eb..0ed3870 100644
--- a/filesystem/filesystem_test.go
+++ b/filesystem/filesystem_test.go
@@ -244,7 +244,7 @@
`)
module := result.ModuleForTests("myfilesystem", "android_common").Module().(*systemImage)
- android.AssertDeepEquals(t, "entries should have foo only", []string{"components/foo"}, module.entries)
+ android.AssertDeepEquals(t, "entries should have foo and not bar", []string{"components/foo", "etc/linker.config.pb"}, module.entries)
}
func TestAvbGenVbmetaImage(t *testing.T) {
diff --git a/filesystem/super_image.go b/filesystem/super_image.go
index 1583c0b..0f8f614 100644
--- a/filesystem/super_image.go
+++ b/filesystem/super_image.go
@@ -44,7 +44,7 @@
// the block device where metadata for dynamic partitions is stored
Metadata_device *string
// the super partition block device list
- Block_devices *string
+ Block_devices []string
// whether A/B updater is used
Ab_update *bool
// whether dynamic partitions is enabled on devices that were launched without this support
@@ -153,7 +153,9 @@
addStr("dynamic_partition_retrofit", strconv.FormatBool(proptools.Bool(s.properties.Retrofit)))
addStr("lpmake", "lpmake")
addStr("super_metadata_device", proptools.String(s.properties.Metadata_device))
- addStr("super_block_devices", proptools.String(s.properties.Block_devices))
+ if len(s.properties.Block_devices) > 0 {
+ addStr("super_block_devices", strings.Join(s.properties.Block_devices, " "))
+ }
addStr("super_super_device_size", strconv.Itoa(proptools.Int(s.properties.Size)))
var groups, partitionList []string
for _, groupInfo := range s.properties.Partition_groups {
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index ec704d5..1378513 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -343,6 +343,7 @@
Name: proptools.StringPtr("vendor_dlkm/etc"),
},
}
+ fsProps.Base_dir = proptools.StringPtr("system")
fsProps.Dirs = proptools.NewSimpleConfigurable([]string{
// From generic_rootdirs in build/make/target/product/generic/Android.bp
"acct",
@@ -394,11 +395,11 @@
fsProps.Symlinks = []filesystem.SymlinkDefinition{
filesystem.SymlinkDefinition{
Target: proptools.StringPtr("/odm"),
- Name: proptools.StringPtr("vendor/odm"),
+ Name: proptools.StringPtr("odm"),
},
filesystem.SymlinkDefinition{
Target: proptools.StringPtr("/vendor_dlkm/lib/modules"),
- Name: proptools.StringPtr("vendor/lib/modules"),
+ Name: proptools.StringPtr("lib/modules"),
},
}
fsProps.Android_filesystem_deps.System = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "system"))
@@ -409,7 +410,7 @@
fsProps.Symlinks = []filesystem.SymlinkDefinition{
filesystem.SymlinkDefinition{
Target: proptools.StringPtr("/odm_dlkm/lib/modules"),
- Name: proptools.StringPtr("odm/lib/modules"),
+ Name: proptools.StringPtr("lib/modules"),
},
}
case "userdata":
@@ -452,6 +453,7 @@
Name: proptools.StringPtr("default.prop"),
},
}
+ fsProps.Base_dir = proptools.StringPtr("recovery")
}
}
@@ -798,10 +800,6 @@
fsProps.Precompiled_file_contexts = proptools.StringPtr(":file_contexts_bin_gen")
}
- if !strings.Contains(partitionType, "ramdisk") {
- fsProps.Base_dir = proptools.StringPtr(partitionType)
- }
-
fsProps.Is_auto_generated = proptools.BoolPtr(true)
partitionSpecificFsProps(ctx, fsProps, partitionVars, partitionType)
diff --git a/fsgen/super_img.go b/fsgen/super_img.go
index 4569896..8ee3bf2 100644
--- a/fsgen/super_img.go
+++ b/fsgen/super_img.go
@@ -35,7 +35,7 @@
superImageProps := &filesystem.SuperImageProperties{
Metadata_device: proptools.StringPtr(partitionVars.BoardSuperPartitionMetadataDevice),
- Block_devices: proptools.StringPtr(partitionVars.BoardSuperPartitionBlockDevices[0]),
+ Block_devices: partitionVars.BoardSuperPartitionBlockDevices,
Ab_update: proptools.BoolPtr(partitionVars.AbOtaUpdater),
Retrofit: proptools.BoolPtr(partitionVars.ProductRetrofitDynamicPartitions),
Virtual_ab: proptools.BoolPtr(partitionVars.ProductVirtualAbOta),