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

From DAVE Developer's Wiki
Jump to: navigation, search
Line 6: Line 6:
 
!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"|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:#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"|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:#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"|2023/01/22
+
!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/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"|DESK-XZ7-L-1.0.1 release
 
|-
 
|-
 
|}
 
|}
Line 18: Line 18:
  
 
== Creating and building the Petalinux project ==
 
== Creating and building the Petalinux project ==
=== Reference ===
+
=== 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 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 Tools DocumentationCommand Line Reference Guide [https://docs.xilinx.com/v/u/2020.1-English/ug1157-petalinux-tools-command-line-guide UG1157]
  
=== Petalinux build ===
+
=== Petalinux environment setup ===
To reproduce Petalinux build:
+
To reproduce the Petalinux build:
  
'''Clone the repository'''
+
* clone the repository
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
git clone --recursive git@git.dave.eu:desk-xz-l/petalinux.git -b desk-xz7-l-1.0.1
 
git clone --recursive git@git.dave.eu:desk-xz-l/petalinux.git -b desk-xz7-l-1.0.1
Line 31: Line 31:
 
</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 /opt/Xilinx/petalinux/2021.2/settings.sh
 
</syntaxhighlight>
 
</syntaxhighlight>
  
'''Inizialize configuration file'''
+
* initialize the configuration file
  
You can use the following configuration file
+
You can use the proper configuration file from the following table:
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 61: Line 61:
 
|}
 
|}
  
In order to select a configuration file use the following command
+
In order to select a configuration file use the following command:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 67: Line 67:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
'''Update the hardware description'''
+
=== Update the hardware description===
  
Hardware description come from to Vivado project. Vivado project is already cloned into Petalinux project.  
+
The hardware description comes from the Vivado project. The Vivado project is already cloned into the Petalinux project.  
  
To build Hardware description file, please see this page: [https://wiki.dave.eu/index.php/DESK-XZ7-L/Development/Creating_and_building_the_Vivado_project Creating and building the Vivado 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
+
You can use the following command to update the hardware description:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 79: Line 79:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
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
+
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">
Line 85: Line 85:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
'''Run the Petalinux build'''
+
=== Run the Petalinux build===
  
To build <code>petalinux-image-minimal</code> use the following command
+
To build <code>petalinux-image-minimal</code> use the following command:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 93: Line 93:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
If you want build <code>dave-image-devel</code> use the following command
+
For building the <code>dave-image-devel</code> target, use the following command:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 99: Line 99:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
For build only kernel use the following command
+
For building only the Linux kernel, use the following command
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 105: Line 105:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
For build only U-Boot use the following command
+
For building only U-Boot use the following command:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 111: Line 111:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
'''Generate <code>BOOT.BIN</code>'''
+
For generating the <code>BOOT.BIN</code> artifact, run the following command:
 
 
To generate <code>BOOT.BIN</code> artifact, perform the following command
 
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 119: Line 117:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
In case of boot from NAND for ''Boralite'' platform, please use the following command
+
In case of boot from NAND for the [[BORA Lite SOM | BORA Lite]] SOM, be careful on using the following command:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 125: Line 123:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
'''Generate <code>wic</code> image'''
+
=== SD card image ===
  
In order to generate <code>wic</code> image to install on uSD perform the following command
+
To generate the SD card <code>wic</code> image, execute the following command:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 133: Line 131:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
If you want to use <code>dave-image-devel</code> rootfs you have to perform the following command
+
If you want to use <code>dave-image-devel</code> root file system, run the following command:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 140: Line 138:
  
 
<section end=Body/>
 
<section end=Body/>
----
+
 
[[Category:BORA]]
+
 
 +
[[Category:BORA]] [[Category:BORA Xpress]] [[Category:BORA Lite]]

Revision as of 10:27, 25 January 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



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

Documentation reference[edit | edit source]

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

Petalinux environment setup[edit | edit source]

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.0.1
cd petalinux
  • setup the Petalinux environment
source /opt/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_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[edit | edit source]

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 build[edit | edit source]

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 image[edit | edit source]

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