blob: 40774092fcc25b2d00a2ff080b470d10fec87b10 [file] [log] [blame]
Amit Pundiraa5b3062022-11-26 12:13:57 +05301These instructions will help you build upstream Mesa binaries for DB845c/RB5
2and prepare linaro vendor-package.
3
4
5Build and boot upstream Mesa (freedreno) with AOSP:
6---------------------------------------------------
7* Build AOSP with upstream Mesa:
8
9 $ mkdir $AOSP
10 $ cd $AOSP
Amit Pundir3cf82222024-03-09 11:15:26 +053011 $ repo init -u https://android.googlesource.com/platform/manifest -b master --repo-rev=stable
Amit Pundiraa5b3062022-11-26 12:13:57 +053012 $ repo sync -j`nproc`
13 $ cd $AOSP/external/mesa3d
14 $ git checkout aosp/upstream-main
15 $ cd $AOSP
16 $ . build/envsetup.sh
Amit Pundir3cf82222024-03-09 11:15:26 +053017 $ lunch db845c-trunk_staging-userdebug
Amit Pundiraa5b3062022-11-26 12:13:57 +053018 $ make TARGET_BUILD_MESA=true -j`nproc`
19
20* Boot the DB845c/RB5 in fastboot mode and flash the images:
21
22 $ cd $AOSP/out/target/product/db845c
23 $ fastboot flash super ./super.img flash boot ./boot.img \
24 flash vendor_boot ./vendor_boot.img reboot
25
26
27Updating the Mesa prebuilt binaries in linaro vendor-package:
28------------------------------------------------------------
29* Before we update and ship the new set of Mesa prebuilt binaries, please make
30 sure that there are no new or obvious regressions when we test run
Amit Pundir3cf82222024-03-09 11:15:26 +053031 CtsGraphicsTestcases, CtsDisplayTestCases and CtsSystemUiTestCases on DB845c and
Amit Pundiraa5b3062022-11-26 12:13:57 +053032 RB5 with the new binaries.
33
34 Report any breakages or regressions at https://gitlab.freedesktop.org/mesa/mesa/-/issues
35
36* Copy new Mesa binaries over from AOSP build:
37
38 $ git clone git@gitlab.com:LinaroLtd/linaro-aosp/linaro-vendor-package
39 $ cd linaro-vendor-package/src/db845c/mesa_prebuilt/
40 $ ./copy_bins.sh # This script will copy Mesa prebuilt binaries from \
41 $ANDROID_PRODUCT_OUT pre-set by "lunch db845c-userdebug" \
42 or user need to set it explicitly to $AOSP/out/target/product/db845c
43
44 Run "git status" to look for modified binaries. Discard any new *_dri.so in
45 ./lib{,64}/dri/ directory which are usually just a symlink to libgallium_dri.so.
46 Commit the changes with detailed change log and update top-level src/README
47 accordingly.
48
49
50Preparing linaro vendor-package for AOSP:
51-----------------------------------------
52* Follow instructions in src/README_PrepareVendorPackage to prepare linaro
53 vendor-package for AOSP.
54
55
56Troubleshooting:
57----------------
Amit Pundir3cf82222024-03-09 11:15:26 +053058* Upstream has a new dependency on meson version >= 0.54 and Python (3.x)
59 mako module >= 0.8.0 now, and that broke the build on Ubuntu 20.04.5.
60 So install python3-mako and update meson:
Amit Pundiraa5b3062022-11-26 12:13:57 +053061
Amit Pundir3cf82222024-03-09 11:15:26 +053062 $ sudo apt install python3-mako
Amit Pundiraa5b3062022-11-26 12:13:57 +053063
64 $ sudo add-apt-repository ppa:ubuntu-support-team/meson
65 $ sudo apt update
66 $ sudo apt install meson
Amit Pundiraa5b3062022-11-26 12:13:57 +053067 h/t: https://launchpad.net/~ubuntu-support-team/+archive/ubuntu/meson