
Author: AMD Engineer Longley Zhang
On AMD SoC devices (AMD Zynq™ 7000 SoC, AMD Zynq UltraScale+™ MPSoC, AMD Versal™ Adaptive SoC), a common way to boot is by loading an image from external memory (QSPI Flash, eMMC, etc.) directly into Linux. However, during board debugging, it is often necessary to boot the SoC device into Linux via JTAG. This article will share methods and scripts for booting Linux via JTAG.
1. If you compile the Linux image using Petalinux, and the Linux host where Petalinux is located can connect to the SoC board via JTAG (remotely or locally), you can use the following Petalinux command to directly download the Linux image.

If JTAG is directly connected to the Linux host, the “–hw_server-url:3121” part of the command can be omitted. For more details about the “petalinux-boot –jtag” command, please refer to the documentation:
https://docs.xilinx.com/r/en-US/ug1144-petalinux-tools-reference-guide
2. The previously mentioned “petalinux-boot –jtag” command actually runs the corresponding XSCT script to perform the download via the XSCT tool. Therefore, we can also load the image directly via the XSCT tool through JTAG. Below are common XSCT scripts for loading. The following script is responsible for booting the SoC device into u-boot and loading the Linux image into memory. Users can copy the commands into a tcl file and then run it directly in XSCT using source xxx.tcl. Alternatively, commands can be entered manually for debugging at different stages of the boot process.
For more information and application cases about the XSCT tool, please refer to the documentation:
https://docs.xilinx.com/r/en-US/ug1400-vitis-embedded/Xilinx-Software-Command-Line-Tool?tocId=CwnQ90bFNEhE~pGBspGuOQ
2.1 Zynq 7000 SoC Device

2.2 Zynq UltraScale+ MPSoC Device

2.3 Versal Adaptive SoC
The following boot.bin is generated by “petalinux-package –boot –u-boot” and contains the u-boot image.

2.4 Run the following command in u-boot to start Linux: bootm 0x10000000 0x11A00000 0x11000000 or bootm 0x10000000 (if image.ub is used in XSCT). Note: After booting into u-boot, it may not find boot.scr and execute the default boot script. Users can interrupt the boot process with Ctrl+c to enter the u-boot command line.