作者:付漢杰,hankf@xilinx.com,文章轉(zhuǎn)載自:賽靈思中文社區(qū)論壇
更改VCU TRD PetaLinux工程的XSA/HDF文件后,編譯失敗。錯(cuò)誤信息類似如下:
Error: build/tmp/work/plnx_zynqmp-xilinx-linux/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0/system-user.dtsi:129.1-25 Label or path xxxxxx not foundFATAL ERROR: Syntax error parsing input tree
VCU TRD 2019.2配套有多個(gè)硬件工程。每個(gè)硬件工程中的PL設(shè)計(jì)不一樣,需要的devicetree的節(jié)點(diǎn)不一樣。PetaLinux根據(jù)XSA/HDF文件,生成對(duì)應(yīng)的pl.dtsi。
換XSA/HDF文件,新的pl.dtsi可能增加或者減少了devicetree的節(jié)點(diǎn)。上面的信息顯示,原來(lái)的system-user.dtsi引用的某個(gè)節(jié)點(diǎn)不存在了。
VCU TRD 2019.2的PetaLinux工程,含有多個(gè)dtsi文件。system-user.dtsi只是一個(gè)指向其他文件的連接。缺省情況下,system-user.dtsi指向vcu_trd.dtsi。
project-spec/meta-user/recipes-bsp/device-tree/files$ ls -ltotal 100lrwxrwxrwx 1 hankf hankf 14 Oct 26 05:49 system-user.dtsi -> ./vcu_trd.dtsi-rwxr-xr-x 1 hankf hankf 1532 Oct 26 05:49 vcu_llp2_psddr_hdmi.dtsi-rwxr-xr-x 1 hankf hankf 317 Oct 26 05:49 vcu_pcie.dtsi-rwxr-xr-x 1 hankf hankf 2470 Oct 26 05:49 vcu_plddr_hdmi.dtsi-rwxr-xr-x 1 hankf hankf 1256 Oct 26 05:49 vcu_plddr_sdi.dtsi-rwxr-xr-x 1 hankf hankf 166 Oct 26 05:49 vcu_sdirx.dtsi-rwxr-xr-x 1 hankf hankf 107 Oct 26 05:49 vcu_sditx.dtsi-rwxr-xr-x 1 hankf hankf 2589 Jan 15 14:26 vcu_trd.dtsi
更改VCU TRD PetaLinux工程的XSA/HDF文件后,讓system-user.dtsi指向?qū)?yīng)的dtsi文件。
project-spec/meta-user/recipes-bsp/device-tree/files$rm system-user.dtsiproject-spec/meta-user/recipes-bsp/device-tree/files$ln -s vcu_llp2_plddr_hdmi.dtsi system-user.dtsiproject-spec/meta-user/recipes-bsp/device-tree/files$ ls -ltotal 104lrwxrwxrwx 1 hankf hankf 24 Jan 15 15:40 system-user.dtsi -> vcu_llp2_plddr_hdmi.dtsi-rwxr-xr-x 1 hankf hankf 2039 Oct 26 05:49 vcu_llp2_plddr_hdmi.dtsi