无法使用Yocto生成适用于Windows的SDK

Can't generate SDK for Windows with Yocto

本文关键字:适用于 Windows SDK Yocto      更新时间:2023-10-16

我已经为飞思卡尔imx6qpsabreai板和SDK构建了一个Linux映像,其工具链在Linux上运行良好。

现在我想支持Windows上的开发,在这篇文章之后,我已经

    将 OE meta-mingw
  • 下载到 sources/meta-openembedded/meta-mingw
  • 在我的项目中将 SDKMACHINE=x86_64-mingw32 添加到 local.conf 中

但是,我无法以这种方式构建新的 SDK。

~/yocto/fsl-community-bsp/build_fsl_framebuffer$ bitbake fsl-image-machine-test -c populate_sdk
Loading cache: 100% |###############################################################################################################################################################################| Time: 0:00:00
Loaded 2 entries from dependency cache.
ERROR: /home/slavskaya/yocto/fsl-community-bsp/sources/meta-openembedded/meta-mingw/recipes-support/libiconv/libiconv_1.14.bb: Error executing a python function in <code>:                        | ETA:  --:--:--
The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 13, function: <module>
     0009:__anon_35__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_devshell_bbclass(d)
     0010:__anon_106__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_sstate_bbclass(d)
     0011:__anon_45__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_blacklist_bbclass(d)
     0012:__anon_158__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_siteinfo_bbclass(d)
 *** 0013:__anon_31__home_slavskaya_yocto_fsl_community_bsp_sources_meta_openembedded_meta_mingw_recipes_support_libiconv_libiconv_1_14_bb(d)
File: '/home/slavskaya/yocto/fsl-community-bsp/sources/meta-openembedded/meta-mingw/recipes-support/libiconv/libiconv_1.14.bb', lineno: 28, function: __anon_31__home_slavskaya_yocto_fsl_community_bsp_sources_meta_openembedded_meta_mingw_recipes_support_libiconv_libiconv_1_14_bb
     0024:inherit autotools pkgconfig gettext
     0025:
     0026:python __anonymous() {
     0027:    if d.getVar("TARGET_OS") != "linux":
 *** 0028:        return
     0029:    if d.getVar("TCLIBC") == "glibc":
     0030:        raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
     0031:}
     0032:
Exception: TypeError: getVar() missing 1 required positional argument: 'expand'
ERROR: Failed to parse recipe: /home/slavskaya/yocto/fsl-community-bsp/sources/meta-openembedded/meta-mingw/recipes-support/libiconv/libiconv_1.14.bb
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

另外,我不是一个有经验的C/C++程序员,但从我的角度来看,mingw不包含用于arm架构的编译器,所以也许我只是无法在Windows上使用arm工具链?

meta-mingw构建了一个从Linux到Windows(mingw)的交叉编译。 然后,它使用此交叉编译器构建从 (mingw) 到目标 SDK 环境的标准工具链。 您使用的是正确的图层,但遇到了其他问题。

您似乎正在使用一个层(元 mingw),该层需要更新的 bitbake 语义:

 0027:    if d.getVar("TARGET_OS") != "linux":

0028: 返回异常:类型错误:getVar() 缺少 1 个必需的位置参数:"展开"

Bitbake过去需要两个参数来"d.getVar",现在只需要一个(第二个是可选的)。

我建议您确定您正在使用哪个版本的oe-core/poky,并获得匹配的meta-mingw版本。 (这可能就像签出正确的分支一样简单。