diff options
Diffstat (limited to 'docs/README.booting.zynq.md')
-rw-r--r-- | docs/README.booting.zynq.md | 124 |
1 files changed, 77 insertions, 47 deletions
diff --git a/docs/README.booting.zynq.md b/docs/README.booting.zynq.md index a9b6e8f3..28aad78f 100644 --- a/docs/README.booting.zynq.md +++ b/docs/README.booting.zynq.md | |||
@@ -5,10 +5,15 @@ boot 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 components using XSCT](#loading-boot-components-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 components using XSDB](#loading-boot-components-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 | ||
@@ -35,37 +40,58 @@ boot modes. | |||
35 | --- | 40 | --- |
36 | ## Booting from JTAG | 41 | ## Booting from JTAG |
37 | 42 | ||
38 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 43 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
39 | the associated JTAG device drivers. This also requires access to the JTAG interface | 44 | the associated JTAG device drivers. This also requires access to the JTAG interface |
40 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 45 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
41 | modules. | 46 | modules. |
42 | 47 | ||
43 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 48 | ### Sourcing the XSDB tools |
44 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 49 | |
45 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 50 | Source the Vivado or Vitis tools `settings.sh` scripts. |
46 | Xilinx -> XSCT Console. | 51 | |
52 | ### Deploying the images to target | ||
53 | |||
54 | Deploying the images can be done in two methods. | ||
55 | |||
56 | #### Using devtool boot-jtag script | ||
57 | |||
58 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
59 | ``` | ||
60 | $ devtool boot-jtag --help | ||
61 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
62 | ``` | ||
63 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
64 | 3. Execute this script using xsdb tool as shown below. | ||
47 | ``` | 65 | ``` |
48 | $ xsct | 66 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl |
49 | ``` | 67 | ``` |
50 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 68 | |
69 | #### Manually executing xsdb commands | ||
70 | |||
71 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
72 | ``` | ||
73 | $ xsdb | ||
74 | ``` | ||
75 | 2. In the XSDB console, connect to the target over JTAG using the connect command. | ||
51 | Optionally user can use `-url` to specify the local/remote hw_server. The | 76 | Optionally user can use `-url` to specify the local/remote hw_server. The |
52 | connect command returns the channel ID of the connection. | 77 | connect command returns the channel ID of the connection. |
53 | ``` | 78 | ``` |
54 | xsct% connect | 79 | xsdb% connect |
55 | ``` | 80 | ``` |
56 | 4. The targets command lists the available targets and allows you to select a | 81 | 3. The targets command lists the available targets and allows you to select a |
57 | target using its ID. The targets are assigned IDs as they are discovered on | 82 | target using its ID. The targets are assigned IDs as they are discovered on |
58 | the JTAG chain, so the IDs can change from session to session. | 83 | the JTAG chain, so the IDs can change from session to session. |
59 | ``` | 84 | ``` |
60 | xsct% targets | 85 | xsdb% targets |
61 | ``` | 86 | ``` |
62 | 87 | ||
63 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 88 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
64 | option to select a target instead of selecting the target using its ID. | 89 | option to select a target instead of selecting the target using its ID. |
90 | |||
65 | --- | 91 | --- |
66 | ### Loading boot components using XSCT | 92 | ##### Loading boot components using XSDB |
67 | 93 | ||
68 | 1. Download the boot images for the target using XSCT with the `fpga` and `dow` | 94 | 1. Download the boot images for the target using XSDB with the `fpga` and `dow` |
69 | command. Zynq boot images will be located in the `${DEPLOY_DIR_IMAGE}` | 95 | command. Zynq boot images will be located in the `${DEPLOY_DIR_IMAGE}` |
70 | directory. | 96 | directory. |
71 | 97 | ||
@@ -74,24 +100,24 @@ xsct% targets | |||
74 | 100 | ||
75 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. | 101 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. |
76 | ``` | 102 | ``` |
77 | xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit | 103 | xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit |
78 | ``` | 104 | ``` |
79 | 3. Select APU Cortex-A9 Core 0 to load and execute FSBL. | 105 | 3. Select APU Cortex-A9 Core 0 to load and execute FSBL. |
80 | ``` | 106 | ``` |
81 | xsct% targets -set -nocase -filter {name =~ "arm*#0"} | 107 | xsdb% targets -set -nocase -filter {name =~ "arm*#0"} |
82 | xsct% catch {stop} | 108 | xsdb% catch {stop} |
83 | ``` | 109 | ``` |
84 | 5. Download and run FSBL from APU Cortex-A9 Core 0 | 110 | 5. Download and run FSBL from APU Cortex-A9 Core 0 |
85 | ``` | 111 | ``` |
86 | xsct% dow ${DEPLOY_DIR_IMAGE}/zynq_fsbl.elf | 112 | xsdb% dow ${DEPLOY_DIR_IMAGE}/zynq_fsbl.elf |
87 | xsct% con | 113 | xsdb% con |
88 | ``` | 114 | ``` |
89 | 7. Now download U-boot.elf and Device tree to APU and execute. | 115 | 7. Now download U-boot.elf and Device tree to APU and execute. |
90 | ``` | 116 | ``` |
91 | xsct% stop | 117 | xsdb% stop |
92 | xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf | 118 | xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf |
93 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | 119 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 |
94 | xsct% con | 120 | xsdb% con |
95 | ``` | 121 | ``` |
96 | 122 | ||
97 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 123 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
@@ -101,7 +127,7 @@ Hit any key to stop autoboot: 0 | |||
101 | U-Boot> | 127 | U-Boot> |
102 | ``` | 128 | ``` |
103 | --- | 129 | --- |
104 | ### Loading Kernel, Root Filesystem and U-boot boot script | 130 | ##### Loading Kernel, Root Filesystem and U-boot boot script |
105 | 131 | ||
106 | Load the images into the target DDR load address i.e., | 132 | Load the images into the target DDR load address i.e., |
107 | `DDR base address + <image_offset>`. | 133 | `DDR base address + <image_offset>`. |
@@ -127,53 +153,56 @@ using U-Boot. | |||
127 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this | 153 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this |
128 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. | 154 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. |
129 | --- | 155 | --- |
130 | #### Using XSCT | 156 | ###### Using XSDB |
131 | 157 | ||
132 | 1. Suspend the execution of active target using `stop` command in XSCT. | 158 | 1. Suspend the execution of active target using `stop` command in XSDB. |
133 | ``` | 159 | ``` |
134 | xsct% stop | 160 | xsdb% stop |
135 | ``` | 161 | ``` |
136 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load | 162 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load |
137 | address. | 163 | address. |
138 | ``` | 164 | ``` |
139 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/uImage 0x200000 | 165 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/uImage 0x200000 |
140 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | 166 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 |
141 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | 167 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 |
142 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x3000000 | 168 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x3000000 |
143 | ``` | 169 | ``` |
144 | --- | 170 | --- |
145 | #### Using TFTP | 171 | ###### Using TFTP |
146 | 172 | ||
147 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 173 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
174 | so that you can load them from U-Boot. | ||
175 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
148 | ``` | 176 | ``` |
149 | Versal> set serverip <server ip> | 177 | Versal> set serverip <server ip> |
150 | Versal> set ipaddr <board ip> | 178 | Versal> set ipaddr <board ip> |
151 | ``` | 179 | ``` |
152 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 180 | 3. Load the images to DDR address. |
153 | ``` | 181 | ``` |
154 | U-Boot> tftpboot 0x200000 ${TFTPDIR}/uImage | 182 | U-Boot> tftpboot 0x200000 uImage |
155 | U-Boot> tftpboot 0x100000 ${TFTPDIR}/system.dtb | 183 | U-Boot> tftpboot 0x100000 system.dtb |
156 | U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | 184 | U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot |
157 | U-Boot> tftpboot 0x3000000 ${TFTPDIR}/boot.scr | 185 | U-Boot> tftpboot 0x3000000 boot.scr |
158 | ``` | 186 | ``` |
159 | --- | 187 | --- |
160 | ### Booting Linux | 188 | ##### Booting Linux |
161 | 189 | ||
162 | Once the images are loaded continue the execution. | 190 | Once the images are loaded continue the execution. |
163 | 191 | ||
164 | 1. After loading images resume the execution of active target using the `con` | 192 | 1. After loading images resume the execution of active target using the `con` |
165 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 193 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
166 | ``` | 194 | ``` |
167 | xsct% con | 195 | xsdb% con |
168 | ``` | 196 | ``` |
169 | 2. Terminate xsct shell. | 197 | 2. Terminate xsdb shell. |
170 | ``` | 198 | ``` |
171 | xsct% exit | 199 | xsdb% exit |
172 | ``` | 200 | ``` |
173 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 201 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
174 | ``` | 202 | ``` |
175 | U-Boot> boot | 203 | U-Boot> boot |
176 | ``` | 204 | ``` |
205 | |||
177 | --- | 206 | --- |
178 | ## Booting from SD | 207 | ## Booting from SD |
179 | 208 | ||
@@ -181,14 +210,15 @@ U-Boot> boot | |||
181 | 2. Configure the ZC702 board to boot in SD-Boot mode (1-OFF, 2-OFF, 3-ON, 4-ON, 5-OFF) | 210 | 2. Configure the ZC702 board to boot in SD-Boot mode (1-OFF, 2-OFF, 3-ON, 4-ON, 5-OFF) |
182 | by setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). | 211 | by setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). |
183 | 3. Follow SD boot instructions [README](README.booting.storage.md) for more details. | 212 | 3. Follow SD boot instructions [README](README.booting.storage.md) for more details. |
213 | |||
184 | --- | 214 | --- |
185 | ## Booting from QSPI | 215 | ## Booting from QSPI |
186 | 216 | ||
187 | 1. To boot ZC702 board in QSPI boot mode, Power on the ZCU102 board and boot | 217 | 1. To boot ZC702 board in QSPI boot mode, Power on the ZCU102 board and boot |
188 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have | 218 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have |
189 | boot.bin copied to DDR location using XSCT `dow` or `tftpboot` or `fatload` | 219 | boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` |
190 | command. | 220 | command. |
191 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. | 221 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. |
192 | 3. After flashing the images, turn off the power switch on the board, and change | 222 | 3. After flashing the images, turn off the power switch on the board, and change |
193 | the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF) | 223 | the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF) |
194 | by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file | 224 | by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target). |