Difference between revisions of "DESK-XZ7-L/Development/Creating and building the Petalinux project"

From DAVE Developer's Wiki
Jump to: navigation, search
Line 86: Line 86:
  
 
'''Run the Petalinux build'''
 
'''Run the Petalinux build'''
 +
 +
To build <code>petalinux-image-minimal</code> use the following command
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
petalinux-build
 
petalinux-build
 +
</syntaxhighlight>
 +
 +
If you want build <code<dave-image-devel</code> use the following command
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-build -c dave-image-devel
 +
</syntaxhighlight>
 +
 +
For build only kernel use the following command
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-build -c kernel
 +
</syntaxhighlight>
 +
 +
For build only U-Boot use the following command
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-build -c u-boot
 +
</syntaxhighlight>
 +
 +
'''Generate <code>BOOT.BIN</code>'''
 +
 +
To generate <code>BOOT.BIN</code> artifact, perform the following command
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-package --boot --u-boot --force
 +
</syntaxhighlight>
 +
 +
In case of boot from NAND for ''Boralite'' platform, please use the following command
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-package --boot --u-boot --kernel --offset 0x1080000 --force
 +
</syntaxhighlight>
 +
 +
'''Generate <code>wic</code> image'''
 +
 +
In order to generate <code>wic</code> image to install on uSD perform the following command
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-package --wic --bootfiles "BOOT.BIN boot.scr image.ub"
 +
</syntaxhighlight>
 +
 +
If you want to use <code>dave-image-devel</code> rootfs you have to perform the following command
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-package --wic --bootfiles "BOOT.BIN boot.scr image.ub" --rootfs-file build/tmp/deploy/images/zynq-generic/dave-image-devel-zynq-generic.tar.gz
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 15:37, 22 January 2024

History
Issue Date Notes
2022/11/18 DESK-XZ7-L-1.0.0-rc1 release
2023/01/22 DESK-XZ7-L-1.0.1 release



Creating and building the Petalinux project[edit | edit source]

Reference[edit | edit source]

  • PetaLinux Tools Documentation Reference guide UG1144
  • PetaLinux Tools DocumentationCommand Line Reference Guide UG1157

Petalinux build[edit | edit source]

To reproduce Petalinux build:

Clone the repository

git clone --recursive git@git.dave.eu:desk-xz-l/petalinux.git -b desk-xz7-l-1.0.1
cd petalinux

Setup the Petalinux environment

source /opt/Xilinx/petalinux/2021.2/settings.sh

Inizialize configuration file

You can use the following configuration file

Config file Boot
config_bora uSD and QSPI-NOR
config_borax uSD and QSPI-NOR
config_boralite uSD and QSPI-NOR
config_boralite_nand NAND
config_boralite_nand_usd uSD with NAND support

In order to select a configuration file use the following command

cp project-spec/configs/<configuration file> project-spec/configs/config

Update the hardware description

Hardware description come from to Vivado project. Vivado project is already cloned into Petalinux project.

To build Hardware description file, please see this page: Creating and building the Vivado project

You can use the following command to update the hardware description

petalinux-config --get-hw-description vivado/vivado/<path to .xsa>

When applying the hardware description, the standard menuconfig interface will popup: just save the current configuration to proceed. If you won't see menuconfig interface, perform the following command

petalinux-config --get-hw-description vivado/vivado/<path to .xsa> --silentconfig

Run the Petalinux build

To build petalinux-image-minimal use the following command

petalinux-build

If you want build <code<dave-image-devel use the following command

petalinux-build -c dave-image-devel

For build only kernel use the following command

petalinux-build -c kernel

For build only U-Boot use the following command

petalinux-build -c u-boot

Generate BOOT.BIN

To generate BOOT.BIN artifact, perform the following command

petalinux-package --boot --u-boot --force

In case of boot from NAND for Boralite platform, please use the following command

petalinux-package --boot --u-boot --kernel --offset 0x1080000 --force

Generate wic image

In order to generate wic image to install on uSD perform the following command

petalinux-package --wic --bootfiles "BOOT.BIN boot.scr image.ub"

If you want to use dave-image-devel rootfs you have to perform the following command

petalinux-package --wic --bootfiles "BOOT.BIN boot.scr image.ub" --rootfs-file build/tmp/deploy/images/zynq-generic/dave-image-devel-zynq-generic.tar.gz