Testing AOSP build experience for MR10183
By opening this issue I want to share my experience building mesa3d on AOSP with !10183 (merged) merged.
This should become part of CI pipeline.
# Your machine should have 200GB of free disk space and at least 16GB of RAM. Or 8GB of RAM + 8GB swap space enabled.
# Download AOSP
mkdir aosp && cd aosp
repo init -u https://android.googlesource.com/platform/manifest -b refs/tags/android-11.0.0_r37
repo sync -c
# Update mesa3d
cd external/mesa3d
git remote add mainline https://gitlab.freedesktop.org/mesa/mesa.git
git remote update mainline
git checkout mainline/main
cd -
# Upgrade libdrm
cd external/libdrm
git remote update
git checkout android-s-beta-1
git revert e1e2e964a79986adae0409ec4b56a1bcdf65f4c1 --no-edit
git merge aosp/upstream-master --no-edit
cd -
# Download LLVMv11 from @maurossi,
git clone --branch release_11.x https://github.com/maurossi/llvm-project.git external/llvm-project
# Add configuration definitions to BoardConfig.mk
echo "BOARD_MESA3D_USES_MESON_BUILD := true" >> device/google/cuttlefish/vsoc_x86_64/BoardConfig.mk
echo "BOARD_MESA3D_GALLIUM_DRIVERS := i915 iris nouveau r300 r600 radeonsi svga virgl tegra zink" >> device/google/cuttlefish/vsoc_x86_64/BoardConfig.mk
echo "BOARD_MESA3D_VULKAN_DRIVERS := intel amd swrast virtio-experimental" >> device/google/cuttlefish/vsoc_x86_64/BoardConfig.mk
echo "BOARD_MESA3D_USES_MESON_BUILD := true" >> device/linaro/dragonboard/db845c/BoardConfig.mk
echo "BOARD_MESA3D_BUILD_LIBGBM := true" >> device/linaro/dragonboard/db845c/BoardConfig.mk
echo "BOARD_MESA3D_GALLIUM_DRIVERS := kmsro v3d vc4 lima panfrost freedreno etnaviv swrast virgl asahi zink" >> device/linaro/dragonboard/db845c/BoardConfig.mk
echo "BOARD_MESA3D_VULKAN_DRIVERS := freedreno broadcom swrast virtio-experimental" >> device/linaro/dragonboard/db845c/BoardConfig.mk
# Build Docker container image
docker build -t glodroid https://github.com/GloDroid/glodroid_manifest.git#next
# Run the docker container
docker run -it -v $(pwd):/home/user/aosp:z --user "$(id -u):$(id -g)" glodroid
# Prepare and run the build
source build/envsetup.sh
lunch aosp_cf_x86_64_phone-userdebug
mmma external/mesa3d
lunch db845c-userdebug
mmma external/mesa3d