blob: 40774092fcc25b2d00a2ff080b470d10fec87b10 [file] [log] [blame]
These instructions will help you build upstream Mesa binaries for DB845c/RB5
and prepare linaro vendor-package.
Build and boot upstream Mesa (freedreno) with AOSP:
---------------------------------------------------
* Build AOSP with upstream Mesa:
$ mkdir $AOSP
$ cd $AOSP
$ repo init -u https://android.googlesource.com/platform/manifest -b master --repo-rev=stable
$ repo sync -j`nproc`
$ cd $AOSP/external/mesa3d
$ git checkout aosp/upstream-main
$ cd $AOSP
$ . build/envsetup.sh
$ lunch db845c-trunk_staging-userdebug
$ make TARGET_BUILD_MESA=true -j`nproc`
* Boot the DB845c/RB5 in fastboot mode and flash the images:
$ cd $AOSP/out/target/product/db845c
$ fastboot flash super ./super.img flash boot ./boot.img \
flash vendor_boot ./vendor_boot.img reboot
Updating the Mesa prebuilt binaries in linaro vendor-package:
------------------------------------------------------------
* Before we update and ship the new set of Mesa prebuilt binaries, please make
sure that there are no new or obvious regressions when we test run
CtsGraphicsTestcases, CtsDisplayTestCases and CtsSystemUiTestCases on DB845c and
RB5 with the new binaries.
Report any breakages or regressions at https://gitlab.freedesktop.org/mesa/mesa/-/issues
* Copy new Mesa binaries over from AOSP build:
$ git clone git@gitlab.com:LinaroLtd/linaro-aosp/linaro-vendor-package
$ cd linaro-vendor-package/src/db845c/mesa_prebuilt/
$ ./copy_bins.sh # This script will copy Mesa prebuilt binaries from \
$ANDROID_PRODUCT_OUT pre-set by "lunch db845c-userdebug" \
or user need to set it explicitly to $AOSP/out/target/product/db845c
Run "git status" to look for modified binaries. Discard any new *_dri.so in
./lib{,64}/dri/ directory which are usually just a symlink to libgallium_dri.so.
Commit the changes with detailed change log and update top-level src/README
accordingly.
Preparing linaro vendor-package for AOSP:
-----------------------------------------
* Follow instructions in src/README_PrepareVendorPackage to prepare linaro
vendor-package for AOSP.
Troubleshooting:
----------------
* Upstream has a new dependency on meson version >= 0.54 and Python (3.x)
mako module >= 0.8.0 now, and that broke the build on Ubuntu 20.04.5.
So install python3-mako and update meson:
$ sudo apt install python3-mako
$ sudo add-apt-repository ppa:ubuntu-support-team/meson
$ sudo apt update
$ sudo apt install meson
h/t: https://launchpad.net/~ubuntu-support-team/+archive/ubuntu/meson