Amit Pundir | aa5b306 | 2022-11-26 12:13:57 +0530 | [diff] [blame] | 1 | These instructions will help you build upstream Mesa binaries for DB845c/RB5 |
| 2 | and prepare linaro vendor-package. |
| 3 | |
| 4 | |
| 5 | Build and boot upstream Mesa (freedreno) with AOSP: |
| 6 | --------------------------------------------------- |
| 7 | * Build AOSP with upstream Mesa: |
| 8 | |
| 9 | $ mkdir $AOSP |
| 10 | $ cd $AOSP |
Amit Pundir | 3cf8222 | 2024-03-09 11:15:26 +0530 | [diff] [blame] | 11 | $ repo init -u https://android.googlesource.com/platform/manifest -b master --repo-rev=stable |
Amit Pundir | aa5b306 | 2022-11-26 12:13:57 +0530 | [diff] [blame] | 12 | $ repo sync -j`nproc` |
| 13 | $ cd $AOSP/external/mesa3d |
| 14 | $ git checkout aosp/upstream-main |
| 15 | $ cd $AOSP |
| 16 | $ . build/envsetup.sh |
Amit Pundir | 3cf8222 | 2024-03-09 11:15:26 +0530 | [diff] [blame] | 17 | $ lunch db845c-trunk_staging-userdebug |
Amit Pundir | aa5b306 | 2022-11-26 12:13:57 +0530 | [diff] [blame] | 18 | $ 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 | |
| 27 | Updating 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 Pundir | 3cf8222 | 2024-03-09 11:15:26 +0530 | [diff] [blame] | 31 | CtsGraphicsTestcases, CtsDisplayTestCases and CtsSystemUiTestCases on DB845c and |
Amit Pundir | aa5b306 | 2022-11-26 12:13:57 +0530 | [diff] [blame] | 32 | 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 | |
| 50 | Preparing linaro vendor-package for AOSP: |
| 51 | ----------------------------------------- |
| 52 | * Follow instructions in src/README_PrepareVendorPackage to prepare linaro |
| 53 | vendor-package for AOSP. |
| 54 | |
| 55 | |
| 56 | Troubleshooting: |
| 57 | ---------------- |
Amit Pundir | 3cf8222 | 2024-03-09 11:15:26 +0530 | [diff] [blame] | 58 | * 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 Pundir | aa5b306 | 2022-11-26 12:13:57 +0530 | [diff] [blame] | 61 | |
Amit Pundir | 3cf8222 | 2024-03-09 11:15:26 +0530 | [diff] [blame] | 62 | $ sudo apt install python3-mako |
Amit Pundir | aa5b306 | 2022-11-26 12:13:57 +0530 | [diff] [blame] | 63 | |
| 64 | $ sudo add-apt-repository ppa:ubuntu-support-team/meson |
| 65 | $ sudo apt update |
| 66 | $ sudo apt install meson |
Amit Pundir | aa5b306 | 2022-11-26 12:13:57 +0530 | [diff] [blame] | 67 | h/t: https://launchpad.net/~ubuntu-support-team/+archive/ubuntu/meson |