Skip to content

Conversation

@jmacnak
Copy link
Member

@jmacnak jmacnak commented May 19, 2025

  • Adds symlinks for the software renering libs

  • Additional create graphics symlinks using debian links file.
    The bazel symlink creation is useful for local dev but does
    not work for the actual packaging step and the package ended
    up with full copies.

Bug: b/403290370
Bug: b/410874401
Bug: b/410644750

TEST:

$ tools/buildutils/build_packages.sh
$ sudo apt install ./cuttlefish-base_*.deb ./cuttlefish-user_*.deb

and then checking links:

$ ls -al /usr/lib/cuttlefish-common/bin/aarch64-linux-gnu/gfxstream_graphics_detector
lrwxrwxrwx 1 root root 20 May 16 17:57 /usr/lib/cuttlefish-common/bin/aarch64-linux-gnu/gfxstream_graphics_detector -> ../graphics_detector

$ ls -al /usr/lib/cuttlefish-common/bin/x86_64-linux-gnu/gfxstream_graphics_detector
lrwxrwxrwx 1 root root 20 May 16 17:57 /usr/lib/cuttlefish-common/bin/x86_64-linux-gnu/gfxstream_graphics_detector -> ../graphics_detector

$ ls -al /usr/lib/cuttlefish-common/lib64/vulkan*
lrwxrwxrwx 1 root root   24 May 16 17:57 vulkan.lvp.so -> ../bin/libvk_lavapipe.so
lrwxrwxrwx 1 root root   27 May 16 17:57 vulkan.pastel.so -> ../bin/libvk_swiftshader.so

and then using local Android repo with an additional

symlinks: {
  target: "/usr/lib/cuttlefish-common/bin/graphics_detector"
  link_name: "bin/x86_64-linux-gnu/gfxstream_graphics_detector"
}

and cvd start successfully detects GPU support and confirming the debian substitution worked:

$ ls -al out/host/linux-x86/bin/x86_64-linux-gnu/gfxstream_graphics_detector
lrwxrwxrwx 1 natsu primarygroup 75 May 19 10:44 out/host/linux-x86/bin/x86_64-linux-gnu/gfxstream_graphics_detector -> /usr/lib/cuttlefish-common/bin/x86_64-linux-gnu/gfxstream_graphics_detector

@jmacnak jmacnak force-pushed the graphics-links-v2 branch 2 times, most recently from 991a08f to 90dc52c Compare May 19, 2025 21:27
@jmacnak jmacnak added the kokoro:run Run e2e tests. label May 19, 2025
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label May 19, 2025
* Adds symlinks for the software renering libs

* Additional create graphics symlinks using debian links file.
  The bazel symlink creation is useful for local dev but does
  not work for the actual packaging step and the package ended
  up with full copies.

Bug: b/403290370
Bug: b/410874401
Bug: b/410644750

TEST:
```
$ tools/buildutils/build_packages.sh
$ sudo apt install ./cuttlefish-base_*.deb ./cuttlefish-user_*.deb
```

and then checking links:

```
$ ls -al /usr/lib/cuttlefish-common/bin/aarch64-linux-gnu/gfxstream_graphics_detector
lrwxrwxrwx 1 root root 20 May 16 17:57 /usr/lib/cuttlefish-common/bin/aarch64-linux-gnu/gfxstream_graphics_detector -> ../graphics_detector

$ ls -al /usr/lib/cuttlefish-common/bin/x86_64-linux-gnu/gfxstream_graphics_detector
lrwxrwxrwx 1 root root 20 May 16 17:57 /usr/lib/cuttlefish-common/bin/x86_64-linux-gnu/gfxstream_graphics_detector -> ../graphics_detector

$ ls -al /usr/lib/cuttlefish-common/lib64/vulkan*
lrwxrwxrwx 1 root root   24 May 16 17:57 vulkan.lvp.so -> ../bin/libvk_lavapipe.so
lrwxrwxrwx 1 root root   27 May 16 17:57 vulkan.pastel.so -> ../bin/libvk_swiftshader.so
```

and then using local Android repo with an additional

```
symlinks: {
  target: "/usr/lib/cuttlefish-common/bin/graphics_detector"
  link_name: "bin/x86_64-linux-gnu/gfxstream_graphics_detector"
}
```

and `cvd start` successfully detects GPU support and confirming the debian
substitution worked:

```
$ ls -al out/host/linux-x86/bin/x86_64-linux-gnu/gfxstream_graphics_detector
lrwxrwxrwx 1 natsu primarygroup 75 May 19 10:44 out/host/linux-x86/bin/x86_64-linux-gnu/gfxstream_graphics_detector -> /usr/lib/cuttlefish-common/bin/x86_64-linux-gnu/gfxstream_graphics_detector
```
@jmacnak jmacnak force-pushed the graphics-links-v2 branch from 90dc52c to 1a8dbe6 Compare May 22, 2025 21:18
@jmacnak jmacnak added the kokoro:run Run e2e tests. label May 27, 2025
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label May 27, 2025
@jmacnak jmacnak added the kokoro:run Run e2e tests. label May 30, 2025
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label May 30, 2025
@jmacnak jmacnak enabled auto-merge May 30, 2025 20:23
@jmacnak jmacnak added this pull request to the merge queue May 30, 2025
@jemoreira jemoreira removed this pull request from the merge queue due to a manual request May 30, 2025
@jmacnak jmacnak added this pull request to the merge queue Jun 2, 2025
@jmacnak jmacnak removed this pull request from the merge queue due to a manual request Jun 2, 2025
@jmacnak jmacnak added this pull request to the merge queue Jun 2, 2025
Merged via the queue into google:main with commit 666b9ad Jun 2, 2025
16 checks passed
@jmacnak jmacnak deleted the graphics-links-v2 branch July 21, 2025 20:20
jmacnak added a commit to jmacnak/android-cuttlefish that referenced this pull request Dec 5, 2025
Equivalent ag/34111853

google#910 added the
graphics detector to the github package. Then
google#1177 added
symlinks to not break the internal build prior to ag/34111853.
After ag/34111853, internal build started to use the general
binary. However, this was missing from the github package which
made ag/35919528 start to reference the old file names.

Bug: b/466394895
github-merge-queue bot pushed a commit that referenced this pull request Dec 9, 2025
Equivalent ag/34111853

#910 added the
graphics detector to the github package. Then
#1177 added
symlinks to not break the internal build prior to ag/34111853.
After ag/34111853, internal build started to use the general
binary. However, this was missing from the github package which
made ag/35919528 start to reference the old file names.

Bug: b/466394895
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants