]> Git Repo - J-u-boot.git/blame - doc/board/qualcomm/sdm845.rst
Merge tag 'doc-next' of https://source.denx.de/u-boot/custodians/u-boot-efi into...
[J-u-boot.git] / doc / board / qualcomm / sdm845.rst
CommitLineData
80565ec6
DS
1.. SPDX-License-Identifier: GPL-2.0+
2.. sectionauthor:: Dzmitry Sankouski <[email protected]>
3
4Snapdragon 845
5================
6
7About this
8----------
9This document describes the information about Qualcomm Snapdragon 845
10supported boards and it's usage steps.
11
12SDM845 - hi-end qualcomm chip, introduced in late 2017.
13Mostly used in flagship phones and tablets of 2018.
14
20cbfd68
BS
15The current boot flow support loading u-boot as an Android boot image via
16Qualcomm's UEFI-based ABL (Android) Bootloader.
80565ec6
DS
17
18Installation
19------------
f8a1b338
DS
20Build
21^^^^^
22Setup ``CROSS_COMPILE`` for aarch64 and build U-Boot for your board::
80565ec6
DS
23
24 $ export CROSS_COMPILE=<aarch64 toolchain prefix>
25 $ make <your board name here, see Boards section>_defconfig
26 $ make
27
28This will build ``u-boot.bin`` in the configured output directory.
29
f8a1b338
DS
30Generate FIT image
31^^^^^^^^^^^^^^^^^^
32See doc/uImage.FIT for more details
33
34Pack android boot image
35^^^^^^^^^^^^^^^^^^^^^^^
36We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
37and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
d35b2113 38with appended dtb, so let's mimic linux to satisfy stock bootloader.
f8a1b338 39
d35b2113
SG
40Boards
41------------
42starqlte
43^^^^^^^^^^^^
44
45The starqltechn is a production board for Samsung S9 (SM-G9600) phone,
46based on the Qualcomm SDM845 SoC.
47
48Steps:
49
50- Build u-boot::
51
52 $ export CROSS_COMPILE=<aarch64 toolchain prefix>
53 $ make starqltechn_defconfig
54 $ make
55
56- Create dump dtb::
f8a1b338
DS
57
58 workdir=/tmp/prepare_payload
59 mkdir -p "$workdir"
60 cd "$workdir"
61 mock_dtb="$workdir"/payload_mock.dtb
62
63 dtc -I dts -O dtb -o "$mock_dtb" << EOF
64 /dts-v1/;
65 / {
66 memory {
67 /* We expect the bootloader to fill in the size */
68 reg = <0 0 0 0>;
69 };
70
71 chosen { };
72 };
73 EOF
74
d35b2113
SG
75- gzip u-boot::
76
77 gzip u-boot.bin
f8a1b338 78
d35b2113
SG
79- Append dtb to gzipped u-boot::
80
81 cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
82
83- Now we've got everything to build android boot image::
f8a1b338
DS
84
85 mkbootimg --base 0x0 --kernel_offset 0x00008000 \
86 --ramdisk_offset 0x02000000 --tags_offset 0x01e00000 \
87 --pagesize 4096 --second_offset 0x00f00000 \
88 --ramdisk "$fit_image" \
89 --kernel u-boot.bin.gz-dtb \
90 -o boot.img
91
d35b2113 92- Flash image with your phone's flashing method.
f8a1b338 93
d35b2113 94More information can be found on the `Samsung S9 page`_.
80565ec6 95
d35b2113
SG
96dragonboard845c
97^^^^^^^^^^^^^^^
80565ec6 98
d35b2113
SG
99The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
100the Qualcomm SDM845 SoC.
101
102Steps:
103
104- Build u-boot::
105
106 $ export CROSS_COMPILE=<aarch64 toolchain prefix>
107 $ make dragonboard845c_defconfig
108 $ make
109
110- Create dummy dtb::
111
112 workdir=/tmp/prepare_payload
113 mkdir -p "$workdir"
114 mock_dtb="$workdir"/payload_mock.dtb
115
116 dtc -I dts -O dtb -o "$mock_dtb" << EOF
117 /dts-v1/;
118 / {
119 #address-cells = <2>;
120 #size-cells = <2>;
121
122 memory@80000000 {
123 device_type = "memory";
124 /* We expect the bootloader to fill in the size */
125 reg = <0 0x80000000 0 0>;
126 };
127
128 chosen { };
129 };
130 EOF
131
132- gzip u-boot::
133
134 gzip u-boot.bin
135
136- Append dtb to gzipped u-boot::
137
138 cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
139
140- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/``
141 directory. It expects a folder as ``db845c_imgs/`` in the main directory
142 containing pre-built kernel, dts and ramdisk images. See ``db845c.its``
143 for full path to images::
144
145 mkimage -f db845c.its db845c.itb
146
147- Now we've got everything to build android boot image::
148
149 mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
150 --output boot.img --pagesize 4096 --base 0x80000000
151
152- Flash boot.img using db845c fastboot method.
153
154More information can be found on the `DragonBoard 845c page`_.
80565ec6
DS
155
156.. _Samsung S9 page: https://en.wikipedia.org/wiki/Samsung_Galaxy_S9
d35b2113 157.. _DragonBoard 845c page: https://www.96boards.org/product/rb3-platform/
This page took 0.087 seconds and 4 git commands to generate.