AR# 71921

2018.3 Zynq UltraScale+ MPSoC/RFSoC: PetaLinux/Yocto fails to build FSBL component with fatal error: psu_init.h: No such file or directory

描述

When there are two or more default BDs in the exported HDF, the FSBL build fails with an error log similar to the following:

ERROR: fsbl-2018.3+gitAUTOINC+56f3da2afb-r0 do_compile: Function failed: do_compile (log file is located at /tmp/jovitac/plnx/v2018.3/prj-zcu102/work/plnx_zynqmp-xilinx-linux/fsbl/2018.3+gitAUTOINC+56f3da2afb-r0/temp/log.do_compile.157044)
ERROR: Logfile of failure stored in: /tmp/jovitac/plnx/v2018.3/prj-zcu102/work/plnx_zynqmp-xilinx-linux/fsbl/2018.3+gitAUTOINC+56f3da2afb-r0/temp/log.do_compile.157044
Log data follows:
| DEBUG: Executing shell function do_compile
| aarch64-none-elf-gcc -MMD -MP      -Wall -fmessage-length=0 -DARMA53_64 -Os -flto -ffat-lto-objects -Wall -fmessage-length=0 -DARMA53_64 -Os -flto -ffat-lto-objects    -c xfsbl_handoff.c -o xfsbl_handoff.o -Izynqmp_fsbl_bsp/psu_cortexa53_0/include -I.
| xfsbl_handoff.c:58:10: fatal error: psu_init.h: No such file or directory
|  #include RROR: fsbl-2018.3+gitAUTOINC+56f3da2afb-r0 do_compile: Function failed: do_compile (log file is located at /tmp/jovitac/plnx/v2018.3/prj-zcu102/work/plnx_zynqmp-xilinx-linux/fsbl/2018.3+gitAUTOINC+56f3da2afb-r0/temp/log.do_compile.157044)
ERROR: Logfile of failure stored in: /tmp/jovitac/plnx/v2018.3/prj-zcu102/work/plnx_zynqmp-xilinx-linux/fsbl/2018.3+gitAUTOINC+56f3da2afb-r0/temp/log.do_compile.157044
Log data follows:
| DEBUG: Executing shell function do_compile
| aarch64-none-elf-gcc -MMD -MP      -Wall -fmessage-length=0 -DARMA53_64 -Os -flto -ffat-lto-objects -Wall -fmessage-length=0 -DARMA53_64 -Os -flto -ffat-lto-objects    -c xfsbl_handoff.c -o xfsbl_handoff.o -Izynqmp_fsbl_bsp/psu_cortexa53_0/include -I.
| xfsbl_handoff.c:58:10: fatal error: psu_init.h: No such file or directory
|  #include "psu_init.h"
|           ^~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:34: xfsbl_handoff.o] Error 1
| WARNING: /tmp/jovitac/plnx/v2018.3/prj-zcu102/work/plnx_zynqmp-xilinx-linux/fsbl/2018.3+gitAUTOINC+56f3da2afb-r0/temp/run.do_compile.157044:1 exit 2 from 'make'
| ERROR: Function failed: do_compile (log file is located at /tmp/jovitac/plnx/v2018.3/prj-zcu102/work/plnx_zynqmp-xilinx-linux/fsbl/2018.3+gitAUTOINC+56f3da2afb-r0/temp/log.do_compile.157044)
ERROR: Task (/proj/gsd/petalinux/2018.3/components/yocto/source/aarch64/layers/meta-xilinx-tools/recipes-bsp/fsbl/fsbl_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 619 tasks of which 616 didn't need to be rerun and 1 failed.Summary: 1 task failed:
  /proj/gsd/petalinux/2018.3/components/yocto/source/aarch64/layers/meta-xilinx-tools/recipes-bsp/fsbl/fsbl_git.bb:do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
ERROR: Failed to build fsbl

解决方案

This is a known issue with 2018.3 HSI tools where it fails to copy the psu_init files to the output directory.

To work around this issue, follow the steps below:

PetaLinux:

1) Create an FSBL bbappend file under <plnx-proj-root>/project-spec/meta-user/recipes-bsp/fsbl/fsbl_%.bbappend if it does not exist.

$ vim <plnx-proj-root>/project-spec/meta-user/recipes-bsp/fsbl/fsbl_%.bbappend

2) Add the below content to <plnx-proj-root>/project-spec/meta-user/recipes-bsp/fsbl/fsbl_%.bbappend:

do_compile_prepend(){

   install -m 0644 ${TOPDIR}/../project-spec/hw-description/psu_init.c ${B}/fsbl/psu_init.c

   install -m 0644 ${TOPDIR}/../project-spec/hw-description/psu_init.h ${B}/fsbl/psu_init.h

}

3) Clean and rebuild the fsbl component.

$ petalinux-build -c fsbl -x cleanall

$ petalinux-build -c fsbl


Yocto:

1) Create a FSBL bbappend file under <yocto-proj-root>/sources/meta-petalinux/recipes-bsp/fsbl/fsbl_%.bbappend if it does not exist.

$ vim <yocto-proj-root>/sources/meta-petalinux/recipes-bsp/fsbl/fsbl_%.bbappend

2) Add the below content to <yocto-proj-root>/sources/meta-petalinux/recipes-bsp/fsbl/fsbl_%.bbappend:

do_compile_prepend(){

   find ${B} -iname "psu_init.c" -exec cp {} ${B}/fsbl/ \;

   find ${B} -iname "psu_init.h" -exec cp {} ${B}/fsbl/ \;

}

3) Clean and rebuild the FSBL component.

$ bitbake fsbl -c cleanall

$ bitbake fsbl

Note: If you are not using meta-petalinux as the distribution layer they you can add it to your distribution/custom layer <yocto-proj-root>/<custom-meta-layer>/recipes-bsp/fsbl/fsbl_%.bbappend


AR# 71921
日期 01/17/2019
状态 Active
Type 综合文章
器件
Tools
Boards & Kits