- 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_qt5
in the newly created file. - Run
petalinux-config -c rootfs
and 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-petalinux-opencv in the RootFS menu config.
- Build SDK.
petalinux-build --sdk
This command builds SDK and deploys it at <plnx-proj-root>/images/linux/sdk.sh.
- Install SDK.
petalinux-package --sysroot
This command installs SDK at <plnx-proj-root>/images/linux/sdk.
- Use the images/linux/sdk directory as sysroot for building the OpenCV applications.