petalinux 2024.2 config hw-description XSA vs SDT

📅 2026/7/2 15:34:01 👁️ 阅读次数 📝 编程学习
petalinux 2024.2 config hw-description XSA vs SDT

一、问题

petalinux-config -D --get-hw-description ../../prebuild/design_1_wrapper.xsa [INFO] Getting hardware description [ERROR] This Project was configured with "sdt", you may see issues if you use the same project for "xsa" flow
zcu208bsp
[doc] UG1144 (v2024.2) November 13, 2024
[文档] UG1144 (v2024.2) 20241113
[bsp](https://amd-ax-dlf.entitlenow.com/dl/ul/2024/11/12/R212587136/xilinx-zcu208-v2024.2-11110212.bsp (https://amd-ax
dlf.entitlenow.com/dl/ul/2024/11/12/R212587136/xilinx-zcu208-v2024.2-11110212.bsp))

二、解决

1、更换XSCT bsp?

XSCT flow is no longer supported and SDT flow is the default when creating projects. You can see page 32 in UG1144 (2024.2) for the steps on SDT flow.
现在不再支持XSCT流程了,创建项目时默认使用SDT流程。有关SDT流程的具体步骤,请参阅UG11442024.2)版本的第32页。
System Devicetree flow to Build Images
系统设备树流程,用于构建图像
下载页面

2、脚本命令转换

需要完整安装vivado24.2 包括vitis完整安装

so i managed to convert the xsa file to a dts folder, which looks like petalinux-config is fine with it.
因此,我成功地将 XSA 文件转换为 DTS 格式的文件。看起来 Petalinux-Config 软件在运行这种格式的文件时也没有出现任何问题。

in the instructions chapter of [doc] is a link to a github repo [sdtgen]. There is an example tcl file in the README which can almost be used:
在[文档]的“说明”章节中,有一个指向 github 仓库[sdtgen]的链接。在 README 文件中还有一个 TCL 脚本示例,几乎可以直接使用:

  1. setoutdir[lindex $argv1]
  2. setxsa[lindex $argv0]
  3. execrm-rf $outdir
  4. sdtgen set_dt_param-xsa $xsa-dir $outdir-board_dts zcu208-reva;#-debug enable-trace enable
  5. sdtgen generate_sdt

which can be called with
可以用以下方式调用:

  1. xsct./sdt.tcl design_1_wrapper.xsa sdt/

Remarks: 备注:

  1. for the parameterboard_dtsi had a look in this [board-list] of [sdtgen]. but without the extension.dtsi
    对于参数 board_dts,我查看了[sdtgen]提供的[板卡列表]。不过,该参数并没有后缀.dtsi。.
  2. the new vitis -s won't work with tcl files.
    新的 vitis-s 无法处理 TCL 文件。

3、更换petalinux工程配置

  • may want to try modify the file at your project folder -> .petalinux/metadata and replace the "HDF_EXT=sdt" as "HDF_EXT=xsa" as a manual way to change to xsa flow.
    你可以尝试修改项目文件夹下的文件——路径为.petalinux/metadata。将文件中的“HDF_EXT=sdt”替换为“HDF_EXT=xsa”,这样就能手动将流程切换到 xsa 模式了。