diff options
author | Jorge E. Moreira <jemoreira@google.com> | 2023-03-30 18:34:26 -0700 |
---|---|---|
committer | Jorge E. Moreira <jemoreira@google.com> | 2023-04-03 11:54:38 -0700 |
commit | aceff5fb07a7b19b003ac38901e325704cb3a172 (patch) | |
tree | 17d6e21948d89cd6ff905b7fe20f6cece499a997 | |
parent | 96992015f9b771ce8d55a73f6a409e5238124dd8 (diff) | |
download | cuttlefish_vmm-aceff5fb07a7b19b003ac38901e325704cb3a172.tar.gz |
Reduce crosvm's dependency on host libraries (scripts)
by building libwayland-client instead of depending on the one on the
host.
Bug: 265178952
Test: next cl
Change-Id: I5252274da2a9ac883697fd7393b3e2d570ddf151
-rw-r--r-- | manifest.xml | 2 | ||||
-rwxr-xr-x | rebuild-internal.sh | 35 |
2 files changed, 36 insertions, 1 deletions
diff --git a/manifest.xml b/manifest.xml index 4968895..4029e8f 100644 --- a/manifest.xml +++ b/manifest.xml @@ -11,5 +11,7 @@ <project groups="crosvm" name="platform/external/minigbm" path="third_party/minigbm" revision="6a8f9d534b9047e915c63f38340c8d49641872b8"/> <project groups="crosvm" name="platform/external/minijail" path="platform/minijail" revision="d4fb6c2f82a4445bcf48e697023a6d9dc07d4db3"/> <project groups="crosvm" name="platform/external/virglrenderer" path="third_party/virglrenderer" revision="80d01aa516ee1088a3def354448ebfbe2e226704"/> + <project groups="crosvm" name="platform/external/wayland" path="third_party/wayland" revision="efeff42250a561f3f280f232762a289585b4f5e0"/> + <project groups="crosvm" name="platform/external/libffi" path="third_party/libffi" revision="a8011b453bea48ac68b8c37545b4f04aaf6a9ffc"/> <project groups="gfxstream" name="device/generic/vulkan-cereal" path="device/generic/vulkan-cereal" revision="6402a1b33d6924677e9b6051e243119011e8f823"/> </manifest> diff --git a/rebuild-internal.sh b/rebuild-internal.sh index 78eea48..72f0930 100755 --- a/rebuild-internal.sh +++ b/rebuild-internal.sh @@ -8,7 +8,7 @@ # Stable is usually too old for crosvm, but make sure you bump this # up as far as you can each time this script is touched.. -RUST_TOOLCHAIN_VER=1.62.0 +RUST_TOOLCHAIN_VER=1.65.0 setup_env() { : ${SOURCE_DIR:="$(pwd)/source"} @@ -84,9 +84,11 @@ install_packages() { build-essential \ "$@" \ curl \ + doxygen \ gcc \ g++ \ git \ + graphviz \ libcap-dev \ libfdt-dev \ libegl1-mesa-dev \ @@ -98,6 +100,7 @@ install_packages() { libusb-1.0-0-dev \ libwayland-bin \ libwayland-dev \ + libxml2-dev \ make \ nasm \ ninja-build \ @@ -106,7 +109,9 @@ install_packages() { python \ python3 \ python3-pip \ + texinfo \ wayland-protocols \ + xmlto \ xutils-dev # Needed to pacify autogen.sh for libepoxy sudo apt-get install -y -t buster-backports \ cmake @@ -310,6 +315,32 @@ compile_virglrenderer() { ln -s -f "libvirglrenderer.so.1" "libvirglrenderer.so" } +compile_libffi() { + cd "${SOURCE_DIR}/third_party/libffi" + + ./autogen.sh + ./configure \ + --prefix="${WORKING_DIR}/usr" \ + --libdir="${WORKING_DIR}/usr/lib" + make && make check && make install + + cp -a "${WORKING_DIR}"/usr/lib/libffi.so* "${OUTPUT_LIB_DIR}"/ +} + +compile_wayland() { + cd "${SOURCE_DIR}/third_party/wayland" + + # Need to figure out the right way to pass this down... + sed -i "s|install: true\$|install: true, install_rpath : '\$ORIGIN',|" src/meson.build + + meson build \ + --libdir="${WORKING_DIR}/usr/lib" \ + --prefix="${WORKING_DIR}/usr" + ninja -C build/ install + + cp -a "${WORKING_DIR}"/usr/lib/libwayland-client.so* "${OUTPUT_LIB_DIR}"/ +} + compile_gfxstream() { echo "Compiling gfxstream..." @@ -405,6 +436,8 @@ compile() { compile_minigbm compile_epoxy compile_virglrenderer + compile_libffi # wayland depends on it + compile_wayland fi # TODO: Finish the aarch64 cross/native gfxstream build |