Over the past couple of days, I have been trying to create a viable CMake SDK with the Yocto project. I am trying to create an SDK based on the image file that is shown below:
#To build SDK, use bitbake meta-toolchain DESCRIPTION = "Embeddev-LXDE image." LICENSE="CLOSED" IMAGE_INSTALL = "packagegroup-core-boot \ packagegroup-core-x11 \ packagegroup-lxde-base \ kernel-modules \ " IMAGE_INSTALL_append = " nano git cmake qtbase qtchooser dbus packagegroup-core-ssh-openssh xterm" #Framebuffer driver for tft IMAGE_INSTALL_append = " xf86-video-fbdev" IMAGE_INSTALL_append = " apt dpkg sudo tzdata glibc-utils localedef networkmanager pointercal xinit xkeyboard-config base-passwd liberation-fonts pkgconfig" IMAGE_INSTALL_append = " wiringpi" #Maybe consider connman instead of networkmanager #vc-graphics is problematic with userland.. inherit populate_sdk ## SDK stuff, to build sdk use bitbake rpi-embeddev-lxde-image -c populate_sdk # Add all static packages: SDKIMAGE_FEATURES += "staticdev-pkgs" SDKIMAGE_FEATURES += "staticdev-pkgs" SDKIMAGE_FEATURES += "dev-pkgs" TOOLCHAIN_TARGET_TASK_append = " wiringpi-dev" TOOLCHAIN_HOST_TASK_append = " nativesdk-cmake" ## inherit distro_features_check REQUIRED_DISTRO_FEATURES = "x11" IMAGE_LINGUAS ?= " " LICENSE = "MIT" export IMAGE_BASENAME = "rpi-embeddev-lxde-image" inherit core-image ENABLE_SPI_BUS = "1" ENABLE_I2C = "1" # qtwebengine qtwebkit ... do_image_prepend() { }
I am bitbake rpi-embeddev-lxde-image -c populate_sdk
my SDK with bitbake rpi-embeddev-lxde-image -c populate_sdk
.
I would like to describe the exact problem. The problem is that nativesdk-cmake
not installed correctly in the SDK. Recipe Cmake 3.10.2 gives:
do_install_append_class-nativesdk() { mkdir -p ${D}${datadir}/cmake install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh } FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}" FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}" FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}" BBCLASSEXTEND = "nativesdk"
Keeping track of the root of the problem, I saw that the cmake/
directory that should be created is created in:
/home/<user>/poky/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-cmake/3.10.2-r0/image/opt/poky/2.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/share/cmake/
However, this cmake directory is not valid in /opt/poky/2.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/share/
, where it is really needed when I install the SDK on /opt
, unfortunately.
Do I need to know anything else or do something else, how to generate the SDK correctly?
I'm really stuck here, any help really appreciated.
Thanks in advance.
EDIT : I moved the TOOLCHAIN_TASK
to layer.conf and used the bitbake meta-toolchain
, which also didn't work.
EDIT2 : I used cmake version 3.6 with PREFERRED_PROVIDER_cmake = "3.6.1"
, which also did not work.