Open main menu

DAVE Developer's Wiki β

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

< DESK-XZ7-L
(Created page with "<section begin=History/> {| style="border-collapse:collapse; " !colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History |- !style="border-le...")
 
 
(11 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
 
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
 
|-  
 
|-  
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|ID#
 
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 
|-
 
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|{{oldid|1xxxx|1xxxx}}
+
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|{{oldid|17137|2022/11/18}}
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|Q1 2023
+
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|DESK-XZ7-L-1.0.0-rc1 release
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|DESK-XZ7-L-1.0.0 release
+
|-
 +
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|{{oldid|19955|2023/01/25}}
 +
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|DESK-XZ7-L-1.0.1 release
 +
|-
 +
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|2023/05/20
 +
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|DESK-XZ7-L-1.1.0 release
 
|-
 
|-
 
|}
 
|}
Line 15: Line 19:
 
__FORCETOC__
 
__FORCETOC__
 
<section begin=Body/>
 
<section begin=Body/>
 +
 +
{{ImportantMessage|text=Petalinux installation path, in this documentation, is the <code>/opt</code> directory. If you have chosen a different one, set it properly. The commands reported here below have been used on a native server running Ubuntu 20.04.}}
  
 
== Creating and building the Petalinux project ==
 
== Creating and building the Petalinux project ==
To reproduce Petalinux build:
+
=== Documentation reference ===
 +
