Building a PetaLinux System Image - 2023.1 English - UG1144

PetaLinux Tools Documentation: Reference Guide (UG1144)

Document ID
UG1144
Release Date
2023-05-16
Version
2023.1 English
  1. Change into the directory of your PetaLinux project.
    cd <plnx-proj-root>
  2. Run petalinux-build to build the system image:
    spetalinux-build

    This step generates a device tree DTB file, a first stage boot loader (for Zynq devices, Zynq UltraScale+ MPSoC, and MicroBlaze), PLM (for Versal adaptive SoC), PSM (for Versal adaptive SoC) and TF-A (for Zynq UltraScale+ MPSoC and Versal adaptive SoC), U-Boot, the Linux kernel, a root file system image, and the U-Boot boot script (boot.scr). Finally, it generates the necessary boot images.

  3. The compilation progress shows on the console. Wait until the compilation finishes.
Tip: A detailed compilation log is in <plnx-proj-root>/build/build.log.

When the build finishes, the generated images are stored in the <plnx-proj-root>/images/linux and /tftpboot directories.

The console shows the compilation progress. For example:

petalinux-build
[INFO] Sourcing buildtools
[INFO] Building project
[INFO] Extracting yocto SDK to components/yocto. This may take time!
[INFO] Generating Kconfig for project
[INFO] Silentconfig project
[INFO] Generating kconfig for rootfs
[INFO] Silentconfig rootfs
[INFO] Adding user layers
[INFO] Generating machine conf file
[INFO] Generating plnxtool conf file
[INFO] Generating workspace directory
INFO: bitbake petalinux-image-minimal
NOTE: Started PRServer with DBfile: /wrk/everest_fcv_nobkup/project/release/_zcu102_/xilinx-vck190-2023.1/build/cache/prserv.sqlite3, Address: 127.0.0.1:46517, PID: 8740
Loading cache: 100% |                                                                           | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |##########################################################################| Time: 0:00:50
Parsing of 4357 .bb files complete (0 cached, 4357 parsed). 6288 targets, 319 skipped, 1 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Fetching uninative binary shim file:///wrk/everest_fcv_nobkup/project/release/_zcu102_/xilinx-vck190-2023.1/components/yocto/downloads/uninative/5fab9a5c97fc73a21134e5a81f74498cbaecda75d56aab971c934e0b803bcc00/x86_64-nativesdk-libc-3.8.1.tar.xz;sha256sum=5fab9a5c97fc73a21134e5a81f74498cbaecda75d56aab971c934e0b803bcc00 (will check PREMIRRORS first)
Initialising tasks: 100% |#######################################################################| Time: 0:00:11
Checking sstate mirror object availability: 100% |###############################################| Time: 0:00:39
Sstate summary: Wanted 1745 Local 0 Mirrors 1068 Missed 677 Current 0 (61% match, 0% complete)
NOTE: Executing Tasks
WARNING: zocl-202310.2.15.0-r0 do_package_qa: QA Issue: File /lib/modules/6.1.5-xilinx-v2023.1/extra/zocl.ko in package kernel-module-zocl-6.1.5-xilinx-v2023.1 contains reference to TMPDIR [buildpaths]
NOTE: Tasks Summary: Attempted 4616 tasks of which 3792 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message.
INFO: Failed to copy built images to tftp dir: /tftpboot
[INFO] Successfully built project