如何使用Yocto项目正确配置Qt SDK? [英] How do I get Qt SDK configured properly with Yocto project?

查看:2533
本文介绍了如何使用Yocto项目正确配置Qt SDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Yocto Project的新手。最初的想法是基于 core-image-full-cmdline (这是没有窗口系统)和


  • 所以我能够运行Qt应用程序的目标需要有
    header&图书馆安装了,不是吗?我必须在我的图像食谱中指定?

  • 执行 $ bitbake my_image -c populate_sdk 将生成 my_image 与Qt5支持+ SDK安装程序



据了解,要获得一个Qt SDK步骤将是:


  1. 下载并将 meta-qt5 添加到bblayers .conf。


  2. 添加到您要构建SDK的图像配方:
    继承populate_sdk_qt5


  3. 配置SDK构建(添加/删除功能)。 - - 这里我需要帮助。我只想要 EGLFS 支持,没有X11 / Wayland和没有Qtwebkit(和idk,也许还有一些我还没有意识到的其他功能)。

  4. bitbake my_image -c populate_sdk

我的构建有一个错误编译方式虽然我有这样的:
DISTRO_FEATURES_remove =x11 wayland

解决方案

我犯了一些错误。所以这些步骤:


  1. 下载并添加 meta-qt5 到bblayers.conf。


  2. 添加到您要构建SDK的图像配方: inherit populate_sdk_qt5 。现在,do_populate_sdk任务知道目标,并将在相应的sysroot上安装所需的头文件和库(稍后需要配置QtCreator)



    2.1当我们要生成SDK时,需要开发包。将其添加到图像食谱中: IMAGE_FEATURES + =dev-pkgs



    2.2如果我们的发行版不有任何Windows经理: DISTRO_FEATURES_remove =x11 wayland。我的错误是把它放在我的图像食谱上,但它必须设置在 local.conf 上,所以所有的食谱都知道这一点。 有关Qt后端的更多信息



    2.3我不知道这个,但是我想删除qtwebkit,我添加了(在local.conf中): PACKAGECONFIG_remove_pn-qttools =qtwebkit
    PACKAGECONFIG_remove_pn-qtquick1 =qtwebkit。仍然建立qtwebkit模块。我需要进一步了解这一点。


  3. 构建图像 $ bitbake my_image

    / li>
  4. 构建SDK $ bitbake my_image -c populate_sdk

现在我们得到了交叉编译所需的工具链。


I'm new to Yocto Project. The initial idea is to create a custom image based on core-image-full-cmdline (this is with no windowing system) and generate a Qt5 SDK against this image.

  • So my target to be able to run Qt applications needs to have some headers & libraries installed, isn't ? What I must specify on my image recipe ?
  • Doing $ bitbake my_image -c populate_sdk will generate my_image with Qt5 support + SDK installer ?

As I understood, to get a Qt SDK the steps would be:

  1. Download and add meta-qt5 to bblayers.conf.

  2. Add to the image recipe against which you want to build the SDK: inherit populate_sdk_qt5

  3. Configure the SDK build (add/remove features). <- Here I need help. I only want EGLFS support, no X11/Wayland and no Qtwebkit (and idk, maybe some other features that I'm not aware yet).
  4. bitbake my_image -c populate_sdk

My build got an error compiling wayland although I have this: DISTRO_FEATURES_remove = "x11 wayland"

解决方案

I made some mistakes. So these are the steps:

  1. Download and add meta-qt5 to bblayers.conf.

  2. Add to the image recipe against which you want to build the SDK: inherit populate_sdk_qt5. Now the do_populate_sdk task knows the target and will install the needed headers and libs on the respective sysroot (which will be needed later to be able to configure QtCreator per example)

    2.1 As we gonna generate an SDK, dev packages are needed. Add this to the image recipe: IMAGE_FEATURES += "dev-pkgs"

    2.2 If our distro doesn't have any windows manager: DISTRO_FEATURES_remove = "x11 wayland". My mistake was to put this on my image recipe but it must be set on local.conf so all the recipes are aware of this. More info about Qt backends

    2.3 I'm not sure about this but I wanted to remove qtwebkit, and I added (on local.conf): PACKAGECONFIG_remove_pn-qttools = "qtwebkit" PACKAGECONFIG_remove_pn-qtquick1 = "qtwebkit". Still qtwebkit module is built. I need to investigate more about this.

  3. Build the image $ bitbake my_image

  4. Build the SDK $ bitbake my_image -c populate_sdk

Now we got a toolchain needed for cross-compile.

这篇关于如何使用Yocto项目正确配置Qt SDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