summaryrefslogtreecommitdiffstats
path: root/docs/README.booting.versal.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/README.booting.versal.md')
-rw-r--r--docs/README.booting.versal.md117
1 files changed, 72 insertions, 45 deletions
diff --git a/docs/README.booting.versal.md b/docs/README.booting.versal.md
index afdeba2b..ef817bf3 100644
--- a/docs/README.booting.versal.md
+++ b/docs/README.booting.versal.md
@@ -5,10 +5,15 @@ modes.
5 5
6* [Setting Up the Target](#setting-up-the-target) 6* [Setting Up the Target](#setting-up-the-target)
7* [Booting from JTAG](#booting-from-jtag) 7* [Booting from JTAG](#booting-from-jtag)
8 * [Loading boot.bin using XSCT](#loading-bootbin-using-xsct) 8 * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools)
9 * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) 9 * [Deploying the images to target](#deploying-the-images-to-target)
10 * [Using XSCT](#using-xsct) 10 * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script)
11 * [Using TFTP](#using-tftp) 11 * [Manually executing xsdb commands](#manually-executing-xsdb-commands)
12 * [Loading boot.bin using XSDB](#loading-bootbin-using-xsdb)
13 * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script)
14 * [Using XSDB](#using-xsdb)
15 * [Using TFTP](#using-tftp)
16 * [Booting Linux](#booting-linux)
12* [Booting from SD](#booting-from-sd) 17* [Booting from SD](#booting-from-sd)
13* [Booting from QSPI](#booting-from-qspi) 18* [Booting from QSPI](#booting-from-qspi)
14 19
@@ -37,37 +42,57 @@ modes.
37 42
38## Booting from JTAG 43## Booting from JTAG
39 44
40This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and 45This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and
41the associated JTAG device drivers. This also requires access to the JTAG interface 46the 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 47on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG
43modules. 48modules.
44 49
451. Source the Vivado or Vitis tools `settings.sh` scripts. 50### Sourcing the XSDB tools
462. Power on the board, Open the XSCT console in the Vitis IDE by clicking the 51
47 XSCT button. Alternatively, you can also open the XSCT console by selecting 52Source the Vivado or Vitis tools `settings.sh` scripts.
48 Xilinx -> XSCT Console. 53
54### Deploying the images to target
55
56Deploying the images can be done in two methods.
57
58#### Using devtool boot-jtag script
59
601. Run devtool command to generate the boot-jtag.tcl script.
61```
62$ devtool boot-jtag --help
63$ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121
64```
652. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl
663. Execute this script using xsdb tool as shown below.
67```
68$ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl
69```
70
71#### Manually executing xsdb commands
72
731. Power on the board, Launch the XSDB shell from command line as shown below.
49``` 74```
50$ xsct 75$ xsdb
51``` 76```
523. In the XSCT console, connect to the target over JTAG using the connect command. 772. In the XSDB 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 78 Optionally user can use `-url` to specify the local/remote hw_server. The
54 connect command returns the channel ID of the connection. 79 connect command returns the channel ID of the connection.
55``` 80```
56xsct% connect 81xsdb% connect
57``` 82```
584. The targets command lists the available targets and allows you to select a 833. 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 84 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. 85 the JTAG chain, so the IDs can change from session to session.
61``` 86```
62xsct% targets 87xsdb% targets
63``` 88```
64 89
65> **Note:** For non-interactive usage such as scripting, you can use the `-filter` 90> **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. 91 option to select a target instead of selecting the target using its ID.
67 92
68### Loading boot.bin using XSCT 93##### Loading boot.bin using XSDB
69 94
701. Download the boot.bin for the target using XSCT with the `device program` command. 951. Download the boot.bin for the target using XSDB with the `device program` command.
71Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default 96Versal 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 97boot.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. 98system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file.
@@ -76,15 +101,15 @@ system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file
76> u-boot and kernel. 101> u-boot and kernel.
77 102
78``` 103```
79xsct% targets -set -nocase -filter {name =~ "*PMC*"} 104xsdb% targets -set -nocase -filter {name =~ "*PMC*"}
80xsct% device program ${DEPLOY_DIR_IMAGE}/boot.bin 105xsdb% device program ${DEPLOY_DIR_IMAGE}/boot.bin
81xsct% targets -set -nocase -filter {name =~ "*A72*#0"} 106xsdb% targets -set -nocase -filter {name =~ "*A72*#0"}
82xsct% stop 107xsdb% stop
83``` 108```
842. After loading boot.bin resume the execution of active target using the `con` 1092. After loading boot.bin resume the execution of active target using the `con`
85command in XSCT shell. 110command in XSDB shell.
86``` 111```
87xsct% con 112xsdb% con
88``` 113```
893. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. 1143. In the target Serial Terminal, press any key to stop the U-Boot auto-boot.
90``` 115```
@@ -93,7 +118,7 @@ Hit any key to stop autoboot: 0
93U-Boot> 118U-Boot>
94``` 119```
95 120
96### Loading Kernel, Root Filesystem and U-boot boot script 121##### Loading Kernel, Root Filesystem and U-boot boot script
97 122
98Load the images into the target DDR/PL DRR load address i.e., 123Load the images into the target DDR/PL DRR load address i.e.,
99`DDR base address + <image_offset>`. 124`DDR base address + <image_offset>`.
@@ -119,49 +144,51 @@ using U-Boot.
119> 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this 144> 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. 145> is already part of boot.bin we can skip loading dtb, else load kernel dtb.
121 146
122#### Using XSCT 147###### Using XSDB
123 148
1241. Suspend the execution of active target using `stop` command in XSCT. 1491. Suspend the execution of active target using `stop` command in XSDB.
125``` 150```
126xsct% stop 151xsdb% stop
127``` 152```
1282. Using the `dow` command to load the images into the target DDR/PL DDR load 1532. Using the `dow` command to load the images into the target DDR/PL DDR load
129 address. 154 address.
130``` 155```
131xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 156xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000
132xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000 157xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000
133xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 158xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000
134xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 159xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000
135xsct% targets -set -nocase -filter {name =~ "*A72*#0"} 160xsdb% targets -set -nocase -filter {name =~ "*A72*#0"}
136``` 161```
137 162
138#### Using TFTP 163###### Using TFTP
139 164
1401. Configure the `ipaddr` and `serverip` of the U-Boot environment. 1651. Setup TFTP directory on host machine and copy the images to your TFTP directory
166 so that you can load them from U-Boot.
1672. Configure the `ipaddr` and `serverip` of the U-Boot environment.
141``` 168```
142Versal> set serverip <server ip> 169Versal> set serverip <server ip>
143Versal> set ipaddr <board ip> 170Versal> set ipaddr <board ip>
144``` 171```
1452. Load the images to DDR address. Make sure images are copied to tftp directory. 1723. Load the images to DDR address.
146``` 173```
147U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image 174U-Boot> tftpboot 0x200000 Image
148U-Boot> tftpboot 0x1000 ${TFTPDIR}/system.dtb 175U-Boot> tftpboot 0x1000 system.dtb
149U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 176U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot
150U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr 177U-Boot> tftpboot 0x20000000 boot.scr
151 178
152``` 179```
153### Booting Linux 180##### Booting Linux
154 181
155Once the images are loaded continue the execution. 182Once the images are loaded continue the execution.
156 183
1571. After loading images resume the execution of active target using the `con` 1841. 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. 185command in XSDB shell, Skip step 1 for if you have used TFTP to load images.
159``` 186```
160xsct% con 187xsdb% con
161``` 188```
1622. Terminate xsct shell. 1892. Terminate xsdb shell.
163``` 190```
164xsct% exit 191xsdb% exit
165``` 192```
1663. In the target Serial Terminal, from U-Boot prompt run `boot` command. 1933. In the target Serial Terminal, from U-Boot prompt run `boot` command.
167``` 194```
@@ -181,9 +208,9 @@ U-Boot> boot
181 card (part number: X_EBM-01, REV_A01). 208 card (part number: X_EBM-01, REV_A01).
1822. With the card powered off, install the QSPI daughter card. 2092. 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 2103. 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 211 U-Boot is running and also have boot.bin copied to DDR location using XSDB
185 `dow` or `tftpboot` or `fatload` command. 212 `dow` or `tftpboot` or `fatload` command.
1864. Follow Flash boot instructions [README](README.booting.flash.md) for more details. 2134. 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 2145. 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 215 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 216 setting the SW1. Refer [Setting Up the Target](#setting-up-the-target).