Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Q] hardware/adreno: Convert vendor->odm symlink to ro.hardware property #862

Merged
merged 1 commit into from
Sep 16, 2021

Conversation

MarijnS95
Copy link
Contributor

@MarijnS95 MarijnS95 commented Sep 15, 2021

Fixes sonyxperiadev/bug_tracker#718
Previously submitted in #565 and #642

Android is continuously clamping down on symlink hacks (see the report in 1) and for a good reason: they provide a perfectly valid alternative using ro.hardware.<module name> to change the platform name of a module that needs to be searched for. On all our platforms the Vulkan library is called vulkan.qcom.so instead of vulkan.$(TARGET_BOARD_PLATFORM).so and Android can simply be taught to search for the former instead of the latter by setting ro.hardware.vulkan=qcom.

Signed-off-by: Marijn Suijten marijn.suijten@somainline.org

Android is continuously clamping down on symlink hacks (see the report
in [1]) and for a good reason: they provide a perfectly valid
alternative using `ro.hardware.<module name>` to change the platform
name of a module that needs to be searched for.  On all our platforms
the Vulkan library is called `vulkan.qcom.so` instead of
`vulkan.$(TARGET_BOARD_PLATFORM).so` and Android can simply be taught to
search for the former instead of the latter by setting
`ro.hardware.vulkan=qcom`.

[1]: sonyxperiadev/bug_tracker#718

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
@bartcubbins
Copy link
Contributor

Vulkan is still broken without the symlink. Just tested on Nile.

@MarijnS95
Copy link
Contributor Author

@bartcubbins any information at all that might help understand what is going on? Logs?

@bartcubbins
Copy link
Contributor

09-20 15:10:09.397 4570 4570 E vndksupport: Could not load vulkan.qcom.so from sphal namespace: dlopen failed: library "vulkan.qcom.so" not found.

https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-11.0.0_r45/vulkan/libvulkan/driver.cpp#182

@MarijnS95
Copy link
Contributor Author

@bartcubbins Correct, it loads from an SPHAL, and /odm/lib64/hw/ is not included in the search path. /odm/lib64/ is however:
https://cs.android.com/android/platform/superproject/+/master:system/linkerconfig/contents/namespace/sphal.cc;l=40-47?q=sphal.cc. Making a symlink:

griffin:/odm/lib64 # ls -l /odm/lib64/vulkan.qcom.so
lrwxrwxrwx 1 root root 17 2021-09-28 21:20 /odm/lib64/vulkan.qcom.so -> hw/vulkan.qcom.so

No matter how dirty, works.

@MarijnS95
Copy link
Contributor Author

Restoring part of the old behaviour in #865, validated on Griffin.

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