blob: f5c53e8360dfaf84d90eb98853b618981e37cb74 [file] [log] [blame]
Sumit Semwal4607dcf2023-07-18 18:36:06 +05301..
2 # Copyright (c) 2023, Linaro Ltd.
3 #
4 # SPDX-License-Identifier: MIT
5
6RB3
7===
8
Sumit Semwal9755e042023-11-30 16:34:51 +05309RB3 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 RB3 images with AOSP are
Sumit Semwal9755e042023-11-30 16:34:51 +053013listed `here <http://releases.devboardsforandroid.linaro.org/vendor-packages>`_.
Sumit Semwal4607dcf2023-07-18 18:36:06 +053014
Sumit Semwal9755e042023-11-30 16:34:51 +053015
16Getting started with RB3 (also known as DB845c)
17-----------------------------------------------
18
19Learn about your RB3 board as well as how to prepare and set up for basic
20use from the
21`96boards DB845c getting started page <https://www.96boards.org/documentation/consumer/dragonboard/dragonboard845c/getting-started/rb3-kit/>`_.
22
23Make sure you are running AOSP (ptable compatible) bootloader on DB845c. Latest
24bootloader binaries (build #97 and above) are `hosted here
25<http://snapshots.linaro.org/96boards/dragonboard845c/linaro/rescue/>`_.
26
27For flashing instructions checkout
28`96boards DB845c recovery page <https://www.96boards.org/documentation/consumer/dragonboard/dragonboard845c/installation/board-recovery.md.html>`_.
29
30NOTE:
31
32You can also update bootloader binaries by running **flashall** script, which is
33a part of the vendor package of the RB3 AOSP build target. Boot in fastboot mode
34and run following command from your HOST machine::
35
36 git clone https://gerrit.devboardsforandroid.linaro.org/linaro-vendor-package
37 cd src/db845c/dragonboard-845c-bootloader-ufs-aosp/
38 ./flashall
39
40
41Install pre-built AOSP images on RB3
42------------------------------------
43
44Linaro create daily AOSP builds for DB845c that user can download, flash and
45boot from. If you are interested in prebuilt AOSP images for DB845c and want to
46avoid compiling your own, please download and flash boot.img, vendor_boot.img,
47super.img and userdata.img from
48`the snapshot here <http://snapshots.linaro.org/96boards/dragonboard845c/linaro/aosp-master>`_.
49
50Flash downloaded AOSP images by running following commands, while booted
51in fastboot mode::
52
53 fastboot flash userdata userdata.img
54 fastboot flash super super.img
55 fastboot flash vendor_boot vendor_boot.img
56 fastboot flash boot boot.img
57
58
59Compile AOSP from sources for RB3
60---------------------------------
61
62#. Download the AOSP source tree and build db845c-userdebug build target:
63
64::
65
66 repo init -u https://android.googlesource.com/platform/manifest -b master
67 repo sync -j`nproc`
68 ./device/linaro/dragonboard/fetch-vendor-package.sh
69 source ./build/envsetup.sh
70 lunch db845c-trunk_staging-userdebug
71 make -j`nproc`
72
73
74#. Install: `Boot DB845c into fastboot mode <https://www.96boards.org/documentation/consumer/dragonboard/dragonboard845c/installation/board-recovery.md.html#booting-into-fastboot>`_ and run following command:
75
76::
77
78 ./device/linaro/dragonboard/installer/db845c/flash-all-aosp.sh
79
80You can also perform QDL board recovery by running following script after
81booting DB845c in `USB flashing mode <https://www.96boards.org/documentation/consumer/dragonboard/dragonboard845c/installation/board-recovery.md.html#connecting-the-board-in-usb-flashing-mode-aka-edl-mode>`_:
82
83::
84
85 ./device/linaro/dragonboard/installer/db845c/recovery.sh
86
87
88Building the kernel for RB3
89---------------------------
90
91The **Preferred** option is to build DB845c Android GKI kernel artifacts using
92official Bazel build. Run the following commands to clone the kernel source,
93prebuilt Android toolchains and build scripts.
94
95::
96
97 mkdir repo-db845c
98 cd repo-db845c
99 repo init -u https://android.googlesource.com/kernel/manifest -b common-android-mainline
100 repo sync -j`nproc`
101 tools/bazel clean
102 tools/bazel run //common:db845c_dist
103
104Now delete all the objects in
105$(AOSP_TOPDIR)device/linaro/dragonboard-kernel/android-mainline/, then copy
106build artifacts from out/db845c/dist/ to
107$(AOSP_TOPDIR)/device/linaro/dragonboard-kernel/android-mainline/
108
109If you want to properly test the GKI kernel, you should
110
111* grab the latest kernel_aarch64 build from
112 https://ci.android.com/builds/branches/aosp_kernel-common-android-mainline/grid?
113
114* under artifacts, download the Image.gz and copy it to
115 $(AOSP_TOPDIR)/device/linaro/dragonboard-kernel/android-mainline/
116
117Then rebuild AOSP using:
118
119::
120
121 make TARGET_KERNEL_USE=mainline -j`nproc`'
Sumit Semwal4607dcf2023-07-18 18:36:06 +0530122