Sumit Semwal | 4607dcf | 2023-07-18 18:36:06 +0530 | [diff] [blame] | 1 | .. |
| 2 | # Copyright (c) 2023, Linaro Ltd. |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | |
| 6 | RB5 |
| 7 | === |
| 8 | |
Sumit Semwal | c85d3d8 | 2023-11-30 16:00:06 +0530 | [diff] [blame] | 9 | RB5 is one of the supported dev-boards listed on |
Sumit Semwal | 4607dcf | 2023-07-18 18:36:06 +0530 | [diff] [blame] | 10 | `source.android.com <https://source.android.com/docs/setup/create/devices>`_. |
| 11 | |
| 12 | The vendor-packages required to build RB5 images with AOSP are |
Sumit Semwal | d12538e | 2023-08-28 20:09:58 +0530 | [diff] [blame] | 13 | listed `here <http://releases.devboardsforandroid.linaro.org/vendor-packages>`_ |
Sumit Semwal | 4607dcf | 2023-07-18 18:36:06 +0530 | [diff] [blame] | 14 | |
Sumit Semwal | c85d3d8 | 2023-11-30 16:00:06 +0530 | [diff] [blame] | 15 | |
| 16 | Getting started with RB5 |
| 17 | ------------------------ |
| 18 | |
| 19 | Learn about your RB5 as well as how to prepare and set up for basic use from the |
| 20 | `96boards RB5 getting started page <https://www.96boards.org/documentation/consumer/dragonboard/qualcomm-robotics-rb5>`_. |
| 21 | |
| 22 | Make sure you are running AOSP (ptable compatible) bootloader on RB5. Latest |
| 23 | bootloader binaries (build #29 and above) are `hosted here |
| 24 | <http://snapshots.linaro.org/96boards/qrb5165-rb5/linaro/rescue>`_. |
| 25 | |
| 26 | For flashing instructions checkout `96boards RB5 recovery page <https://www.96boards.org/documentation/consumer/dragonboard/qualcomm-robotics-rb5/installation/board-recovery.md.html>`_. |
| 27 | |
| 28 | NOTE: |
| 29 | |
| 30 | You can also update bootloader binaries by running flashall script, which is |
| 31 | a part of the vendor package of RB5 AOSP build target. Boot in fastboot mode |
| 32 | and run following command from your HOST machine:: |
| 33 | |
| 34 | git clone https://gerrit.devboardsforandroid.linaro.org/linaro-vendor-package |
| 35 | cd src/rb5/rb5-bootloader-ufs-aosp/ |
| 36 | ./flashall |
| 37 | |
| 38 | |
| 39 | Install pre-built AOSP images on RB5 |
| 40 | ------------------------------------ |
| 41 | |
| 42 | Linaro creates daily AOSP builds for RB5 that user can download, flash and boot |
| 43 | from. If you are interested in prebuilt AOSP images for RB5 and want to avoid |
| 44 | compiling your own, please download and flash boot.img, vendor_boot.img, |
| 45 | super.img and userdata.img from |
| 46 | `the snapshot here <https://snapshots.linaro.org/96boards/dragonboard845c/linaro/aosp-master/>`_. |
| 47 | |
| 48 | Flash downloaded AOSP images by running following commands, while booted |
| 49 | in fastboot mode:: |
| 50 | |
| 51 | fastboot flash userdata userdata.img |
| 52 | fastboot flash super super.img |
| 53 | fastboot flash vendor_boot vendor_boot.img |
| 54 | fastboot flash boot boot.img |
| 55 | |
| 56 | |
| 57 | Compile AOSP from sources for RB5 |
| 58 | --------------------------------- |
| 59 | |
| 60 | #. Download the AOSP source tree and build rb5-userdebug build target: |
| 61 | |
| 62 | :: |
| 63 | |
| 64 | repo init -u https://android.googlesource.com/platform/manifest -b master |
| 65 | repo sync -j`nproc` |
| 66 | ./device/linaro/dragonboard/fetch-vendor-package.sh |
| 67 | source ./build/envsetup.sh |
| 68 | lunch db845c-trunk_staging-userdebug #DB845c builds boot on RB5 as well. |
| 69 | make -j`nproc` |
| 70 | |
| 71 | |
| 72 | #. Install: `Boot RB5 into fastboot mode <https://www.96boards.org/documentation/consumer/dragonboard/qualcomm-robotics-rb5/installation/board-recovery.md.html#booting-into-fastboot>`_ and run following command: |
| 73 | |
| 74 | :: |
| 75 | |
| 76 | ./device/linaro/dragonboard/installer/rb5/flash-all-aosp.sh |
| 77 | |
| 78 | You can also perform QDL board recovery by running following script after |
| 79 | booting RB5 in `USB flashing mode <https://www.96boards.org/documentation/consumer/dragonboard/qualcomm-robotics-rb5/installation/board-recovery.md.html#connecting-the-board-in-usb-flashing-mode-aka-edl-mode>`_: |
| 80 | |
| 81 | :: |
| 82 | |
| 83 | ./device/linaro/dragonboard/installer/rb5/recovery.sh |
| 84 | |
| 85 | |
| 86 | Building the kernel for RB5 |
| 87 | --------------------------- |
| 88 | |
| 89 | The **Preferred** option is to build RB5 Android GKI kernel artifacts using |
| 90 | Bazel build. Run the following commands to clone the kernel source, prebuilt |
| 91 | Android toolchains and build scripts. |
| 92 | |
| 93 | :: |
| 94 | |
| 95 | mkdir repo-rb5 |
| 96 | cd repo-rb5 |
| 97 | repo init -u https://android.googlesource.com/kernel/manifest -b common-android-mainline |
| 98 | repo sync -j`nproc` |
| 99 | tools/bazel clean |
| 100 | tools/bazel run //common:db845c_dist |
| 101 | |
| 102 | Now delete all the objects in |
| 103 | $(AOSP_TOPDIR)device/linaro/dragonboard-kernel/android-mainline/, then copy |
| 104 | build artifacts from out/db845c/dist/ to |
| 105 | $(AOSP_TOPDIR)/device/linaro/dragonboard-kernel/android-mainline/ |
| 106 | |
| 107 | If you want to properly test the GKI kernel, you should |
| 108 | |
| 109 | * grab the latest kernel_aarch64 build from |
| 110 | https://ci.android.com/builds/branches/aosp_kernel-common-android-mainline/grid? |
| 111 | |
| 112 | * under artifacts, download the Image.gz and copy it to |
| 113 | $(AOSP_TOPDIR)/device/linaro/dragonboard-kernel/android-mainline/ |
| 114 | |
| 115 | Then rebuild AOSP using: |
| 116 | |
| 117 | :: |
| 118 | |
| 119 | make TARGET_KERNEL_USE=mainline -j`nproc`' |
| 120 | |
| 121 | ToDo / Known Issues |
| 122 | ------------------- |
| 123 | |
| 124 | * Factory version of RB5 comes with older version of lt9611uxc firmware flashed |
| 125 | on it, so in case you do not see display up and running then please upgrade |
| 126 | the lt9611uxc firmware version to v43 or newer. |
| 127 | |
| 128 | * WiFi-BT drivers are WIP and not upstreamed yet. You can find the patches here |
| 129 | https://git.linaro.org/people/amit.pundir/linux.git/log/?h=rbX-mainline |
Sumit Semwal | 4607dcf | 2023-07-18 18:36:06 +0530 | [diff] [blame] | 130 | |
Sumit Semwal | 8a2cb27 | 2023-11-30 19:58:00 +0530 | [diff] [blame] | 131 | |
| 132 | Device Maintainer(s) |
| 133 | ******************** |
| 134 | - Amit Pundir <pundir at #aosp-developers on OFTC IRC> |