1 .. SPDX-License-Identifier: GPL-2.0+
9 This document describes the information about Qualcomm Snapdragon 845
10 supported boards and it's usage steps.
12 SDM845 - hi-end qualcomm chip, introduced in late 2017.
13 Mostly used in flagship phones and tablets of 2018.
15 The current boot flow support loading u-boot as an Android boot image via
16 Qualcomm's UEFI-based ABL (Android) Bootloader.
22 Setup ``CROSS_COMPILE`` for aarch64 and build U-Boot for your board::
24 $ export CROSS_COMPILE=<aarch64 toolchain prefix>
25 $ make <your board name here, see Boards section>_defconfig
28 This will build ``u-boot.bin`` in the configured output directory.
32 See doc/uImage.FIT for more details
34 Pack android boot image
35 ^^^^^^^^^^^^^^^^^^^^^^^
36 We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
37 and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
38 with appended dtb, so let's mimic linux to satisfy stock bootloader.
45 The starqltechn is a production board for Samsung S9 (SM-G9600) phone,
46 based on the Qualcomm SDM845 SoC.
52 $ export CROSS_COMPILE=<aarch64 toolchain prefix>
53 $ make starqltechn_defconfig
58 workdir=/tmp/prepare_payload
61 mock_dtb="$workdir"/payload_mock.dtb
63 dtc -I dts -O dtb -o "$mock_dtb" << EOF
67 /* We expect the bootloader to fill in the size */
79 - Append dtb to gzipped u-boot::
81 cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
83 - Now we've got everything to build android boot image::
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 \
92 - Flash image with your phone's flashing method.
94 More information can be found on the `Samsung S9 page`_.
99 The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
100 the Qualcomm SDM845 SoC.
106 $ export CROSS_COMPILE=<aarch64 toolchain prefix>
107 $ make dragonboard845c_defconfig
112 workdir=/tmp/prepare_payload
114 mock_dtb="$workdir"/payload_mock.dtb
116 dtc -I dts -O dtb -o "$mock_dtb" << EOF
119 #address-cells = <2>;
123 device_type = "memory";
124 /* We expect the bootloader to fill in the size */
125 reg = <0 0x80000000 0 0>;
136 - Append dtb to gzipped u-boot::
138 cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
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::
145 mkimage -f db845c.its db845c.itb
147 - Now we've got everything to build android boot image::
149 mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
150 --output boot.img --pagesize 4096 --base 0x80000000
152 - Flash boot.img using db845c fastboot method.
154 More information can be found on the `DragonBoard 845c page`_.
156 .. _Samsung S9 page: https://en.wikipedia.org/wiki/Samsung_Galaxy_S9
157 .. _DragonBoard 845c page: https://www.96boards.org/product/rb3-platform/