Lines Matching +full:vulkan +full:- +full:drivers
4 Mesa hardware drivers can be built for Android one of two ways: built
5 into the Android OS using the ndk-build build system on older versions
6 of Android, or out-of-tree using the Meson build system and the
9 The ndk-build build system has proven to be hard to maintain, as one
12 Chrome OS developers for building and testing Android drivers.
14 When building llvmpipe or lavapipe for Android the ndk-build workflow
19 ------------------------------
23 ``~/.local/share/meson/cross/android-aarch64`` file:
25 .. code-block:: ini
28 ar = 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ar'
29 c = ['ccache', 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang']
30 …built/linux-x86_64/bin/aarch64-linux-android29-clang++', '-fno-exceptions', '-fno-unwind-tables', …
33 strip = 'NDKDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip'
34 # Android doesn't come with a pkg-config, but we need one for Meson to be happy not
35 # finding all the optional deps it looks for. Use system pkg-config pointing at a
37 pkg-config = ['env', 'PKG_CONFIG_LIBDIR=NDKDIR/pkgconfig', '/usr/bin/pkg-config']
46 one cross-compiling the turnip driver for a stock Pixel phone)
48 .. code-block:: sh
50 meson setup build-android-aarch64 \
51 --cross-file android-aarch64 \
52 -Dplatforms=android \
53 -Dplatform-sdk-version=26 \
54 -Dandroid-stub=true \
55 -Dgallium-drivers= \
56 -Dvulkan-drivers=freedreno \
57 -Dfreedreno-kmds=kgsl
58 meson compile -C build-android-aarch64
60 Replacing Android drivers on stock Android
61 ------------------------------------------
63 The vendor partition with the drivers is normally mounted from a
64 read-only disk image on ``/vendor``. To be able to replace them for
68 .. code-block:: sh
70 adb disable-verity
72 adb remount -R
75 Now you can replace drivers as in:
77 .. code-block:: sh
79 …adb push build-android-aarch64/src/freedreno/vulkan/libvulkan_freedreno.so /vendor/lib64/hw/vulkan…
84 .. code-block:: sh
86 cp build-android-aarch64/src/freedreno/vulkan/libvulkan_freedreno.so /tmp/vulkan.sdm710.so
87 patchelf --set-soname vulkan.sdm710.so /tmp/vulkan.sdm710.so
88 adb push /tmp/vulkan.sdm710.so /vendor/lib64/hw/
90 Replacing Android drivers on Chrome OS
91 --------------------------------------
93 Chrome OS's ARC++ is an Android container with hardware drivers inside
94 of it. The vendor partition with the drivers is normally mounted from
95 a read-only squashfs image on disk. For doing rapid driver
98 bind mount instead of a loopback mount so we can update our drivers
101 On your device, you'll want to make ``/`` read-write. ssh in as root
104 .. code-block:: sh
107 /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions 4
111 bind-mount from a directory we control.
113 .. code-block:: sh
116 mkdir vendor-ro
117 mount -o loop vendor.raw.img vendor-ro
118 cp -a vendor-ro vendor-rw
127 "source": "/opt/google/containers/android/vendor-rw",
136 .. code-block:: sh
141 bind-mount ``/vendor``, and if you use ``android-sh`` to shell into it
149 .. code-block:: sh
151 scp msm_dri.so $HOST:/opt/google/containers/android/vendor-rw/lib64/dri/
153 You can do your build of your DRI driver using ``emerge-$BOARD
154 arc-mesa-freedreno`` (for example) if you have a source tree with
157 example the build will require that you have your arc-libdrm build
159 Freedreno Vulkan driver for KGSL. You can mostly put things in place
162 .. code-block:: sh
164 scp $HOST:/opt/google/containers/android/vendor-rw/lib64/libdrm.so \
165 NDKDIR/sysroot/usr/lib/aarch64-linux-android/lib/
167 ln -s \
179 .. code-block:: sh
181 kill $(cat /run/containers/android-run_oci/container.pid )
183 Adding drivers to Android OS image
184 ----------------------------------
187 drivers built out of tree directly into the OS image. For
189 to ensure Android is able to load the drivers correctly.
202 .. code-block:: sh
204 repo init -b main -u https://android.googlesource.com/platform/manifest
205 repo sync -c -j8
208 lunch aosp_cf_x86_64_phone-trunk_staging-userdebug
212 the ``aosp_cf_x86_64_phone-trunk_staging-userdebug`` build target
219 .. code-block:: sh
226 cp ${INSTALL_PREFIX_64}/lib/libgallium-24.3.0-devel.so prebuilts/mesa/x86_64/
232 cp ${INSTALL_PREFIX_32}/lib/libgallium-24.3.0-devel.so prebuilts/mesa/x86/
237 patchelf --set-soname libEGL_lp.so prebuilts/mesa/x86_64/libEGL.so
238 patchelf --set-soname libGLESv1_CM_lp.so prebuilts/mesa/x86_64/libGLESv1_CM.so
239 patchelf --set-soname libGLESv2_lp.so prebuilts/mesa/x86_64/libGLESv2.so
240 patchelf --set-soname vulkan.lvp.so prebuilts/mesa/x86_64/libvulkan_lvp.so
241 patchelf --set-soname libEGL_lp.so prebuilts/mesa/x86/libEGL.so
242 patchelf --set-soname libGLESv1_CM_lp.so prebuilts/mesa/x86/libGLESv1_CM.so
243 patchelf --set-soname libGLESv2_lp.so prebuilts/mesa/x86/libGLESv2.so
244 patchelf --set-soname vulkan.lvp.so prebuilts/mesa/x86/libvulkan_lvp.so
249 .. code-block::
270 name: "libgallium-24.3.0-devel",
273 srcs: ["x86_64/libgallium-24.3.0-devel.so"],
276 srcs: ["x86/libgallium-24.3.0-devel.so"],
346 name: "vulkan.lvp",
370 .. code-block:: makefile
377 libgallium-24.3.0-devel.so \
378 vulkan.lvp
381 ro.hardware.vulkan=lvp \
391 .. code-block:: makefile
398 .. code-block:: sh
404 /vendor/lib(64)?/egl/libgallium\-24.3.0\-devel\.so u:object_r:same_process_hal_file:s0
405 /vendor/lib(64)?/hw/vulkan\.lvp\.so u:object_r:same_process_hal_file:s0
413 .. code-block:: sh
415 $(call inherit-product, device/google/cuttlefish/shared/mesa/device_vendor.mk)
421 .. code-block:: sh
423 -include device/google/cuttlefish/shared/mesa/BoardConfig.mk