Specify dtb_prebuilt property in the autogen vendor_boot.img
prebuilt_etc_modules_gen currently elides entries that are not installed
within partition directories but are installed in the product root.
However, dtb.img is copied from source via PRODUCT_COPY_FILES and
installed in the product root and then used for vendor_boot.img
generation.
This change creates the filegroup module from the PRODUCT_COPY_FILES for
the source dtb.img to utilize it in the vendor_boot.img generation, but
not actually install the file. We may consider installing this file if
this is essential in runtime.
Test: inspect the ninja command of the vendor_boot.img
Bug: 379945468
Change-Id: I760b8eb9c15b74b124828ea041ca106f8355efd4
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index d4301f9..08812ec 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -124,15 +124,17 @@
}
partitionVars := ctx.Config().ProductVariables().PartitionVarsForSoongMigrationOnlyDoNotUse
+ dtbImg := createDtbImgFilegroup(ctx)
+
if buildingBootImage(partitionVars) {
- if createBootImage(ctx) {
+ if createBootImage(ctx, dtbImg) {
f.properties.Boot_image = ":" + generatedModuleNameForPartition(ctx.Config(), "boot")
} else {
f.properties.Unsupported_partition_types = append(f.properties.Unsupported_partition_types, "boot")
}
}
if buildingVendorBootImage(partitionVars) {
- if createVendorBootImage(ctx) {
+ if createVendorBootImage(ctx, dtbImg) {
f.properties.Vendor_boot_image = ":" + generatedModuleNameForPartition(ctx.Config(), "vendor_boot")
} else {
f.properties.Unsupported_partition_types = append(f.properties.Unsupported_partition_types, "vendor_boot")