Repository navigation
cvd: add acpi_table, device_tree_overlay, and file_backed_mapping to DiskArtifacts proto schema - #3390
cvd: add acpi_table, device_tree_overlay, and file_backed_mapping to DiskArtifacts proto schema#3390erjiaqing wants to merge 1 commit into
Conversation
fd16507 to
505f996
Compare
bridadan
left a comment
There was a problem hiding this comment.
It looks like these changes assume that the ACPI table file, the device tree overlay, and/or the file backed memory file are already present in the local file system. This would work for local builds, but how does this work in CI? How are these artifacts fetched? In #3386 I added logic to the fetch handler to pull the artifacts from the build server. Is that required here as well?
c8aa018 to
43d6f73
Compare
Thanks for the reviewing effort, I looked through #3386 again, and feel there are some feature gaps between This PR is to provide extra parameters, instead of overriding standard images for Android. I confirmed that we can put the artifacts directly on CI. I don't feel it is a good idea to add Do you have any ideas on this? |
| optional string acpi_table = 2; | ||
| optional DeviceTreeOverlayArtifact device_tree_overlay = 3; | ||
| optional FileBackedMapping file_backed_mapping = 4; |
There was a problem hiding this comment.
Based on our offline discussion, the expectation of the path for all of these fields is that they reference a file in the default_build, right?
@rmuthiah just heads up this differs from the vendor_boot and eventually the system fields since those accept a build string. Maybe a comment in each of the relevant fields would be helpful to show the difference.
There was a problem hiding this comment.
Yes, these files should be located in the system_image_dir, which is the extracted default_build zip (Assuming #3234 is merged). Added a comment.
There was a problem hiding this comment.
After discussing offline, these paths can either be:
- An absolute local path
- A local path relative to
system_image_dir(once assemble_cvd: support relative paths for crosvm_acpi_table, crosvm_device_tree_overlay, and crosvm_file_backed_mapping #3234 is merged) - An remote build path, including a file path (e.g.
@ab/<branch>/<target>{<file path>})
I see what you mean, it does seem different from #3386 in that way.
From our discussion before, it sounds like all of the artifacts that would be used are tied to the target build (what goes in the I think it makes sense for these fields to reference "build local" files. It's not a pattern I had considered before but I think its ok. @rmuthiah any thoughts? |
43d6f73 to
ae93b76
Compare
|
|
||
| message DeviceTreeOverlayArtifact { | ||
| // The path of the dtb, should be a file in default_build. | ||
| string path = 1; |
There was a problem hiding this comment.
I think build instead of path would be more consistent with the other fields in this protofield (builds support @ab/... remote links and local paths.
There was a problem hiding this comment.
I realized that in the near future, we will use the same DTB and ACPI table within a group of VMs, so maybe we don't have to support fetching them from ab immediately.
So for now, we only need to support fetching the file backed mapping.
|
|
||
| message FileBackedMapping { | ||
| // The path of the backed file, should be a file in default_build. | ||
| string path = 1; |
There was a problem hiding this comment.
Same comment here: path -> build
…DiskArtifacts proto schema Add optional acpi_table, device_tree_overlay (DeviceTreeOverlayArtifact), and file_backed_mapping (FileBackedMapping) fields to message DiskArtifacts in load_config.proto, along with regenerated Go bindings. In cf_disk_configs.cpp, parse these fields, validate required parameters, and emit the corresponding --crosvm_acpi_table, --crosvm_device_tree_overlay, and --crosvm_file_backed_mapping_base64 flags. Given current usage of these flags, define the fields as optional in DiskArtifacts (they can be promoted to repeated in the future without breaking existing JSON configs). In the proto, only the minimal arguments for the functions are added. Bug: 544996625 Bug: 539399873 Test: bazel test //cuttlefish/host/commands/cvd/cli/parser/... Assisted-by: Jetski:Gemini TAG=agy CONV=9d324de2-493b-495b-8490-a20d8e687190
ae93b76 to
8638a21
Compare
Add repeated acpi_table, device_tree_overlay (DeviceTreeOverlayArtifact), and
file_backed_mapping (FileBackedMapping) fields to message DiskArtifacts in
load_config.proto, along with regenerated Go bindings.
In cf_disk_configs.cpp, parse these fields and emit the corresponding
--crosvm_acpi_table, --crosvm_device_tree_overlay, and
--crosvm_file_backed_mapping_base64 flags. Given current usage of these flags,
validate that at most one entry per instance is provided while keeping the
proto schema as repeated for future improvements.
In the proto, only the minimal arguments for the functions are added.
Bug: 544996625
Bug: 539399873
Test: bazel test //cuttlefish/host/commands/cvd/cli/parser/...
Assisted-by: Jetski:Gemini
TAG=agy
CONV=9d324de2-493b-495b-8490-a20d8e687190