Few examples for building the
SDK:
- Adding a cross compiling qt toolchain
To build SDK with qt toolchain:
- Create the <plnx-proj-root>/project-spec/meta-user/recipes-core/images/petalinux-image-minimal.bbappend file.
- Add
inherit populate_sdk_qt5in the newly created file. - Run
petalinux-config -c rootfsand select packagegroup-petalinux-qt. - Run
petalinux-build -s. - Run
petalinux-package sysroot.
To verify:
- Open a new terminal.
- Go to <plnx-proj-root>/image/linux/sdk.
- Run
source environment-setup-aarch64-xilinx-linux. - Run
which qmake. This confirms that the qmake is coming from the SDK.
- Building OpenCV applications
- Create a PetaLinux project.
- Add packagegroup-opencv in the RootFS menu config.
- To build a static library for an OpenCV application, you
need to edit the <proot>/project-spec/meta-user/conf/petalinuxbsp.conf
file to include the static library (.a) in the root file system. For
example:
IMAGE_INSTALL:append = " opencv-staticdev" - Build SDK.
petalinux-build --sdkThis command builds SDK and deploys it at <plnx-proj-root>/images/linux/sdk.sh.
- Install SDK.
petalinux-package sysrootThis command installs SDK at <plnx-proj-root>/images/linux/sdk.
- Use the images/linux/sdk directory as sysroot for building the OpenCV applications.