Select the device-tree matching design module 5 and build all Linux image components. If you have run petalinux-build
in a previous module, the build step will be incremental.
% cd $TRD_HOME/petalinux/bsp/project-spec/meta-user/recipes-bsp/device-tree/files % cp zcu102-base-dm5.dtsi system-user.dtsi % petalinux-build |
Create a boot image.
% cd $TRD_HOME/petalinux/bsp/images/linux % petalinux-package --boot --bif=../../project-spec/boot/dm5.bif --force |
Copy the generated boot image and Linux image to the dm5 SD card directory.
% mkdir -p $TRD_HOME/sd_card/dm5 % cp BOOT.BIN image.ub $TRD_HOME/sd_card/dm5 |
Install the pre-built SDK or skip this step to generate your own SDK
% $TRD_HOME/petalinux/sdk.sh -y -d $TRD_HOME/petalinux/sdk |
Generate and install an SDK for Linux application development.
Note 1: This step can be skipped and the pre-built SDK installer can be used instead.
Note 2: You don't have to run this step for subsequent modules. It is sufficient to generate and install the SDK once and then re-use it for other modules.
% petalinux-build -s % petalinux-package --sysroot -d $TRD_HOME/petalinux/sdk |
$TRD_HOME/petalinux/bsp/project-spec/meta-user/recipes-apps/video-qt2
and the generated binary is located at /usr/bin/video_qt2
on the target rootfs.settings64.sh
script before executing the below steps. This will add the ARM cross-compile toolchain to your PATH
and set the XILINX_SDX
environment variable.Source the PetaLinux SDK environment setup script which sets the SDKTARGETSYSROOT
environment variable which contains the target and host sysroot for building this application. This requires that you have previously completed the PetaLinux SDK installation step.
Note 1: Make sure you source the script in the same shell that is used to launch XSDK. Make sure you source the script before starting XSDK, otherwise close and re-start XSDK.
Note 2: The below command might ask you execute the unset LD_LIBRARY_PATH
command. Go ahead and follow those steps and then source the script again.
% source $TRD_HOME/petalinux/sdk/environment-setup-aarch64-xilinx-linux |
Copy and extract the source files into a new workspace.
% mkdir -p $TRD_HOME/workspaces/ws_video % cd $TRD_HOME/workspaces/ws_video % cp $TRD_HOME/petalinux/bsp/project-spec/meta-user/recipes-apps/video-qt2/files/video-qt2.zip . % unzip video-qt2.zip % mkdir build work |
Configure the project using cmake
and generate eclipse project files. Build the project using make
from the command line.
% cd build % CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ \ cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_ECLIPSE_EXECUTABLE=${XILINX_SDX}/eclipse/lnx64.o/eclipse \ -DUSER_INTERFACE=GUI ../src % make -j |
Alternatively you can build the project through the XSDK GUI.
% cd ../work % xsdk -workspace . & |
$TRD_HOME/workspaces/ws_video/build
directory and make sure the listed project is selected. Click 'Finish'. Copy the generated video_qt2
executable to the dm5 SD card directory.
% cp $TRD_HOME/workspaces/ws_video/build/video_qt2/video_qt2 $TRD_HOME/sd_card/dm5 |
$TRD_HOME/sd_card/dm5
SD card directory to a FAT formatted SD card.To re-start the TRD application with the max supported resolution, run
% run_video.sh |
To re-start the TRD application with a specific supported resolution use the -r switch e.g. for 1920x1080, run
% run_video.sh -r 1920x1080 |