How to Boot Linux on AMD SoC Devices via JTAG

How to Boot Linux on AMD SoC Devices via JTAG

This article is authored by AMD engineer Longley Zhang.

In AMD SoC devices (AMD Zynq 7000 SoC, AMD Zynq UltraScale+ MPSoC, AMD Versal™ Adaptive SoC), a common boot method is to load an image from external memory (QSPI Flash, eMMC, etc.) to boot 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 use Petalinux to compile the Linux image 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.

How to Boot Linux on AMD SoC Devices via JTAG

If JTAG is directly connected to the Linux host, the “–hw_server-url:3121” in the above command can be omitted. For more information 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 “petalinux-boot –jtag” command mentioned earlier actually runs the corresponding XSCT script, which downloads through the XSCT tool. Therefore, we can also directly use the XSCT tool to load images via 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 with the command source xxx.tcl. Alternatively, commands can be entered manually for debugging at different stages of booting.

For more information and application cases of 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

How to Boot Linux on AMD SoC Devices via JTAG

2.2 Zynq UltraScale+ MPSoC Device

How to Boot Linux on AMD SoC Devices via JTAG

2.3 Versal Adaptive SoCThe following boot.bin is generated by “petalinux-package –boot –u-boot” which includes the u-boot image.

How to Boot Linux on AMD SoC Devices via JTAG

2.4 Run the following command in u-boot to start Linux: bootm 0x10000000 0x11A00000 0x11000000 or bootm 0x10000000 (if using image.ub 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 with Ctrl+c to enter the u-boot command line.

AMD Adaptive SOC and FPGA Chinese Technical Support Community

Welcome to visit our community forum:

[https://support.xilinx.com/s/?language=zh_CN]

We hope to help you quickly find the content you need. This site is the login page for AMD Adaptive SoC and FPGA support resources, which includes our knowledge base, community forum, and links to more content. Search and explore the content on your chosen topic, then log in to see more support options.

How to Boot Linux on AMD SoC Devices via JTAG

Leave a Comment