diff options
| author | Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> | 2024-03-12 19:20:26 -0600 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2024-03-15 13:08:07 -0500 |
| commit | 670ff7ebfdc3507d6c19308f85dc144080e7586c (patch) | |
| tree | b36b887790297ca06449272eb36a0c2f1c6d8e38 /docs/README.booting.versal.md | |
| parent | 801768d6a28c198b317d54ed7c90d6dceca4ce99 (diff) | |
| download | meta-xilinx-670ff7ebfdc3507d6c19308f85dc144080e7586c.tar.gz | |
docs: Update JTAG boot instruction in README
1. Update JTAG boot instructions in README files.
2. Add devtool boot-jtag method.
3. Replace xsct with xsdb commands as new Vitis IDE doesn't support
xsct commands.
4. Fix tftpboot instructions.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'docs/README.booting.versal.md')
| -rw-r--r-- | docs/README.booting.versal.md | 117 |
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 | ||
| 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). |
