blob: cd29547983cc770c422669caeb6c45463a38ae0f [file] [log] [blame]
Sumit Semwal4607dcf2023-07-18 18:36:06 +05301..
2 # Copyright (c) 2023, Linaro Ltd.
3 #
4 # SPDX-License-Identifier: MIT
5
6RB5
7===
8
Sumit Semwalc85d3d82023-11-30 16:00:06 +05309RB5 is one of the supported dev-boards listed on
Sumit Semwal4607dcf2023-07-18 18:36:06 +053010`source.android.com <https://source.android.com/docs/setup/create/devices>`_.
11
12The vendor-packages required to build RB5 images with AOSP are
Sumit Semwald12538e2023-08-28 20:09:58 +053013listed `here <http://releases.devboardsforandroid.linaro.org/vendor-packages>`_
Sumit Semwal4607dcf2023-07-18 18:36:06 +053014
Sumit Semwalc85d3d82023-11-30 16:00:06 +053015
16Getting started with RB5
17------------------------
18
19Learn 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
22Make sure you are running AOSP (ptable compatible) bootloader on RB5. Latest
23bootloader binaries (build #29 and above) are `hosted here
24<http://snapshots.linaro.org/96boards/qrb5165-rb5/linaro/rescue>`_.
25
26For flashing instructions checkout `96boards RB5 recovery page <https://www.96boards.org/documentation/consumer/dragonboard/qualcomm-robotics-rb5/installation/board-recovery.md.html>`_.
27
28NOTE:
29
30You can also update bootloader binaries by running flashall script, which is
31a part of the vendor package of RB5 AOSP build target. Boot in fastboot mode
32and 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
39Install pre-built AOSP images on RB5
40------------------------------------
41
42Linaro creates daily AOSP builds for RB5 that user can download, flash and boot
43from. If you are interested in prebuilt AOSP images for RB5 and want to avoid
44compiling your own, please download and flash boot.img, vendor_boot.img,
45super.img and userdata.img from
46`the snapshot here <https://snapshots.linaro.org/96boards/dragonboard845c/linaro/aosp-master/>`_.
47
48Flash downloaded AOSP images by running following commands, while booted
49in 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
57Compile 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
78You can also perform QDL board recovery by running following script after
79booting 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
86Building the kernel for RB5
87---------------------------
88
89The **Preferred** option is to build RB5 Android GKI kernel artifacts using
90Bazel build. Run the following commands to clone the kernel source, prebuilt
91Android 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
102Now delete all the objects in
103$(AOSP_TOPDIR)device/linaro/dragonboard-kernel/android-mainline/, then copy
104build artifacts from out/db845c/dist/ to
105$(AOSP_TOPDIR)/device/linaro/dragonboard-kernel/android-mainline/
106
107If 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
115Then rebuild AOSP using:
116
117::
118
119 make TARGET_KERNEL_USE=mainline -j`nproc`'
120
121ToDo / 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 Semwal4607dcf2023-07-18 18:36:06 +0530130
Sumit Semwal8a2cb272023-11-30 19:58:00 +0530131
132Device Maintainer(s)
133********************
134- Amit Pundir <pundir at #aosp-developers on OFTC IRC>