diff options
-rw-r--r-- | docs/README.booting.microblaze.md | 121 | ||||
-rw-r--r-- | docs/README.booting.versal.md | 117 | ||||
-rw-r--r-- | docs/README.booting.zynq.md | 124 | ||||
-rw-r--r-- | docs/README.booting.zynqmp.md | 141 |
4 files changed, 307 insertions, 196 deletions
diff --git a/docs/README.booting.microblaze.md b/docs/README.booting.microblaze.md index 1ffcc3c8..91c0eda9 100644 --- a/docs/README.booting.microblaze.md +++ b/docs/README.booting.microblaze.md | |||
@@ -4,11 +4,16 @@ Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI bo | |||
4 | 4 | ||
5 | * [Setting Up the Target](#setting-up-the-target) | 5 | * [Setting Up the Target](#setting-up-the-target) |
6 | * [Booting from JTAG](#booting-from-jtag) | 6 | * [Booting from JTAG](#booting-from-jtag) |
7 | * [Loading Bitstream using XSCT](#loading-bitstream-using-xsct) | 7 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
8 | * [Loading U-boot using XSCT](#loading-u-boot-using-xsct) | 8 | * [Deploying the images to target](#deploying-the-images-to-target) |
9 | * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) | 9 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
10 | * [Using XSCT](#using-xsct) | 10 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
11 | * [Using TFTP](#using-tftp) | 11 | * [Loading Bitstream using XSDB](#loading-bitstream-using-xsdb) |
12 | * [Loading U-boot using XSDB](#loading-u-boot-using-xsdb) | ||
13 | * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) | ||
14 | * [Using XSDB](#using-xsdb) | ||
15 | * [Using TFTP](#using-tftp) | ||
16 | * [Booting Linux](#booting-linux) | ||
12 | 17 | ||
13 | ## Setting Up the Target | 18 | ## Setting Up the Target |
14 | 19 | ||
@@ -34,59 +39,79 @@ Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI bo | |||
34 | 39 | ||
35 | ## Booting from JTAG | 40 | ## Booting from JTAG |
36 | 41 | ||
37 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 42 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
38 | the associated JTAG device drivers. This also requires access to the JTAG interface | 43 | the associated JTAG device drivers. This also requires access to the JTAG interface |
39 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 44 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
40 | modules. | 45 | modules. |
41 | 46 | ||
42 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 47 | ### Sourcing the XSDB tools |
43 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 48 | |
44 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 49 | Source the Vivado or Vitis tools `settings.sh` scripts. |
45 | Xilinx -> XSCT Console. | 50 | |
51 | ### Deploying the images to target | ||
52 | |||
53 | Deploying the images can be done in two methods. | ||
54 | |||
55 | #### Using devtool boot-jtag script | ||
56 | |||
57 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
58 | ``` | ||
59 | $ devtool boot-jtag --help | ||
60 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
61 | ``` | ||
62 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
63 | 3. Execute this script using xsdb tool as shown below. | ||
64 | ``` | ||
65 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl | ||
66 | ``` | ||
67 | |||
68 | #### Manually executing xsdb commands | ||
69 | |||
70 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
46 | ``` | 71 | ``` |
47 | $ xsct | 72 | $ xsdb |
48 | ``` | 73 | ``` |
49 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 74 | 2. In the XSDB console, connect to the target over JTAG using the connect command. |
50 | Optionally user can use `-url` to specify the local/remote hw_server. The | 75 | Optionally user can use `-url` to specify the local/remote hw_server. The |
51 | connect command returns the channel ID of the connection. | 76 | connect command returns the channel ID of the connection. |
52 | ``` | 77 | ``` |
53 | xsct% connect | 78 | xsdb% connect |
54 | ``` | 79 | ``` |
55 | 4. The targets command lists the available targets and allows you to select a | 80 | 3. The targets command lists the available targets and allows you to select a |
56 | target using its ID. The targets are assigned IDs as they are discovered on | 81 | target using its ID. The targets are assigned IDs as they are discovered on |
57 | the JTAG chain, so the IDs can change from session to session. | 82 | the JTAG chain, so the IDs can change from session to session. |
58 | ``` | 83 | ``` |
59 | xsct% targets | 84 | xsdb% targets |
60 | ``` | 85 | ``` |
61 | 86 | ||
62 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 87 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
63 | option to select a target instead of selecting the target using its ID. | 88 | option to select a target instead of selecting the target using its ID. |
64 | 89 | ||
65 | ### Loading Bitstream using XSCT | 90 | ##### Loading Bitstream using XSDB |
66 | 91 | ||
67 | * Download the bitstream for the target using XSCT with the `fpga` command. Microblaze | 92 | * Download the bitstream for the target using XSDB with the `fpga` command. Microblaze |
68 | bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user | 93 | bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user |
69 | can use `fpga -no-revision-check` to skip FPGA silicon revision. | 94 | can use `fpga -no-revision-check` to skip FPGA silicon revision. |
70 | 95 | ||
71 | ``` | 96 | ``` |
72 | xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit | 97 | xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit |
73 | xsct% after 2000 | 98 | xsdb% after 2000 |
74 | xsct% targets -set -nocase -filter {name =~ "microblaze*#0"} | 99 | xsdb% targets -set -nocase -filter {name =~ "microblaze*#0"} |
75 | xsct% catch {stop} | 100 | xsdb% catch {stop} |
76 | xsct% after 1000 | 101 | xsdb% after 1000 |
77 | ``` | 102 | ``` |
78 | ### Loading U-boot using XSCT | 103 | ##### Loading U-boot using XSDB |
79 | 104 | ||
80 | 1. Download `u-boot.elf` to the target CPU using XSCT. Microblaze u-boot.elf will be | 105 | 1. Download `u-boot.elf` to the target CPU using XSDB. Microblaze u-boot.elf will be |
81 | located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend | 106 | located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend |
82 | the execution of active target using `stop` command. | 107 | the execution of active target using `stop` command. |
83 | ``` | 108 | ``` |
84 | xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf | 109 | xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf |
85 | ``` | 110 | ``` |
86 | 2. After loading u-boot.elf resume the execution of active target using the `con` | 111 | 2. After loading u-boot.elf resume the execution of active target using the `con` |
87 | command in XSCT shell. | 112 | command in XSDB shell. |
88 | ``` | 113 | ``` |
89 | xsct% con | 114 | xsdb% con |
90 | ``` | 115 | ``` |
91 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 116 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
92 | ``` | 117 | ``` |
@@ -95,7 +120,7 @@ Hit any key to stop autoboot: 0 | |||
95 | U-Boot> | 120 | U-Boot> |
96 | ``` | 121 | ``` |
97 | 122 | ||
98 | ### Loading Kernel, Device tree, Root Filesystem and U-boot boot script | 123 | ##### Loading Kernel, Device tree, Root Filesystem and U-boot boot script |
99 | 124 | ||
100 | Load the images into the target DDR/MIG load address i.e., | 125 | Load the images into the target DDR/MIG load address i.e., |
101 | `DDR base address + <image_offset>`. MicroBlaze U-boot boot script(boot.scr) | 126 | `DDR base address + <image_offset>`. MicroBlaze U-boot boot script(boot.scr) |
@@ -121,48 +146,50 @@ this process can take a long time to execute (more than 10 minutes). If your | |||
121 | system has ethernet it is recommended that you use TFTP to load these images | 146 | system has ethernet it is recommended that you use TFTP to load these images |
122 | using U-Boot. | 147 | using U-Boot. |
123 | 148 | ||
124 | #### Using XSCT | 149 | ###### Using XSDB |
125 | 150 | ||
126 | 1. Suspend the execution of active target using `stop` command in XSCT. | 151 | 1. Suspend the execution of active target using `stop` command in XSDB. |
127 | ``` | 152 | ``` |
128 | xsct% stop | 153 | xsdb% stop |
129 | ``` | 154 | ``` |
130 | 2. Using the `dow` command to load the images into the target DDR/MIG | 155 | 2. Using the `dow` command to load the images into the target DDR/MIG |
131 | load address. | 156 | load address. |
132 | ``` | 157 | ``` |
133 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 | 158 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 |
134 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 | 159 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 |
135 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 | 160 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 |
136 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 | 161 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 |
137 | ``` | 162 | ``` |
138 | 163 | ||
139 | #### Using TFTP | 164 | ###### Using TFTP |
140 | 165 | ||
141 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 166 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
167 | so that you can load them from U-Boot. | ||
168 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
142 | ``` | 169 | ``` |
143 | U-Boot> set serverip <server ip> | 170 | U-Boot> set serverip <server ip> |
144 | U-Boot> set ipaddr <board ip> | 171 | U-Boot> set ipaddr <board ip> |
145 | ``` | 172 | ``` |
146 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 173 | 3. Load the images to DDR address. |
147 | ``` | 174 | ``` |
148 | U-Boot> tftpboot 0x80000000 ${TFTPDIR}/linux.bin.ub | 175 | U-Boot> tftpboot 0x80000000 linux.bin.ub |
149 | U-Boot> tftpboot 0x81e00000 ${TFTPDIR}/system.dtb | 176 | U-Boot> tftpboot 0x81e00000 system.dtb |
150 | U-Boot> tftpboot 0x82e00000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | 177 | U-Boot> tftpboot 0x82e00000 core-image-minimal-${MACHINE}.cpio.gz.u-boot |
151 | U-Boot> tftpboot 0xff200000 ${TFTPDIR}/boot.scr | 178 | U-Boot> tftpboot 0xff200000 boot.scr |
152 | ``` | 179 | ``` |
153 | 180 | ||
154 | ### Booting Linux | 181 | ##### Booting Linux |
155 | 182 | ||
156 | Once the images are loaded continue the execution. | 183 | Once the images are loaded continue the execution. |
157 | 184 | ||
158 | 1. After loading images resume the execution of active target using the `con` | 185 | 1. After loading images resume the execution of active target using the `con` |
159 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 186 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
160 | ``` | 187 | ``` |
161 | xsct% con | 188 | xsdb% con |
162 | ``` | 189 | ``` |
163 | 2. Terminate xsct shell. | 190 | 2. Terminate xsdb shell. |
164 | ``` | 191 | ``` |
165 | xsct% exit | 192 | xsdb% exit |
166 | ``` | 193 | ``` |
167 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 194 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
168 | ``` | 195 | ``` |
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 | ||
40 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 45 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
41 | the associated JTAG device drivers. This also requires access to the JTAG interface | 46 | the associated JTAG device drivers. This also requires access to the JTAG interface |
42 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 47 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
43 | modules. | 48 | modules. |
44 | 49 | ||
45 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 50 | ### Sourcing the XSDB tools |
46 | 2. 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 | 52 | Source the Vivado or Vitis tools `settings.sh` scripts. |
48 | Xilinx -> XSCT Console. | 53 | |
54 | ### Deploying the images to target | ||
55 | |||
56 | Deploying the images can be done in two methods. | ||
57 | |||
58 | #### Using devtool boot-jtag script | ||
59 | |||
60 | 1. 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 | ``` | ||
65 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
66 | 3. 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 | |||
73 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
49 | ``` | 74 | ``` |
50 | $ xsct | 75 | $ xsdb |
51 | ``` | 76 | ``` |
52 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 77 | 2. 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 | ``` |
56 | xsct% connect | 81 | xsdb% connect |
57 | ``` | 82 | ``` |
58 | 4. The targets command lists the available targets and allows you to select a | 83 | 3. 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 | ``` |
62 | xsct% targets | 87 | xsdb% 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 | ||
70 | 1. Download the boot.bin for the target using XSCT with the `device program` command. | 95 | 1. Download the boot.bin for the target using XSDB with the `device program` command. |
71 | Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default | 96 | Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default |
72 | boot.bin consists of boot pdi, plm.elf, psm.elf, bl31.elf, u-boot.elf and | 97 | boot.bin consists of boot pdi, plm.elf, psm.elf, bl31.elf, u-boot.elf and |
73 | system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file. | 98 | system.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 | ``` |
79 | xsct% targets -set -nocase -filter {name =~ "*PMC*"} | 104 | xsdb% targets -set -nocase -filter {name =~ "*PMC*"} |
80 | xsct% device program ${DEPLOY_DIR_IMAGE}/boot.bin | 105 | xsdb% device program ${DEPLOY_DIR_IMAGE}/boot.bin |
81 | xsct% targets -set -nocase -filter {name =~ "*A72*#0"} | 106 | xsdb% targets -set -nocase -filter {name =~ "*A72*#0"} |
82 | xsct% stop | 107 | xsdb% stop |
83 | ``` | 108 | ``` |
84 | 2. After loading boot.bin resume the execution of active target using the `con` | 109 | 2. After loading boot.bin resume the execution of active target using the `con` |
85 | command in XSCT shell. | 110 | command in XSDB shell. |
86 | ``` | 111 | ``` |
87 | xsct% con | 112 | xsdb% con |
88 | ``` | 113 | ``` |
89 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 114 | 3. 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 | |||
93 | U-Boot> | 118 | U-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 | ||
98 | Load the images into the target DDR/PL DRR load address i.e., | 123 | Load 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 | ||
124 | 1. Suspend the execution of active target using `stop` command in XSCT. | 149 | 1. Suspend the execution of active target using `stop` command in XSDB. |
125 | ``` | 150 | ``` |
126 | xsct% stop | 151 | xsdb% stop |
127 | ``` | 152 | ``` |
128 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load | 153 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load |
129 | address. | 154 | address. |
130 | ``` | 155 | ``` |
131 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 | 156 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 |
132 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000 | 157 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000 |
133 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | 158 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 |
134 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | 159 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 |
135 | xsct% targets -set -nocase -filter {name =~ "*A72*#0"} | 160 | xsdb% targets -set -nocase -filter {name =~ "*A72*#0"} |
136 | ``` | 161 | ``` |
137 | 162 | ||
138 | #### Using TFTP | 163 | ###### Using TFTP |
139 | 164 | ||
140 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 165 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
166 | so that you can load them from U-Boot. | ||
167 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
141 | ``` | 168 | ``` |
142 | Versal> set serverip <server ip> | 169 | Versal> set serverip <server ip> |
143 | Versal> set ipaddr <board ip> | 170 | Versal> set ipaddr <board ip> |
144 | ``` | 171 | ``` |
145 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 172 | 3. Load the images to DDR address. |
146 | ``` | 173 | ``` |
147 | U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image | 174 | U-Boot> tftpboot 0x200000 Image |
148 | U-Boot> tftpboot 0x1000 ${TFTPDIR}/system.dtb | 175 | U-Boot> tftpboot 0x1000 system.dtb |
149 | U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | 176 | U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot |
150 | U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr | 177 | U-Boot> tftpboot 0x20000000 boot.scr |
151 | 178 | ||
152 | ``` | 179 | ``` |
153 | ### Booting Linux | 180 | ##### Booting Linux |
154 | 181 | ||
155 | Once the images are loaded continue the execution. | 182 | Once the images are loaded continue the execution. |
156 | 183 | ||
157 | 1. After loading images resume the execution of active target using the `con` | 184 | 1. After loading images resume the execution of active target using the `con` |
158 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 185 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
159 | ``` | 186 | ``` |
160 | xsct% con | 187 | xsdb% con |
161 | ``` | 188 | ``` |
162 | 2. Terminate xsct shell. | 189 | 2. Terminate xsdb shell. |
163 | ``` | 190 | ``` |
164 | xsct% exit | 191 | xsdb% exit |
165 | ``` | 192 | ``` |
166 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 193 | 3. 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). |
182 | 2. With the card powered off, install the QSPI daughter card. | 209 | 2. With the card powered off, install the QSPI daughter card. |
183 | 3. Power on the VCK190 board and boot using JTAG or SD boot mode, to ensure that | 210 | 3. 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. |
186 | 4. Follow Flash boot instructions [README](README.booting.flash.md) for more details. | 213 | 4. Follow Flash boot instructions [README](README.booting.flash.md) for more details. |
187 | 5. After flashing the images, turn off the power switch on the board, and change | 214 | 5. 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). |
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). |
diff --git a/docs/README.booting.zynqmp.md b/docs/README.booting.zynqmp.md index c8f8aa21..80e6d5ae 100644 --- a/docs/README.booting.zynqmp.md +++ b/docs/README.booting.zynqmp.md | |||
@@ -5,10 +5,15 @@ NAND 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 | ||
@@ -34,37 +39,57 @@ NAND boot modes. | |||
34 | 39 | ||
35 | ## Booting from JTAG | 40 | ## Booting from JTAG |
36 | 41 | ||
37 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 42 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
38 | the associated JTAG device drivers. This also requires access to the JTAG interface | 43 | the associated JTAG device drivers. This also requires access to the JTAG interface |
39 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 44 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
40 | modules. | 45 | modules. |
41 | 46 | ||
42 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 47 | ### Sourcing the XSDB tools |
43 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 48 | |
44 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 49 | Source the Vivado or Vitis tools `settings.sh` scripts. |
45 | Xilinx -> XSCT Console. | 50 | |
51 | ### Deploying the images to target | ||
52 | |||
53 | Deploying the images can be done in two methods. | ||
54 | |||
55 | #### Using devtool boot-jtag script | ||
56 | |||
57 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
58 | ``` | ||
59 | $ devtool boot-jtag --help | ||
60 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
61 | ``` | ||
62 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
63 | 3. Execute this script using xsdb tool as shown below. | ||
64 | ``` | ||
65 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl | ||
66 | ``` | ||
67 | |||
68 | #### Manually executing xsdb commands | ||
69 | |||
70 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
46 | ``` | 71 | ``` |
47 | $ xsct | 72 | $ xsdb |
48 | ``` | 73 | ``` |
49 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 74 | 2. In the XSDB console, connect to the target over JTAG using the connect command. |
50 | Optionally user can use `-url` to specify the local/remote hw_server. The | 75 | Optionally user can use `-url` to specify the local/remote hw_server. The |
51 | connect command returns the channel ID of the connection. | 76 | connect command returns the channel ID of the connection. |
52 | ``` | 77 | ``` |
53 | xsct% connect | 78 | xsdb% connect |
54 | ``` | 79 | ``` |
55 | 4. The targets command lists the available targets and allows you to select a | 80 | 3. The targets command lists the available targets and allows you to select a |
56 | target using its ID. The targets are assigned IDs as they are discovered on | 81 | target using its ID. The targets are assigned IDs as they are discovered on |
57 | the JTAG chain, so the IDs can change from session to session. | 82 | the JTAG chain, so the IDs can change from session to session. |
58 | ``` | 83 | ``` |
59 | xsct% targets | 84 | xsdb% targets |
60 | ``` | 85 | ``` |
61 | 86 | ||
62 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 87 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
63 | option to select a target instead of selecting the target using its ID. | 88 | option to select a target instead of selecting the target using its ID. |
64 | 89 | ||
65 | ### Loading boot components using XSCT | 90 | ##### Loading boot components using XSDB |
66 | 91 | ||
67 | 1. Download the boot images for the target using XSCT with the `fpga` and `dow` | 92 | 1. Download the boot images for the target using XSDB with the `fpga` and `dow` |
68 | command. ZyqnMP boot images will be located in the `${DEPLOY_DIR_IMAGE}` | 93 | command. ZyqnMP boot images will be located in the `${DEPLOY_DIR_IMAGE}` |
69 | directory. | 94 | directory. |
70 | 95 | ||
@@ -73,43 +98,43 @@ xsct% targets | |||
73 | 98 | ||
74 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. | 99 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. |
75 | ``` | 100 | ``` |
76 | xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit | 101 | xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit |
77 | ``` | 102 | ``` |
78 | 3. By default, JTAG security gates are enabled. Disable the security gates for | 103 | 3. By default, JTAG security gates are enabled. Disable the security gates for |
79 | DAP, PL TAP, and PMU (this makes the PMU MB target visible to the debugger). | 104 | DAP, PL TAP, and PMU (this makes the PMU MB target visible to the debugger). |
80 | ``` | 105 | ``` |
81 | xsct% targets -set -nocase -filter {name =~ "*PSU*"} | 106 | xsdb% targets -set -nocase -filter {name =~ "*PSU*"} |
82 | xsct% mask_write 0xFFCA0038 0x1C0 0x1C0 | 107 | xsdb% mask_write 0xFFCA0038 0x1C0 0x1C0 |
83 | ``` | 108 | ``` |
84 | 3. Verify if the PMU MB target is listed under the PMU device. Now, load the PMU | 109 | 3. Verify if the PMU MB target is listed under the PMU device. Now, load the PMU |
85 | firmware. | 110 | firmware. |
86 | ``` | 111 | ``` |
87 | xsct% targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"} | 112 | xsdb% targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"} |
88 | xsct% catch {stop} | 113 | xsdb% catch {stop} |
89 | xsct% dow ${DEPLOY_DIR_IMAGE}/pmufw.elf | 114 | xsdb% dow ${DEPLOY_DIR_IMAGE}/pmufw.elf |
90 | xsct% con | 115 | xsdb% con |
91 | ``` | 116 | ``` |
92 | 5. Reset APU Cortex-A53 Core 0 to load and execute FSBL, This step is important, | 117 | 5. Reset APU Cortex-A53 Core 0 to load and execute FSBL, This step is important, |
93 | because when the ZynqMP boots up in JTAG boot mode, all the APU and RPU cores | 118 | because when the ZynqMP boots up in JTAG boot mode, all the APU and RPU cores |
94 | are held in reset. You must clear the resets on each core before performing | 119 | are held in reset. You must clear the resets on each core before performing |
95 | debugging on these cores. You can use the `rst` command in XSCT to clear the | 120 | debugging on these cores. You can use the `rst` command in XSDB to clear the |
96 | resets. | 121 | resets. |
97 | ``` | 122 | ``` |
98 | xsct% targets -set -nocase -filter {name =~ "*A53*#0"} | 123 | xsdb% targets -set -nocase -filter {name =~ "*A53*#0"} |
99 | xsct% rst -processor -clear-registers | 124 | xsdb% rst -processor -clear-registers |
100 | ``` | 125 | ``` |
101 | 6. Download and run FSBL from APU Cortex-A53 Core 0 | 126 | 6. Download and run FSBL from APU Cortex-A53 Core 0 |
102 | ``` | 127 | ``` |
103 | xsct% dow ${DEPLOY_DIR_IMAGE}/zynqmp_fsbl.elf | 128 | xsdb% dow ${DEPLOY_DIR_IMAGE}/zynqmp_fsbl.elf |
104 | xsct% con | 129 | xsdb% con |
105 | ``` | 130 | ``` |
106 | 7. Now download TF-A, U-boot.elf and Device tree to APU and execute. | 131 | 7. Now download TF-A, U-boot.elf and Device tree to APU and execute. |
107 | ``` | 132 | ``` |
108 | xsct% stop | 133 | xsdb% stop |
109 | xsct% dow ${DEPLOY_DIR_IMAGE}/bl31.elf | 134 | xsdb% dow ${DEPLOY_DIR_IMAGE}/bl31.elf |
110 | xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf | 135 | xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf |
111 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | 136 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 |
112 | xsct% con | 137 | xsdb% con |
113 | ``` | 138 | ``` |
114 | 139 | ||
115 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 140 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
@@ -119,7 +144,7 @@ Hit any key to stop autoboot: 0 | |||
119 | U-Boot> | 144 | U-Boot> |
120 | ``` | 145 | ``` |
121 | 146 | ||
122 | ### Loading Kernel, Root Filesystem and U-boot boot script | 147 | ##### Loading Kernel, Root Filesystem and U-boot boot script |
123 | 148 | ||
124 | Load the images into the target DDR/PL DRR load address i.e., | 149 | Load the images into the target DDR/PL DRR load address i.e., |
125 | `DDR base address + <image_offset>`. | 150 | `DDR base address + <image_offset>`. |
@@ -145,48 +170,50 @@ using U-Boot. | |||
145 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this | 170 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this |
146 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. | 171 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. |
147 | 172 | ||
148 | #### Using XSCT | 173 | ###### Using XSDB |
149 | 174 | ||
150 | 1. Suspend the execution of active target using `stop` command in XSCT. | 175 | 1. Suspend the execution of active target using `stop` command in XSDB. |
151 | ``` | 176 | ``` |
152 | xsct% stop | 177 | xsdb% stop |
153 | ``` | 178 | ``` |
154 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load | 179 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load |
155 | address. | 180 | address. |
156 | ``` | 181 | ``` |
157 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 | 182 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 |
158 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | 183 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 |
159 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | 184 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 |
160 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | 185 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 |
161 | ``` | 186 | ``` |
162 | 187 | ||
163 | #### Using TFTP | 188 | ###### Using TFTP |
164 | 189 | ||
165 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 190 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
191 | so that you can load them from U-Boot. | ||
192 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
166 | ``` | 193 | ``` |
167 | Versal> set serverip <server ip> | 194 | ZynqMP> set serverip <host-server-ip-address> |
168 | Versal> set ipaddr <board ip> | 195 | ZynqMP> set ipaddr <board-ip-address> |
169 | ``` | 196 | ``` |
170 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 197 | 3. Load the images to DDR address. |
171 | ``` | 198 | ``` |
172 | U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image | 199 | U-Boot> tftpboot 0x200000 Image |
173 | U-Boot> tftpboot 0x100000 ${TFTPDIR}/system.dtb | 200 | U-Boot> tftpboot 0x100000 system.dtb |
174 | U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | 201 | U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot |
175 | U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr | 202 | U-Boot> tftpboot 0x20000000 boot.scr |
176 | 203 | ||
177 | ``` | 204 | ``` |
178 | ### Booting Linux | 205 | ##### Booting Linux |
179 | 206 | ||
180 | Once the images are loaded continue the execution. | 207 | Once the images are loaded continue the execution. |
181 | 208 | ||
182 | 1. After loading images resume the execution of active target using the `con` | 209 | 1. After loading images resume the execution of active target using the `con` |
183 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 210 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
184 | ``` | 211 | ``` |
185 | xsct% con | 212 | xsdb% con |
186 | ``` | 213 | ``` |
187 | 2. Terminate xsct shell. | 214 | 2. Terminate xsdb shell. |
188 | ``` | 215 | ``` |
189 | xsct% exit | 216 | xsdb% exit |
190 | ``` | 217 | ``` |
191 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 218 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
192 | ``` | 219 | ``` |
@@ -204,9 +231,9 @@ U-Boot> boot | |||
204 | 231 | ||
205 | 1. To boot ZCU012 board in QSPI boot mode, Power on the ZCU102 board and boot | 232 | 1. To boot ZCU012 board in QSPI boot mode, Power on the ZCU102 board and boot |
206 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have | 233 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have |
207 | boot.bin copied to DDR location using XSCT `dow` or `tftpboot` or `fatload` | 234 | boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` |
208 | command. | 235 | command. |
209 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. | 236 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. |
210 | 3. After flashing the images, turn off the power switch on the board, and change | 237 | 3. After flashing the images, turn off the power switch on the board, and change |
211 | the SW6 boot mode pin settings to QSPI boot mode (1-ON, 2-ON, 3-OFF, 4-ON) by | 238 | the SW6 boot mode pin settings to QSPI boot mode (1-ON, 2-ON, 3-OFF, 4-ON) by |
212 | setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file | 239 | setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). |