* PetaLinux Tools Documentation Reference guide [https://docs.xilinx.com/r/2021.2-English/ug1144-petalinux-tools-reference-guide/Revision-History UG1144]
 +
* PetaLinux Tools DocumentationCommand Line Reference Guide [https://docs.xilinx.com/v/u/2020.1-English/ug1157-petalinux-tools-command-line-guide UG1157]
 +
 
 +
=== Petalinux environment setup ===
 +
To reproduce the Petalinux build:
 +
 
 
* clone the repository
 
* clone the repository
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
git clone git@git.dave.eu:sdv12/petalinux.git -b desk-xz7-l-rel-1.0.0
+
git clone --recursive git@git.dave.eu:desk-xz-l/petalinux.git -b desk-xz7-l-1.1.0
 
cd petalinux
 
cd petalinux
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
* setup the Petalinux environment
 
* setup the Petalinux environment
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
source /opt/Xilinx/petalinux/2021.2/settings.sh
+
source <petalinux installation path>/Xilinx/petalinux/2021.2/settings.sh
 +
</syntaxhighlight>
 +
 
 +
* initialize the configuration file
 +
 
 +
You can use the proper configuration file from the following table:
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Config file
 +
! Boot
 +
|-
 +
| <code>config_bora</code>
 +
| uSD and QSPI-NOR
 +
|-
 +
| <code>config_bora_ETH1</code>
 +
| uSD and QSPI-NOR with ETH1 support
 +
|-
 +
| <code>config_borax</code>
 +
| uSD and QSPI-NOR
 +
|-
 +
| <code>config_borax_ETH1</code>
 +
| uSD and QSPI-NOR with ETH1 support
 +
|-
 +
| <code>config_boralite</code>
 +
| uSD and QSPI-NOR
 +
|-
 +
| <code>config_boralite_NAND</code>
 +
| NAND
 +
|-
 +
| <code>config_boralite_nand_usd</code>
 +
| uSD with NAND support
 +
|}
 +
 
 +
In order to select a configuration file use the following command:
 +
 
 +
<syntaxhighlight lang="bash">
 +
cp project-spec/configs/<configuration file> project-spec/configs/config
 +
</syntaxhighlight>
 +
 
 +
=== Update the hardware description===
 +
 
 +
The hardware description comes from the Vivado project. The Vivado project is already cloned into the Petalinux project.
 +
 
 +
To build the Hardware description file, please look at this page: [https://wiki.dave.eu/index.php/DESK-XZ7-L/Development/Creating_and_building_the_Vivado_project Creating and building the Vivado project]
 +
 
 +
You can use the following command to update the hardware description:
 +
 
 +
<syntaxhighlight lang="bash">
 +
petalinux-config --get-hw-description vivado/vivado/<path to .xsa>
 
</syntaxhighlight>
 
</syntaxhighlight>
* update the hardware description (with the one provided as output from the Vivado project above)
+
 
 +
When applying the hardware description, the standard menuconfig interface will pop up: just save the current configuration to proceed. If the menuconfig interface will not bring up, send the following command:
 +
 
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
petalinux-config --get-hw-description <path to .xsa>
+
petalinux-config --get-hw-description vivado/vivado/<path to .xsa> --silentconfig
 
</syntaxhighlight>
 
</syntaxhighlight>
* when applying the hardware description, the standard menuconfig interface will popup: just save the current configuration to proceed
 
  
* 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>
 +
 +
For building the <code>dave-image-devel</code> target, use the following command:
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-build -c dave-image-devel
 +
</syntaxhighlight>
 +
 +
For building only the Linux kernel, use the following command
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-build -c kernel
 +
</syntaxhighlight>
 +
 +
For building only U-Boot use the following command:
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-build -c u-boot
 +
</syntaxhighlight>
 +
 +
For generating the <code>BOOT.BIN</code> artifact, run the following command:
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-package --boot --u-boot --force
 +
</syntaxhighlight>
 +
 +
In case of boot from NAND for the [[BORA Lite SOM | BORA Lite]] SOM, be careful on using the following command:
 +
 +
<syntaxhighlight lang="bash">
 +
petalinux-package --boot --u-boot --kernel --offset 0x1080000 --force
 +
</syntaxhighlight>
 +
 +
=== SD card image ===
 +
 +
To generate the SD card <code>wic</code> image, execute 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> root file system, run 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>
  
 
<section end=Body/>
 
<section end=Body/>
----
+
 
[[Category:BORA]]
+
 
 +
[[Category:BORA]] [[Category:BORA Xpress]] [[Category:BORA Lite]]

Latest revision as of 12:45, 17 May 2024

History
Issue Date Notes

2022/11/18

DESK-XZ7-L-1.0.0-rc1 release

2023/01/25

DESK-XZ7-L-1.0.1 release
2023/05/20 DESK-XZ7-L-1.1.0 release



200px-Emblem-important.svg.png

Petalinux installation path, in this documentation, is the /opt directory. If you have chosen a different one, set it properly. The commands reported here below have been used on a native server running Ubuntu 20.04.

Contents

Creating and building the Petalinux projectEdit

Documentation referenceEdit

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

Petalinux environment setupEdit

To reproduce the Petalinux build:

  • clone the repository
git clone --recursive git@git.dave.eu:desk-xz-l/petalinux.git -b desk-xz7-l-1.1.0
cd petalinux
  • setup the Petalinux environment
source <petalinux installation path>/Xilinx/petalinux/2021.2/settings.sh
  • initialize the configuration file

You can use the proper configuration file from the following table:

Config file Boot
config_bora uSD and QSPI-NOR
config_bora_ETH1 uSD and QSPI-NOR with ETH1 support
config_borax uSD and QSPI-NOR
config_borax_ETH1 uSD and QSPI-NOR with ETH1 support
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 descriptionEdit

The hardware description comes from the Vivado project. The Vivado project is already cloned into the Petalinux project.

To build the Hardware description file, please look at 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 pop up: just save the current configuration to proceed. If the menuconfig interface will not bring up, send the following command:

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

Run the Petalinux buildEdit

To build petalinux-image-minimal use the following command:

petalinux-build

For building the dave-image-devel target, use the following command:

petalinux-build -c dave-image-devel

For building only the Linux kernel, use the following command

petalinux-build -c kernel

For building only U-Boot use the following command:

petalinux-build -c u-boot

For generating the BOOT.BIN artifact, run the following command:

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

In case of boot from NAND for the BORA Lite SOM, be careful on using the following command:

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

SD card imageEdit

To generate the SD card wic image, execute the following command:

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

If you want to use dave-image-devel root file system, run 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