Lines Matching +full:meson +full:- +full:cross
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
11 tested in CI. The Meson build system flow is frequently used by
14 When building llvmpipe or lavapipe for Android the ndk-build workflow
19 ------------------------------
22 Then, create your Meson cross file to use it, something like this
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-android34-clang']
30 …-x86_64/bin/aarch64-linux-android34-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-async…
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']
45 Now, use that cross file for your Android build directory (as in this
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=34 \
54 -Dandroid-stub=true \
55 -Dgallium-drivers= \
56 -Dvulkan-drivers=freedreno \
57 -Dfreedreno-kmds=kgsl
58 meson compile -C build-android-aarch64
61 ------------------------------------------
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
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
91 --------------------------------------
95 a read-only squashfs image on disk. For doing rapid driver
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
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 out-of-tree drivers to Android OS image
184 ----------------------------------------------
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
217 .. code-block:: sh
233 patchelf --set-soname libEGL_lp.so prebuilts/mesa/x86_64/libEGL.so
234 patchelf --set-soname libGLESv1_CM_lp.so prebuilts/mesa/x86_64/libGLESv1_CM.so
235 patchelf --set-soname libGLESv2_lp.so prebuilts/mesa/x86_64/libGLESv2.so
236 patchelf --set-soname vulkan.lvp.so prebuilts/mesa/x86_64/libvulkan_lvp.so
237 patchelf --set-soname libEGL_lp.so prebuilts/mesa/x86/libEGL.so
238 patchelf --set-soname libGLESv1_CM_lp.so prebuilts/mesa/x86/libGLESv1_CM.so
239 patchelf --set-soname libGLESv2_lp.so prebuilts/mesa/x86/libGLESv2.so
240 patchelf --set-soname vulkan.lvp.so prebuilts/mesa/x86/libvulkan_lvp.so
245 .. code-block::
348 .. code-block:: makefile
369 .. code-block:: makefile
376 .. code-block:: sh
391 .. code-block:: sh
393 $(call inherit-product, device/google/cuttlefish/shared/mesa/device_vendor.mk)
399 .. code-block:: sh
401 -include device/google/cuttlefish/shared/mesa/BoardConfig.mk