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.md195
1 files changed, 144 insertions, 51 deletions
diff --git a/docs/README.booting.versal.md b/docs/README.booting.versal.md
index afdeba2b..25738784 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,61 @@ 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
60> **Note:** For Xen boot flow boot-jtag script doesn't include loading xen, kernel
61> and root filesystem, This step needs to be done manually as mentioned in XSDB
62> or TFTP method below.
63
641. Run devtool command to generate the boot-jtag.tcl script.
65```
66$ devtool boot-jtag --help
67$ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121
68```
692. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl
703. Execute this script using xsdb tool as shown below.
49``` 71```
50$ xsct 72$ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl
51``` 73```
523. In the XSCT console, connect to the target over JTAG using the connect command. 74
75#### Manually executing xsdb commands
76
771. Power on the board, Launch the XSDB shell from command line as shown below.
78```
79$ xsdb
80```
812. 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 82 Optionally user can use `-url` to specify the local/remote hw_server. The
54 connect command returns the channel ID of the connection. 83 connect command returns the channel ID of the connection.
55``` 84```
56xsct% connect 85xsdb% connect
57``` 86```
584. The targets command lists the available targets and allows you to select a 873. 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 88 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. 89 the JTAG chain, so the IDs can change from session to session.
61``` 90```
62xsct% targets 91xsdb% targets
63``` 92```
64 93
65> **Note:** For non-interactive usage such as scripting, you can use the `-filter` 94> **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. 95 option to select a target instead of selecting the target using its ID.
67 96
68### Loading boot.bin using XSCT 97##### Loading boot.bin using XSDB
69 98
701. Download the boot.bin for the target using XSCT with the `device program` command. 991. 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 100Versal 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 101boot.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. 102system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file.
@@ -76,15 +105,15 @@ system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file
76> u-boot and kernel. 105> u-boot and kernel.
77 106
78``` 107```
79xsct% targets -set -nocase -filter {name =~ "*PMC*"} 108xsdb% targets -set -nocase -filter {name =~ "*PMC*"}
80xsct% device program ${DEPLOY_DIR_IMAGE}/boot.bin 109xsdb% device program ${DEPLOY_DIR_IMAGE}/boot.bin
81xsct% targets -set -nocase -filter {name =~ "*A72*#0"} 110xsdb% targets -set -nocase -filter {name =~ "*A72*#0"}
82xsct% stop 111xsdb% stop
83``` 112```
842. After loading boot.bin resume the execution of active target using the `con` 1132. After loading boot.bin resume the execution of active target using the `con`
85command in XSCT shell. 114command in XSDB shell.
86``` 115```
87xsct% con 116xsdb% con
88``` 117```
893. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. 1183. In the target Serial Terminal, press any key to stop the U-Boot auto-boot.
90``` 119```
@@ -93,20 +122,38 @@ Hit any key to stop autoboot: 0
93U-Boot> 122U-Boot>
94``` 123```
95 124
96### Loading Kernel, Root Filesystem and U-boot boot script 125##### Loading Kernel, Root Filesystem and U-boot boot script
97 126
98Load the images into the target DDR/PL DRR load address i.e., 127Load the images into the target DDR/PL DRR load address i.e.,
99`DDR base address + <image_offset>`. 128`DDR base address + <image_offset>`.
100 129
101Below example uses base DDR address as 0x0 which matches in vivado address editor. 130Below example uses base DDR address as 0x0 which matches in vivado address editor.
102 131
1321. **Linux**
133
103| Image Type | Base DDR Address | Image Offset | Load Address in DDR | 134| Image Type | Base DDR Address | Image Offset | Load Address in DDR |
104|--------------------|------------------|--------------|---------------------| 135|--------------------|------------------|--------------|---------------------|
105| Kernel | 0x0 | 0x200000 | 0x200000 | 136| Linux Kernel | 0x0 | 0x200000 | 0x200000 |
106| Device Tree | 0x0 | 0x1000 | 0x1000 | 137| Device Tree Blob | 0x0 | 0x1000 | 0x1000 |
107| Rootfs | 0x0 | 0x4000000 | 0x4000000 | 138| Rootfs | 0x0 | 0x4000000 | 0x4000000 |
108| U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | 139| U-boot boot script | 0x0 | 0x20000000 | 0x20000000 |
109 140
1412. **Xen**
142
143> **Note:** Xen, Rootfs and Device Tree image offset is calculated as shown below.
144> * `Xen Rootfs = Base DDR Address + Linux Kernel Image Offset(0xE00000) + Size of Linux Kernel Image`
145> * `Xen Kernel = Base DDR Address + Xen Rootfs Image Offset (Ex: 0x2600000) + Size of Xen Rootfs`
146> * `Device Tree Blob = Base DDR Address + Xen Kernel Image Offset (Ex: 0xBA00000) + Size of Device Tree Blob`
147
148| Image Type | Base DDR Address | Image Offset | Load Address in DDR |
149|--------------------|------------------|--------------|---------------------|
150| Linux Kernel | 0x0 | 0xE00000 | 0xE00000 |
151| Xen Rootfs | 0x0 | 0x2600000 | 0x2600000 |
152| Xen Kernel | 0x0 | 0xBA00000 | 0xBA00000 |
153| Device Tree Blob | 0x0 | 0xC000000 | 0xC000000 |
154| U-boot boot script | 0x0 | 0x20000000 | 0x20000000 |
155
156
110> **Note:** 157> **Note:**
111> 1. `<target-image>` refers to core-image-minimal or petalinux-image-minimal 158> 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` 159> 2. For pxeboot boot create a symlink for `<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot`
@@ -119,55 +166,101 @@ using U-Boot.
119> 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this 166> 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. 167> is already part of boot.bin we can skip loading dtb, else load kernel dtb.
121 168
122#### Using XSCT 169###### Using XSDB
123 170
1241. Suspend the execution of active target using `stop` command in XSCT. 1711. Suspend the execution of active target using `stop` command in XSDB.
125``` 172```
126xsct% stop 173xsdb% stop
127``` 174```
1282. Using the `dow` command to load the images into the target DDR/PL DDR load 1752. Using the `dow` command to load the images into the target DDR/PL DDR load
129 address. 176 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 177
138#### Using TFTP 178 * Linux XSDB
179 ```
180 xsdb% targets -set -nocase -filter {name =~ "*A72*#0"}
181 xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000
182 xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000
183 xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000
184 xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000
185 ```
186
187 * Xen XSDB
188 ```
189 xsdb% targets -set -nocase -filter {name =~ "*A72*#0"}
190 xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0xE00000
191 xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz 0x2600000
192 xsdb% dow -data ${DEPLOY_DIR_IMAGE}/xen 0xBA00000
193 xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0xC000000
194 xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000
195 ```
196
197###### Using TFTP
139 198
1401. Configure the `ipaddr` and `serverip` of the U-Boot environment. 1991. Setup TFTP directory on host machine and copy the images to your TFTP directory
200 so that you can load them from U-Boot.
2012. Configure the `ipaddr` and `serverip` of the U-Boot environment.
141``` 202```
142Versal> set serverip <server ip> 203Versal> set serverip <server ip>
143Versal> set ipaddr <board ip> 204Versal> set ipaddr <board ip>
144``` 205```
1452. Load the images to DDR address. Make sure images are copied to tftp directory. 2063. Load the images to DDR address.
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 207
152``` 208 * Linux TFTP
153### Booting Linux 209 ```
210 U-Boot> tftpboot 0x200000 Image
211 U-Boot> tftpboot 0x1000 system.dtb
212 U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot
213 U-Boot> tftpboot 0x20000000 boot.scr
214 ```
215
216 * Xen TFTP
217 ```
218 U-Boot> tftpboot 0xE00000 Image
219 U-Boot> setenv kernel_size 0x$filesize
220 U-Boot> tftpboot 0x2600000 core-image-minimal-${MACHINE}.cpio.gz
221 U-Boot> setenv ramdisk_size 0x$filesize
222 U-Boot> tftpboot 0xBA00000 xen
223 U-Boot> tftpboot 0xC000000 system.dtb
224 U-Boot> tftpboot 0x20000000 boot.scr
225 ```
226
227##### Booting Linux
154 228
155Once the images are loaded continue the execution. 229Once the images are loaded continue the execution.
156 230
1571. After loading images resume the execution of active target using the `con` 2311. 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. 232command in XSDB shell, Skip step 1 for if you have used TFTP to load images.
159``` 233```
160xsct% con 234xsdb% con
161``` 235```
1622. Terminate xsct shell. 2362. Terminate xsdb shell.
163``` 237```
164xsct% exit 238xsdb% exit
165``` 239```
1663. In the target Serial Terminal, from U-Boot prompt run `boot` command. 2403. In the target Serial Terminal, from U-Boot prompt run `boot` command.
241
242* Linux boot
167``` 243```
168U-Boot> boot 244U-Boot> boot
169``` 245```
170 246
247* XEN JTAG boot
248
249 * XSDB
250 > **Note:** You need to calculate the Kernel(kernel_size) and ramdisk(ramdisk_size)
251 > image size manually from `${DEPLOY_DIR_IMAGE}` directory. For example if your
252 > kernel size is 24269312 bytes you need to convert to hex 0x1725200 and use it.
253 ```
254 U-Boot> setenv kernel_size <filesize>
255 U-Boot> setenv ramdisk_size <filesize>
256 U-Boot> boot
257 ```
258
259 * TFTP
260 ```
261 U-Boot> boot
262 ```
263
171## Booting from SD 264## Booting from SD
172 265
1731. Load the SD card into the VCK190 board in the J302 SD slot. 2661. Load the SD card into the VCK190 board in the J302 SD slot.
@@ -181,9 +274,9 @@ U-Boot> boot
181 card (part number: X_EBM-01, REV_A01). 274 card (part number: X_EBM-01, REV_A01).
1822. With the card powered off, install the QSPI daughter card. 2752. 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 2763. 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 277 U-Boot is running and also have boot.bin copied to DDR location using XSDB
185 `dow` or `tftpboot` or `fatload` command. 278 `dow` or `tftpboot` or `fatload` command.
1864. Follow Flash boot instructions [README](README.booting.flash.md) for more details. 2794. 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 2805. 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 281 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 282 setting the SW1. Refer [Setting Up the Target](#setting-up-the-target).