From 670ff7ebfdc3507d6c19308f85dc144080e7586c Mon Sep 17 00:00:00 2001 From: Sandeep Gundlupet Raju Date: Tue, 12 Mar 2024 19:20:26 -0600 Subject: 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 Signed-off-by: Mark Hatle --- docs/README.booting.microblaze.md | 121 +++++++++++++++++++------------- docs/README.booting.versal.md | 117 +++++++++++++++++++------------ docs/README.booting.zynq.md | 124 ++++++++++++++++++++------------- docs/README.booting.zynqmp.md | 141 +++++++++++++++++++++++--------------- 4 files changed, 307 insertions(+), 196 deletions(-) (limited to 'docs') 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 * [Setting Up the Target](#setting-up-the-target) * [Booting from JTAG](#booting-from-jtag) - * [Loading Bitstream using XSCT](#loading-bitstream-using-xsct) - * [Loading U-boot using XSCT](#loading-u-boot-using-xsct) - * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) - * [Using XSCT](#using-xsct) - * [Using TFTP](#using-tftp) + * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) + * [Deploying the images to target](#deploying-the-images-to-target) + * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) + * [Manually executing xsdb commands](#manually-executing-xsdb-commands) + * [Loading Bitstream using XSDB](#loading-bitstream-using-xsdb) + * [Loading U-boot using XSDB](#loading-u-boot-using-xsdb) + * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) + * [Using XSDB](#using-xsdb) + * [Using TFTP](#using-tftp) + * [Booting Linux](#booting-linux) ## Setting Up the Target @@ -34,59 +39,79 @@ Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI bo ## Booting from JTAG -This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and +This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and the associated JTAG device drivers. This also requires access to the JTAG interface on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG modules. -1. Source the Vivado or Vitis tools `settings.sh` scripts. -2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the - XSCT button. Alternatively, you can also open the XSCT console by selecting - Xilinx -> XSCT Console. +### Sourcing the XSDB tools + +Source the Vivado or Vitis tools `settings.sh` scripts. + +### Deploying the images to target + +Deploying the images can be done in two methods. + +#### Using devtool boot-jtag script + +1. Run devtool command to generate the boot-jtag.tcl script. +``` +$ devtool boot-jtag --help +$ devtool boot-jtag --image core-image-minimal --hw_server TCP::3121 +``` +2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl +3. Execute this script using xsdb tool as shown below. +``` +$ xsdb /boot-jtag.tcl +``` + +#### Manually executing xsdb commands + +1. Power on the board, Launch the XSDB shell from command line as shown below. ``` -$ xsct +$ xsdb ``` -3. In the XSCT console, connect to the target over JTAG using the connect command. +2. In the XSDB console, connect to the target over JTAG using the connect command. Optionally user can use `-url` to specify the local/remote hw_server. The connect command returns the channel ID of the connection. ``` -xsct% connect +xsdb% connect ``` -4. The targets command lists the available targets and allows you to select a +3. The targets command lists the available targets and allows you to select a target using its ID. The targets are assigned IDs as they are discovered on the JTAG chain, so the IDs can change from session to session. ``` -xsct% targets +xsdb% targets ``` > **Note:** For non-interactive usage such as scripting, you can use the `-filter` option to select a target instead of selecting the target using its ID. -### Loading Bitstream using XSCT +##### Loading Bitstream using XSDB -* Download the bitstream for the target using XSCT with the `fpga` command. Microblaze +* Download the bitstream for the target using XSDB with the `fpga` command. Microblaze bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user can use `fpga -no-revision-check` to skip FPGA silicon revision. ``` -xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit -xsct% after 2000 -xsct% targets -set -nocase -filter {name =~ "microblaze*#0"} -xsct% catch {stop} -xsct% after 1000 +xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit +xsdb% after 2000 +xsdb% targets -set -nocase -filter {name =~ "microblaze*#0"} +xsdb% catch {stop} +xsdb% after 1000 ``` -### Loading U-boot using XSCT +##### Loading U-boot using XSDB -1. Download `u-boot.elf` to the target CPU using XSCT. Microblaze u-boot.elf will be +1. Download `u-boot.elf` to the target CPU using XSDB. Microblaze u-boot.elf will be located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend the execution of active target using `stop` command. ``` -xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf +xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf ``` 2. After loading u-boot.elf resume the execution of active target using the `con` -command in XSCT shell. +command in XSDB shell. ``` -xsct% con +xsdb% con ``` 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. ``` @@ -95,7 +120,7 @@ Hit any key to stop autoboot: 0 U-Boot> ``` -### Loading Kernel, Device tree, Root Filesystem and U-boot boot script +##### Loading Kernel, Device tree, Root Filesystem and U-boot boot script Load the images into the target DDR/MIG load address i.e., `DDR base address + `. 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 system has ethernet it is recommended that you use TFTP to load these images using U-Boot. -#### Using XSCT +###### Using XSDB -1. Suspend the execution of active target using `stop` command in XSCT. +1. Suspend the execution of active target using `stop` command in XSDB. ``` -xsct% stop +xsdb% stop ``` 2. Using the `dow` command to load the images into the target DDR/MIG load address. ``` -xsct% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 ``` -#### Using TFTP +###### Using TFTP -1. Configure the `ipaddr` and `serverip` of the U-Boot environment. +1. Setup TFTP directory on host machine and copy the images to your TFTP directory + so that you can load them from U-Boot. +2. Configure the `ipaddr` and `serverip` of the U-Boot environment. ``` U-Boot> set serverip U-Boot> set ipaddr ``` -2. Load the images to DDR address. Make sure images are copied to tftp directory. +3. Load the images to DDR address. ``` -U-Boot> tftpboot 0x80000000 ${TFTPDIR}/linux.bin.ub -U-Boot> tftpboot 0x81e00000 ${TFTPDIR}/system.dtb -U-Boot> tftpboot 0x82e00000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot -U-Boot> tftpboot 0xff200000 ${TFTPDIR}/boot.scr +U-Boot> tftpboot 0x80000000 linux.bin.ub +U-Boot> tftpboot 0x81e00000 system.dtb +U-Boot> tftpboot 0x82e00000 core-image-minimal-${MACHINE}.cpio.gz.u-boot +U-Boot> tftpboot 0xff200000 boot.scr ``` -### Booting Linux +##### Booting Linux Once the images are loaded continue the execution. 1. After loading images resume the execution of active target using the `con` -command in XSCT shell, Skip step 1 for if you have used TFTP to load images. +command in XSDB shell, Skip step 1 for if you have used TFTP to load images. ``` -xsct% con +xsdb% con ``` -2. Terminate xsct shell. +2. Terminate xsdb shell. ``` -xsct% exit +xsdb% exit ``` 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. ``` 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. * [Setting Up the Target](#setting-up-the-target) * [Booting from JTAG](#booting-from-jtag) - * [Loading boot.bin using XSCT](#loading-bootbin-using-xsct) - * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) - * [Using XSCT](#using-xsct) - * [Using TFTP](#using-tftp) + * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) + * [Deploying the images to target](#deploying-the-images-to-target) + * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) + * [Manually executing xsdb commands](#manually-executing-xsdb-commands) + * [Loading boot.bin using XSDB](#loading-bootbin-using-xsdb) + * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) + * [Using XSDB](#using-xsdb) + * [Using TFTP](#using-tftp) + * [Booting Linux](#booting-linux) * [Booting from SD](#booting-from-sd) * [Booting from QSPI](#booting-from-qspi) @@ -37,37 +42,57 @@ modes. ## Booting from JTAG -This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and +This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and the associated JTAG device drivers. This also requires access to the JTAG interface on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG modules. -1. Source the Vivado or Vitis tools `settings.sh` scripts. -2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the - XSCT button. Alternatively, you can also open the XSCT console by selecting - Xilinx -> XSCT Console. +### Sourcing the XSDB tools + +Source the Vivado or Vitis tools `settings.sh` scripts. + +### Deploying the images to target + +Deploying the images can be done in two methods. + +#### Using devtool boot-jtag script + +1. Run devtool command to generate the boot-jtag.tcl script. +``` +$ devtool boot-jtag --help +$ devtool boot-jtag --image core-image-minimal --hw_server TCP::3121 +``` +2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl +3. Execute this script using xsdb tool as shown below. +``` +$ xsdb /boot-jtag.tcl +``` + +#### Manually executing xsdb commands + +1. Power on the board, Launch the XSDB shell from command line as shown below. ``` -$ xsct +$ xsdb ``` -3. In the XSCT console, connect to the target over JTAG using the connect command. +2. In the XSDB console, connect to the target over JTAG using the connect command. Optionally user can use `-url` to specify the local/remote hw_server. The connect command returns the channel ID of the connection. ``` -xsct% connect +xsdb% connect ``` -4. The targets command lists the available targets and allows you to select a +3. The targets command lists the available targets and allows you to select a target using its ID. The targets are assigned IDs as they are discovered on the JTAG chain, so the IDs can change from session to session. ``` -xsct% targets +xsdb% targets ``` > **Note:** For non-interactive usage such as scripting, you can use the `-filter` option to select a target instead of selecting the target using its ID. -### Loading boot.bin using XSCT +##### Loading boot.bin using XSDB -1. Download the boot.bin for the target using XSCT with the `device program` command. +1. Download the boot.bin for the target using XSDB with the `device program` command. Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default boot.bin consists of boot pdi, plm.elf, psm.elf, bl31.elf, u-boot.elf and 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 > u-boot and kernel. ``` -xsct% targets -set -nocase -filter {name =~ "*PMC*"} -xsct% device program ${DEPLOY_DIR_IMAGE}/boot.bin -xsct% targets -set -nocase -filter {name =~ "*A72*#0"} -xsct% stop +xsdb% targets -set -nocase -filter {name =~ "*PMC*"} +xsdb% device program ${DEPLOY_DIR_IMAGE}/boot.bin +xsdb% targets -set -nocase -filter {name =~ "*A72*#0"} +xsdb% stop ``` 2. After loading boot.bin resume the execution of active target using the `con` -command in XSCT shell. +command in XSDB shell. ``` -xsct% con +xsdb% con ``` 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. ``` @@ -93,7 +118,7 @@ Hit any key to stop autoboot: 0 U-Boot> ``` -### Loading Kernel, Root Filesystem and U-boot boot script +##### Loading Kernel, Root Filesystem and U-boot boot script Load the images into the target DDR/PL DRR load address i.e., `DDR base address + `. @@ -119,49 +144,51 @@ using U-Boot. > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this > is already part of boot.bin we can skip loading dtb, else load kernel dtb. -#### Using XSCT +###### Using XSDB -1. Suspend the execution of active target using `stop` command in XSCT. +1. Suspend the execution of active target using `stop` command in XSDB. ``` -xsct% stop +xsdb% stop ``` 2. Using the `dow` command to load the images into the target DDR/PL DDR load address. ``` -xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 -xsct% targets -set -nocase -filter {name =~ "*A72*#0"} +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 +xsdb% targets -set -nocase -filter {name =~ "*A72*#0"} ``` -#### Using TFTP +###### Using TFTP -1. Configure the `ipaddr` and `serverip` of the U-Boot environment. +1. Setup TFTP directory on host machine and copy the images to your TFTP directory + so that you can load them from U-Boot. +2. Configure the `ipaddr` and `serverip` of the U-Boot environment. ``` Versal> set serverip Versal> set ipaddr ``` -2. Load the images to DDR address. Make sure images are copied to tftp directory. +3. Load the images to DDR address. ``` -U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image -U-Boot> tftpboot 0x1000 ${TFTPDIR}/system.dtb -U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot -U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr +U-Boot> tftpboot 0x200000 Image +U-Boot> tftpboot 0x1000 system.dtb +U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot +U-Boot> tftpboot 0x20000000 boot.scr ``` -### Booting Linux +##### Booting Linux Once the images are loaded continue the execution. 1. After loading images resume the execution of active target using the `con` -command in XSCT shell, Skip step 1 for if you have used TFTP to load images. +command in XSDB shell, Skip step 1 for if you have used TFTP to load images. ``` -xsct% con +xsdb% con ``` -2. Terminate xsct shell. +2. Terminate xsdb shell. ``` -xsct% exit +xsdb% exit ``` 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. ``` @@ -181,9 +208,9 @@ U-Boot> boot card (part number: X_EBM-01, REV_A01). 2. With the card powered off, install the QSPI daughter card. 3. Power on the VCK190 board and boot using JTAG or SD boot mode, to ensure that - U-Boot is running and also have boot.bin copied to DDR location using XSCT + U-Boot is running and also have boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` command. 4. Follow Flash boot instructions [README](README.booting.flash.md) for more details. 5. After flashing the images, turn off the power switch on the board, and change the SW1 boot mode pin settings to QSPI boot mode (1-ON, 2-OFF, 3-ON, 4-ON) by - setting the SW1. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file + 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. * [Setting Up the Target](#setting-up-the-target) * [Booting from JTAG](#booting-from-jtag) - * [Loading boot components using XSCT](#loading-boot-components-using-xsct) - * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) - * [Using XSCT](#using-xsct) - * [Using TFTP](#using-tftp) + * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) + * [Deploying the images to target](#deploying-the-images-to-target) + * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) + * [Manually executing xsdb commands](#manually-executing-xsdb-commands) + * [Loading boot components using XSDB](#loading-boot-components-using-xsdb) + * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) + * [Using XSDB](#using-xsdb) + * [Using TFTP](#using-tftp) + * [Booting Linux](#booting-linux) * [Booting from SD](#booting-from-sd) * [Booting from QSPI](#booting-from-qspi) @@ -35,37 +40,58 @@ boot modes. --- ## Booting from JTAG -This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and +This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and the associated JTAG device drivers. This also requires access to the JTAG interface on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG modules. -1. Source the Vivado or Vitis tools `settings.sh` scripts. -2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the - XSCT button. Alternatively, you can also open the XSCT console by selecting - Xilinx -> XSCT Console. +### Sourcing the XSDB tools + +Source the Vivado or Vitis tools `settings.sh` scripts. + +### Deploying the images to target + +Deploying the images can be done in two methods. + +#### Using devtool boot-jtag script + +1. Run devtool command to generate the boot-jtag.tcl script. +``` +$ devtool boot-jtag --help +$ devtool boot-jtag --image core-image-minimal --hw_server TCP::3121 +``` +2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl +3. Execute this script using xsdb tool as shown below. ``` -$ xsct +$ xsdb /boot-jtag.tcl ``` -3. In the XSCT console, connect to the target over JTAG using the connect command. + +#### Manually executing xsdb commands + +1. Power on the board, Launch the XSDB shell from command line as shown below. +``` +$ xsdb +``` +2. In the XSDB console, connect to the target over JTAG using the connect command. Optionally user can use `-url` to specify the local/remote hw_server. The connect command returns the channel ID of the connection. ``` -xsct% connect +xsdb% connect ``` -4. The targets command lists the available targets and allows you to select a +3. The targets command lists the available targets and allows you to select a target using its ID. The targets are assigned IDs as they are discovered on the JTAG chain, so the IDs can change from session to session. ``` -xsct% targets +xsdb% targets ``` > **Note:** For non-interactive usage such as scripting, you can use the `-filter` option to select a target instead of selecting the target using its ID. + --- -### Loading boot components using XSCT +##### Loading boot components using XSDB -1. Download the boot images for the target using XSCT with the `fpga` and `dow` +1. Download the boot images for the target using XSDB with the `fpga` and `dow` command. Zynq boot images will be located in the `${DEPLOY_DIR_IMAGE}` directory. @@ -74,24 +100,24 @@ xsct% targets 2. Program the bitstream or skip this step if you are loading from u-boot or linux. ``` -xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit +xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit ``` 3. Select APU Cortex-A9 Core 0 to load and execute FSBL. ``` -xsct% targets -set -nocase -filter {name =~ "arm*#0"} -xsct% catch {stop} +xsdb% targets -set -nocase -filter {name =~ "arm*#0"} +xsdb% catch {stop} ``` 5. Download and run FSBL from APU Cortex-A9 Core 0 ``` -xsct% dow ${DEPLOY_DIR_IMAGE}/zynq_fsbl.elf -xsct% con +xsdb% dow ${DEPLOY_DIR_IMAGE}/zynq_fsbl.elf +xsdb% con ``` 7. Now download U-boot.elf and Device tree to APU and execute. ``` -xsct% stop -xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf -xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 -xsct% con +xsdb% stop +xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 +xsdb% con ``` 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 U-Boot> ``` --- -### Loading Kernel, Root Filesystem and U-boot boot script +##### Loading Kernel, Root Filesystem and U-boot boot script Load the images into the target DDR load address i.e., `DDR base address + `. @@ -127,53 +153,56 @@ using U-Boot. > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this > is already part of boot.bin we can skip loading dtb, else load kernel dtb. --- -#### Using XSCT +###### Using XSDB -1. Suspend the execution of active target using `stop` command in XSCT. +1. Suspend the execution of active target using `stop` command in XSDB. ``` -xsct% stop +xsdb% stop ``` 2. Using the `dow` command to load the images into the target DDR/PL DDR load address. ``` -xsct% dow -data ${DEPLOY_DIR_IMAGE}/uImage 0x200000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x3000000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/uImage 0x200000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x3000000 ``` --- -#### Using TFTP +###### Using TFTP -1. Configure the `ipaddr` and `serverip` of the U-Boot environment. +1. Setup TFTP directory on host machine and copy the images to your TFTP directory + so that you can load them from U-Boot. +2. Configure the `ipaddr` and `serverip` of the U-Boot environment. ``` Versal> set serverip Versal> set ipaddr ``` -2. Load the images to DDR address. Make sure images are copied to tftp directory. +3. Load the images to DDR address. ``` -U-Boot> tftpboot 0x200000 ${TFTPDIR}/uImage -U-Boot> tftpboot 0x100000 ${TFTPDIR}/system.dtb -U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot -U-Boot> tftpboot 0x3000000 ${TFTPDIR}/boot.scr +U-Boot> tftpboot 0x200000 uImage +U-Boot> tftpboot 0x100000 system.dtb +U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot +U-Boot> tftpboot 0x3000000 boot.scr ``` --- -### Booting Linux +##### Booting Linux Once the images are loaded continue the execution. 1. After loading images resume the execution of active target using the `con` -command in XSCT shell, Skip step 1 for if you have used TFTP to load images. +command in XSDB shell, Skip step 1 for if you have used TFTP to load images. ``` -xsct% con +xsdb% con ``` -2. Terminate xsct shell. +2. Terminate xsdb shell. ``` -xsct% exit +xsdb% exit ``` 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. ``` U-Boot> boot ``` + --- ## Booting from SD @@ -181,14 +210,15 @@ U-Boot> boot 2. Configure the ZC702 board to boot in SD-Boot mode (1-OFF, 2-OFF, 3-ON, 4-ON, 5-OFF) by setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). 3. Follow SD boot instructions [README](README.booting.storage.md) for more details. + --- ## Booting from QSPI 1. To boot ZC702 board in QSPI boot mode, Power on the ZCU102 board and boot using JTAG or SD boot mode, to ensure that U-Boot is running and also have - boot.bin copied to DDR location using XSCT `dow` or `tftpboot` or `fatload` + boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` command. 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. 3. After flashing the images, turn off the power switch on the board, and change the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF) - by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file + 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. * [Setting Up the Target](#setting-up-the-target) * [Booting from JTAG](#booting-from-jtag) - * [Loading boot components using XSCT](#loading-boot-components-using-xsct) - * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) - * [Using XSCT](#using-xsct) - * [Using TFTP](#using-tftp) + * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) + * [Deploying the images to target](#deploying-the-images-to-target) + * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) + * [Manually executing xsdb commands](#manually-executing-xsdb-commands) + * [Loading boot components using XSDB](#loading-boot-components-using-xsdb) + * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) + * [Using XSDB](#using-xsdb) + * [Using TFTP](#using-tftp) + * [Booting Linux](#booting-linux) * [Booting from SD](#booting-from-sd) * [Booting from QSPI](#booting-from-qspi) @@ -34,37 +39,57 @@ NAND boot modes. ## Booting from JTAG -This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and +This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and the associated JTAG device drivers. This also requires access to the JTAG interface on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG modules. -1. Source the Vivado or Vitis tools `settings.sh` scripts. -2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the - XSCT button. Alternatively, you can also open the XSCT console by selecting - Xilinx -> XSCT Console. +### Sourcing the XSDB tools + +Source the Vivado or Vitis tools `settings.sh` scripts. + +### Deploying the images to target + +Deploying the images can be done in two methods. + +#### Using devtool boot-jtag script + +1. Run devtool command to generate the boot-jtag.tcl script. +``` +$ devtool boot-jtag --help +$ devtool boot-jtag --image core-image-minimal --hw_server TCP::3121 +``` +2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl +3. Execute this script using xsdb tool as shown below. +``` +$ xsdb /boot-jtag.tcl +``` + +#### Manually executing xsdb commands + +1. Power on the board, Launch the XSDB shell from command line as shown below. ``` -$ xsct +$ xsdb ``` -3. In the XSCT console, connect to the target over JTAG using the connect command. +2. In the XSDB console, connect to the target over JTAG using the connect command. Optionally user can use `-url` to specify the local/remote hw_server. The connect command returns the channel ID of the connection. ``` -xsct% connect +xsdb% connect ``` -4. The targets command lists the available targets and allows you to select a +3. The targets command lists the available targets and allows you to select a target using its ID. The targets are assigned IDs as they are discovered on the JTAG chain, so the IDs can change from session to session. ``` -xsct% targets +xsdb% targets ``` > **Note:** For non-interactive usage such as scripting, you can use the `-filter` option to select a target instead of selecting the target using its ID. -### Loading boot components using XSCT +##### Loading boot components using XSDB -1. Download the boot images for the target using XSCT with the `fpga` and `dow` +1. Download the boot images for the target using XSDB with the `fpga` and `dow` command. ZyqnMP boot images will be located in the `${DEPLOY_DIR_IMAGE}` directory. @@ -73,43 +98,43 @@ xsct% targets 2. Program the bitstream or skip this step if you are loading from u-boot or linux. ``` -xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit +xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit ``` 3. By default, JTAG security gates are enabled. Disable the security gates for DAP, PL TAP, and PMU (this makes the PMU MB target visible to the debugger). ``` -xsct% targets -set -nocase -filter {name =~ "*PSU*"} -xsct% mask_write 0xFFCA0038 0x1C0 0x1C0 +xsdb% targets -set -nocase -filter {name =~ "*PSU*"} +xsdb% mask_write 0xFFCA0038 0x1C0 0x1C0 ``` 3. Verify if the PMU MB target is listed under the PMU device. Now, load the PMU firmware. ``` -xsct% targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"} -xsct% catch {stop} -xsct% dow ${DEPLOY_DIR_IMAGE}/pmufw.elf -xsct% con +xsdb% targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"} +xsdb% catch {stop} +xsdb% dow ${DEPLOY_DIR_IMAGE}/pmufw.elf +xsdb% con ``` 5. Reset APU Cortex-A53 Core 0 to load and execute FSBL, This step is important, because when the ZynqMP boots up in JTAG boot mode, all the APU and RPU cores are held in reset. You must clear the resets on each core before performing - debugging on these cores. You can use the `rst` command in XSCT to clear the + debugging on these cores. You can use the `rst` command in XSDB to clear the resets. ``` -xsct% targets -set -nocase -filter {name =~ "*A53*#0"} -xsct% rst -processor -clear-registers +xsdb% targets -set -nocase -filter {name =~ "*A53*#0"} +xsdb% rst -processor -clear-registers ``` 6. Download and run FSBL from APU Cortex-A53 Core 0 ``` -xsct% dow ${DEPLOY_DIR_IMAGE}/zynqmp_fsbl.elf -xsct% con +xsdb% dow ${DEPLOY_DIR_IMAGE}/zynqmp_fsbl.elf +xsdb% con ``` 7. Now download TF-A, U-boot.elf and Device tree to APU and execute. ``` -xsct% stop -xsct% dow ${DEPLOY_DIR_IMAGE}/bl31.elf -xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf -xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 -xsct% con +xsdb% stop +xsdb% dow ${DEPLOY_DIR_IMAGE}/bl31.elf +xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 +xsdb% con ``` 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 U-Boot> ``` -### Loading Kernel, Root Filesystem and U-boot boot script +##### Loading Kernel, Root Filesystem and U-boot boot script Load the images into the target DDR/PL DRR load address i.e., `DDR base address + `. @@ -145,48 +170,50 @@ using U-Boot. > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this > is already part of boot.bin we can skip loading dtb, else load kernel dtb. -#### Using XSCT +###### Using XSDB -1. Suspend the execution of active target using `stop` command in XSCT. +1. Suspend the execution of active target using `stop` command in XSDB. ``` -xsct% stop +xsdb% stop ``` 2. Using the `dow` command to load the images into the target DDR/PL DDR load address. ``` -xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 -xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 +xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 ``` -#### Using TFTP +###### Using TFTP -1. Configure the `ipaddr` and `serverip` of the U-Boot environment. +1. Setup TFTP directory on host machine and copy the images to your TFTP directory + so that you can load them from U-Boot. +2. Configure the `ipaddr` and `serverip` of the U-Boot environment. ``` -Versal> set serverip -Versal> set ipaddr +ZynqMP> set serverip +ZynqMP> set ipaddr ``` -2. Load the images to DDR address. Make sure images are copied to tftp directory. +3. Load the images to DDR address. ``` -U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image -U-Boot> tftpboot 0x100000 ${TFTPDIR}/system.dtb -U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot -U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr +U-Boot> tftpboot 0x200000 Image +U-Boot> tftpboot 0x100000 system.dtb +U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot +U-Boot> tftpboot 0x20000000 boot.scr ``` -### Booting Linux +##### Booting Linux Once the images are loaded continue the execution. 1. After loading images resume the execution of active target using the `con` -command in XSCT shell, Skip step 1 for if you have used TFTP to load images. +command in XSDB shell, Skip step 1 for if you have used TFTP to load images. ``` -xsct% con +xsdb% con ``` -2. Terminate xsct shell. +2. Terminate xsdb shell. ``` -xsct% exit +xsdb% exit ``` 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. ``` @@ -204,9 +231,9 @@ U-Boot> boot 1. To boot ZCU012 board in QSPI boot mode, Power on the ZCU102 board and boot using JTAG or SD boot mode, to ensure that U-Boot is running and also have - boot.bin copied to DDR location using XSCT `dow` or `tftpboot` or `fatload` + boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` command. 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. 3. After flashing the images, turn off the power switch on the board, and change the SW6 boot mode pin settings to QSPI boot mode (1-ON, 2-ON, 3-OFF, 4-ON) by - setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file + setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). -- cgit v1.2.3-54-g00ecf