summaryrefslogtreecommitdiffstats
path: root/docs/README.booting.versal.md
diff options
context:
space:
mode:
authorSandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>2023-02-26 23:12:20 -0700
committerMark Hatle <mark.hatle@amd.com>2023-04-10 09:03:22 -0700
commit757705bb7d825f9b05ccc25e5dcef4de35316b17 (patch)
treee1cac167d1a8bf968cfd21e597ed8e3f2123f4fc /docs/README.booting.versal.md
parenta7e29ded2e51ee48dcafd07e365e1b93c63a3a74 (diff)
downloadmeta-xilinx-757705bb7d825f9b05ccc25e5dcef4de35316b17.tar.gz
docs: Add README for booting instructions for all devices
Add README for booting instructions for all devices with supported boot mediums. Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'docs/README.booting.versal.md')
-rw-r--r--docs/README.booting.versal.md189
1 files changed, 189 insertions, 0 deletions
diff --git a/docs/README.booting.versal.md b/docs/README.booting.versal.md
new file mode 100644
index 00000000..afdeba2b
--- /dev/null
+++ b/docs/README.booting.versal.md
@@ -0,0 +1,189 @@
1# Booting OS Images on Versal target boards
2
3Booting OS images on Versal boards can be done using JTAG, SD, eMMC and QSPI boot
4modes.
5
6* [Setting Up the Target](#setting-up-the-target)
7* [Booting from JTAG](#booting-from-jtag)
8 * [Loading boot.bin using XSCT](#loading-bootbin-using-xsct)
9 * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script)
10 * [Using XSCT](#using-xsct)
11 * [Using TFTP](#using-tftp)
12* [Booting from SD](#booting-from-sd)
13* [Booting from QSPI](#booting-from-qspi)
14
15## Setting Up the Target
16
17> **Note:** For versal-generic machine configuration file VCK190 evaluation
18> board is used as reference.
19
201. Connect a USB cable between the FTDI FT4232HL U20 USB-to-Quad-UART bridge USB
21 Type-C connector on the target and the USB port on the host machine.
222. Connect 12V power to the VCK190 6-Pin Molex connector and turn on the board
23 power with the SW13 switch.
243. Default UART terminal (serial port) settings is Speed `115200`, Data `8 bit`,
25 Parity `None`, Stop bits ` 1 bit` and Flow control `None`.
264. Set the board to JTAG and other boot modes by setting the boot mode switch by
27 referring to board user guide. For VCK190 board Below is the configuration
28 boot mode settings (SW1).
29
30> **Note:** Switch OFF = 1 = High; ON = 0 = Low
31
32| Boot Mode | Mode Pins [3:0] | Mode SW1 [4:1] | Comments |
33|-----------|-----------------|-------------------|---------------------------------------------------|
34| JTAG | 0000 | ON, ON, ON, ON | Supported with or without boot module attached |
35| QSPI | 0010 | ON, ON, OFF, ON | Supported only with boot module X-EBM-01 attached |
36| SD | 1110 | OFF, OFF, OFF, ON | Supported with or without boot module attached |
37
38## Booting from JTAG
39
40This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and
41the associated JTAG device drivers. This also requires access to the JTAG interface
42on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG
43modules.
44
451. Source the Vivado or Vitis tools `settings.sh` scripts.
462. Power on the board, Open the XSCT console in the Vitis IDE by clicking the
47 XSCT button. Alternatively, you can also open the XSCT console by selecting
48 Xilinx -> XSCT Console.
49```
50$ xsct
51```
523. In the XSCT console, connect to the target over JTAG using the connect command.
53 Optionally user can use `-url` to specify the local/remote hw_server. The
54 connect command returns the channel ID of the connection.
55```
56xsct% connect
57```
584. The targets command lists the available targets and allows you to select a
59 target using its ID. The targets are assigned IDs as they are discovered on
60 the JTAG chain, so the IDs can change from session to session.
61```
62xsct% targets
63```
64
65> **Note:** For non-interactive usage such as scripting, you can use the `-filter`
66 option to select a target instead of selecting the target using its ID.
67
68### Loading boot.bin using XSCT
69
701. Download the boot.bin for the target using XSCT with the `device program` command.
71Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default
72boot.bin consists of boot pdi, plm.elf, psm.elf, bl31.elf, u-boot.elf and
73system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file.
74
75> **Note:** In yocto by default, ${DEPLOY_DIR_IMAGE}/system.dtb is used for both
76> u-boot and kernel.
77
78```
79xsct% targets -set -nocase -filter {name =~ "*PMC*"}
80xsct% device program ${DEPLOY_DIR_IMAGE}/boot.bin
81xsct% targets -set -nocase -filter {name =~ "*A72*#0"}
82xsct% stop
83```
842. After loading boot.bin resume the execution of active target using the `con`
85command in XSCT shell.
86```
87xsct% con
88```
893. In the target Serial Terminal, press any key to stop the U-Boot auto-boot.
90```
91...
92Hit any key to stop autoboot: 0
93U-Boot>
94```
95
96### Loading Kernel, Root Filesystem and U-boot boot script
97
98Load the images into the target DDR/PL DRR load address i.e.,
99`DDR base address + <image_offset>`.
100
101Below example uses base DDR address as 0x0 which matches in vivado address editor.
102
103| Image Type | Base DDR Address | Image Offset | Load Address in DDR |
104|--------------------|------------------|--------------|---------------------|
105| Kernel | 0x0 | 0x200000 | 0x200000 |
106| Device Tree | 0x0 | 0x1000 | 0x1000 |
107| Rootfs | 0x0 | 0x4000000 | 0x4000000 |
108| U-boot boot script | 0x0 | 0x20000000 | 0x20000000 |
109
110> **Note:**
111> 1. `<target-image>` refers to core-image-minimal or petalinux-image-minimal
112> 2. For pxeboot boot create a symlink for `<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot`
113> as shown `$ ln -sf ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot ${DEPLOY_DIR_IMAGE}/rootfs.cpio.gz.u-boot`
114> to ensure the INITRD name in pxeboot.cfg matches with image name.
115> 3. Whilst it is possible to load the images via JTAG this connection is slow and
116this process can take a long time to execute (more than 10 minutes). If your
117system has ethernet it is recommended that you use TFTP to load these images
118using U-Boot.
119> 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this
120> is already part of boot.bin we can skip loading dtb, else load kernel dtb.
121
122#### Using XSCT
123
1241. Suspend the execution of active target using `stop` command in XSCT.
125```
126xsct% stop
127```
1282. Using the `dow` command to load the images into the target DDR/PL DDR load
129 address.
130```
131xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000
132xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000
133xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000
134xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000
135xsct% targets -set -nocase -filter {name =~ "*A72*#0"}
136```
137
138#### Using TFTP
139
1401. Configure the `ipaddr` and `serverip` of the U-Boot environment.
141```
142Versal> set serverip <server ip>
143Versal> set ipaddr <board ip>
144```
1452. Load the images to DDR address. Make sure images are copied to tftp directory.
146```
147U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image
148U-Boot> tftpboot 0x1000 ${TFTPDIR}/system.dtb
149U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot
150U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr
151
152```
153### Booting Linux
154
155Once the images are loaded continue the execution.
156
1571. After loading images resume the execution of active target using the `con`
158command in XSCT shell, Skip step 1 for if you have used TFTP to load images.
159```
160xsct% con
161```
1622. Terminate xsct shell.
163```
164xsct% exit
165```
1663. In the target Serial Terminal, from U-Boot prompt run `boot` command.
167```
168U-Boot> boot
169```
170
171## Booting from SD
172
1731. Load the SD card into the VCK190 board in the J302 SD slot.
1742. Configure the VCK190 board to boot in SD-Boot mode (1-ON, 2-OFF, 3-OFF, 4-OFF)
175 by setting the SW1. Refer [Setting Up the Target](#setting-up-the-target).
1763. Follow SD boot instructions [README](README.booting.storage.md) for more details.
177
178## Booting from QSPI
179
1801. To boot VCK190 board in QSPI boot mode, you need to connect a QSPI daughter
181 card (part number: X_EBM-01, REV_A01).
1822. With the card powered off, install the QSPI daughter card.
1833. Power on the VCK190 board and boot using JTAG or SD boot mode, to ensure that
184 U-Boot is running and also have boot.bin copied to DDR location using XSCT
185 `dow` or `tftpboot` or `fatload` command.
1864. Follow Flash boot instructions [README](README.booting.flash.md) for more details.
1875. After flashing the images, turn off the power switch on the board, and change
188 the SW1 boot mode pin settings to QSPI boot mode (1-ON, 2-OFF, 3-ON, 4-ON) by
189 setting the SW1. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file