]> Git Repo - u-boot.git/blob - doc/board/qualcomm/qcs404.rst
bbb40b043b3a0070808a502046bdde5e8864bd6c
[u-boot.git] / doc / board / qualcomm / qcs404.rst
1 .. SPDX-License-Identifier: GPL-2.0+
2 .. sectionauthor:: Sumit Garg <[email protected]>
3
4 QCS404 EVB
5 ==========
6
7 About this
8 ----------
9 This document describes the information about Qualcomm QCS404 evaluation board
10 and it's usage steps.
11
12 U-Boot can be used as a replacement for Qualcomm's original ABL (UEFI) bootloader.
13 It is loaded as an Android boot image through ABL
14
15 Installation
16 ------------
17 Build
18 ^^^^^
19 Setup ``CROSS_COMPILE`` for aarch64 and build U-Boot for your board::
20
21         $ export CROSS_COMPILE=<aarch64 toolchain prefix>
22         $ make qcs404evb_defconfig
23         $ make
24
25 This will build ``u-boot.bin`` in the configured output directory.
26
27 Generate FIT image
28 ^^^^^^^^^^^^^^^^^^
29 A ``qcs404.its`` file can be found in ``board/qualcomm/qcs404-evb/`` directory.
30 It expects a folder as ``qcs404_imgs/`` in the main directory containing
31 pre-built kernel, dts and ramdisk images. See ``qcs404.its`` for full path to
32 images.
33
34 - Build FIT image::
35
36         mkimage -f qcs404-evb.its qcs404-evb.itb
37
38 Pack android boot image
39 ^^^^^^^^^^^^^^^^^^^^^^^
40 We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
41 and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
42 with appended dtb, so let's mimic linux to satisfy stock bootloader:
43
44 - create dump dtb::
45
46         workdir=/tmp/prepare_payload
47         mkdir -p "$workdir"
48         cd "$workdir"
49         mock_dtb="$workdir"/payload_mock.dtb
50
51         dtc -I dts -O dtb -o "$mock_dtb" << EOF
52         /dts-v1/;
53         / {
54                 model = "Qualcomm Technologies, Inc. QCS404 EVB 4000";
55                 compatible = "qcom,qcs404-evb-4000", "qcom,qcs404-evb", "qcom,qcs404";
56
57                 #address-cells = <2>;
58                 #size-cells = <2>;
59
60                 memory@80000000 {
61                         device_type = "memory";
62                         /* We expect the bootloader to fill in the size */
63                         reg = <0 0x80000000 0 0>;
64                 };
65
66                 chosen { };
67         };
68         EOF
69
70 - gzip u-boot ``gzip u-boot.bin``
71 - append dtb to gzipped u-boot: ``cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb``
72
73 Now we've got everything to build android boot image:::
74
75         mkbootimg --kernel u-boot.bin.gz-dtb \
76         --ramdisk qcs404-evb.itb --pagesize 4096 \
77         --base 0x80000000 --output boot.img
78
79 Flash image on qcs404-evb using fastboot method.
This page took 0.018001 seconds and 2 git commands to generate.