gpt4 book ai didi

linux - OEToolchainConfig.cmake 未由 cmake 配方 Yocto 安装

转载 作者:太空宇宙 更新时间:2023-11-04 12:09:23 25 4
gpt4 key购买 nike

我一直在使用 Yocto 来为我的 Raspberry Pi 生成图像,这也是一个用于交叉编译的 SDK。我想在我的图像文件中输入要安装的包并使用以下方法生成图像:

bitbake my-image

并使用以下方法生成 sdk:

bitbake my-image -c populate_sdk

afaik 的工作流程是您获取 bash 文件并为交叉编译设置环境。

但是,由于某些原因(问题 1) OEToolchainConfig.cmake 在我的例子中没有在 sysroots/usr/share/cmake 中生成.

我目前的情况如下:

#To build SDK, use bitbake meta-toolchain or bitbake my-image -c populate_sdk

inherit core-image

# for populate_sdk to create a valid toolchain with qt5
inherit populate_sdk populate_sdk_qt5

##
inherit distro_features_check

DESCRIPTION = "My image."

LICENSE="CLOSED"



image_KERNEL_MODULES = " \
kernel-modules \
"

#Framebuffer driver for tft
image_DRIVERS = " \
xf86-video-fbdev \
"

image_DESKTOP_SUPPORT = " \
packagegroup-core-boot \
packagegroup-core-x11 \
packagegroup-lxde-base \
localedef \
pointercal \
xinit \
xkeyboard-config \
base-passwd \
liberation-fonts \
"

image_BASIC_TOOLS = " \
apt \
dpkg \
sudo \
tzdata \
dbus \
packagegroup-core-ssh-openssh \
xterm \
networkmanager \
wpa-supplicant \
"

image_DEV_TOOLS = " \
git \
cmake \
gcc \
g++ \
binutils \
binutils-symlinks \
coreutils \
cpp \
cpp-symlinks \
diffutils \
file \
g++ \
g++-symlinks \
gdb \
gdbserver \
gcc \
gcc-symlinks \
gettext \
git \
ldd \
libgcc \
libgcc-dev \
libstdc++ \
libstdc++-dev \
libstdc++-staticdev \
libtool \
make \
perl-modules \
pkgconfig \
python-modules \
python3-modules \
autoconf \
automake \
ccache \
packagegroup-core-buildessential \
glibc-utils \
"

image_DEV_LIBS = " \
wiringpi \
"

image_QT_TOOLS = " \
qtbase \
qtwebengine \
qtwebkit \
"

IMAGE_INSTALL_append = " \
${image_KERNEL_MODULES} \
${image_DRIVERS} \
${image_DESKTOP_SUPPORT} \
${image_BASIC_TOOLS} \
${image_DEV_TOOLS} \
${image_DEV_LIBS} \
${image_QT_TOOLS} \
"

#Maybe consider connman instead of networkmanager
#vc-graphics is problematic with userland..


## SDK stuff, to build sdk use bitbake my-image -c populate_sdk
# Add all static packages: SDKIMAGE_FEATURES += "staticdev-pkgs"
#SDKIMAGE_FEATURES += "staticdev-pkgs"
#SDKIMAGE_FEATURES += "dev-pkgs"

# Dnf issue fix for nativesdk-qt add to local.conf
#PACKAGE_CLASSES = "package_ipk"

# In the target side, add our libs
TOOLCHAIN_TARGET_TASK_append = " wiringpi-dev"

# Needed for cross-compilation / host tasks
TOOLCHAIN_HOST_TASK_append = " nativesdk-packagegroup-qt5-toolchain-host"
#CMake conflicts with the qt packagegroup, cmake is a must, when qt packagegroup is nonexistent
TOOLCHAIN_HOST_TASK_append = " nativesdk-cmake"

REQUIRED_DISTRO_FEATURES = "x11"

IMAGE_LINGUAS ?= " "

LICENSE = "MIT"

export IMAGE_BASENAME = "my-image"


ENABLE_SPI_BUS = "1"
ENABLE_I2C = "1"

do_image_prepend() {

}

这引发了一些问题:(问题 2) 我看到有些人不使用 TOOLCHAIN_HOST_TASKTOOLCHAIN_TARGET_TASK,有些人如何将包添加到 SDK。我想知道我是否做错了什么。(问题 3) 我已经继承了一些基于其他条目的类,但我不确定继承 populate_sdkpopulate_sdk_qt5 究竟有什么帮助我.如果有人可以粗略地解释我做错了什么以及我可以做些什么来改进工作流程,那将是对知识的一个很好的补充。

提前感谢您的建议。

最佳答案

尝试回答(问题 1):

我对 poky-2.5 的发现是,对于我的 x86_64 目标,OEToolchainConfig.cmake 放在开发包中(即 nativesdk-cmake-dev-3.10.3-r0.x86_64_nativesdk.rpm)

因此,尝试:

TOOLCHAIN_HOST_TASK_append = " nativesdk-cmake-dev"

不确定这是否是一个错误。

关于linux - OEToolchainConfig.cmake 未由 cmake 配方 Yocto 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49487458/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com