From c7b70ed0f0cb54abcaba1ec9139ad737b8274545 Mon Sep 17 00:00:00 2001 From: "A. Cody Schuffelen" Date: Thu, 11 Sep 2025 17:29:26 -0700 Subject: [PATCH] Update crosvm pin, fix build hacks, and package the executable This still requires `--enable_sandbox=false` when used with `--host_substitutions=all`, but it's good enough for now. Tested that it works with `--enable_sandbox=false` for `--gpu_mode=guest_swiftshader` and `--gpu_mode=gfxstream`. Bug: b/402274999 --- base/cvd/MODULE.bazel | 5 ++--- base/cvd/build_external/crosvm/crosvm.config.toml | 4 ++-- base/cvd/cuttlefish/package/BUILD.bazel | 2 +- base/debian/control | 2 ++ 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/base/cvd/MODULE.bazel b/base/cvd/MODULE.bazel index f1d27f3c704..08c18087e76 100644 --- a/base/cvd/MODULE.bazel +++ b/base/cvd/MODULE.bazel @@ -52,7 +52,7 @@ bazel_dep(name = "zlib", version = "1.3.1.bcr.5") # this needs to be at parity with with build_external/crosvm/crosvm.config.toml CROSVM_REMOTE = "https://chromium.googlesource.com/crosvm/crosvm" -CROSVM_REV = "bc84c8bd6ce078e251594aa1af9e84932c5d0d81" +CROSVM_REV = "d3175012b887aee0dc5767aa05cfdab901d65798" # Hedron's Compile Commands Extractor for Bazel # https://github.com/hedronvision/bazel-compile-commands-extractor @@ -214,7 +214,6 @@ crosvm_bin.spec( "qcow", "usb", ], - # TODO: schuffelen - fix the sandbox git = CROSVM_REMOTE, rev = CROSVM_REV, ) @@ -263,7 +262,7 @@ crosvm_bin.annotation( crosvm_bin.annotation( crate = "minijail-sys", build_script_data = ["@@//:minijail_sources"], - build_script_rundir = "external/+_repo_rules2+crosvm/third_party/minijail", + build_script_rundir = "external/+_repo_rules3+crosvm/third_party/minijail", patch_args = ["-p1"], # crates_universe checks out only a subdirectory of the repository, so the # file paths in this patch are relative to that directory. diff --git a/base/cvd/build_external/crosvm/crosvm.config.toml b/base/cvd/build_external/crosvm/crosvm.config.toml index 6155f3bca82..3a76d7cc373 100644 --- a/base/cvd/build_external/crosvm/crosvm.config.toml +++ b/base/cvd/build_external/crosvm/crosvm.config.toml @@ -1,6 +1,6 @@ [patch.crates-io] # this needs to be at parity with MODULE.bazel -audio_streams = { git = "https://chromium.googlesource.com/crosvm/crosvm", rev = "bc84c8bd6ce078e251594aa1af9e84932c5d0d81" } -libcras = { git = "https://chromium.googlesource.com/crosvm/crosvm", rev = "bc84c8bd6ce078e251594aa1af9e84932c5d0d81" } +audio_streams = { git = "https://chromium.googlesource.com/crosvm/crosvm", rev = "d3175012b887aee0dc5767aa05cfdab901d65798" } +libcras = { git = "https://chromium.googlesource.com/crosvm/crosvm", rev = "d3175012b887aee0dc5767aa05cfdab901d65798" } # this needs to be at parity with the crosvm submodule third_party/minijail minijail = { git = "https://chromium.googlesource.com/chromiumos/platform/minijail", rev = "fc020fd4672b3340ee706e192d043e12df8c8578" } diff --git a/base/cvd/cuttlefish/package/BUILD.bazel b/base/cvd/cuttlefish/package/BUILD.bazel index c4e6848293d..65ccdbbaae1 100644 --- a/base/cvd/cuttlefish/package/BUILD.bazel +++ b/base/cvd/cuttlefish/package/BUILD.bazel @@ -114,7 +114,7 @@ package_files( "cuttlefish-common/etc/modem_simulator/files/iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml": "//cuttlefish/host/commands/modem_simulator:etc/files/iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml", "cuttlefish-common/etc/modem_simulator/files/iccprofile_for_sim0.xml": "//cuttlefish/host/commands/modem_simulator:etc/files/iccprofile_for_sim0.xml", "cuttlefish-common/etc/modem_simulator/files/numeric_operator.xml": "//cuttlefish/host/commands/modem_simulator:etc/files/numeric_operator.xml", - # "cuttlefish-common/bin/crosvm": "@crosvm_bin//:crosvm__crosvm", # TODO: b/402274999 - currently requires --enable_sandbox=false + "cuttlefish-common/bin/crosvm": "@crosvm_bin//:crosvm__crosvm", # TODO: b/402274999 - currently requires --enable_sandbox=false "cuttlefish-common/usr/share/webrtc/assets/client.html": "//cuttlefish/host/frontend/webrtc/html_client:client.html", "cuttlefish-common/usr/share/webrtc/assets/controls.css": "//cuttlefish/host/frontend/webrtc/html_client:controls.css", "cuttlefish-common/usr/share/webrtc/assets/custom.css": "//cuttlefish/host/frontend/webrtc/html_client:custom.css", diff --git a/base/debian/control b/base/debian/control index 0b11ff0eb75..1655e90d849 100644 --- a/base/debian/control +++ b/base/debian/control @@ -8,6 +8,7 @@ Build-Depends: bazel [amd64], debhelper-compat (= 12), git, libaom-dev, + libcap-dev, libclang-dev, libcurl4-openssl-dev, libfmt-dev, @@ -22,6 +23,7 @@ Build-Depends: bazel [amd64], libsrtp2-dev, libssl-dev, libtinfo5, + libwayland-dev, libxml2-dev, libz3-dev, pkgconf,