无法使用 Yocto 为 Windows 生成 SDK

Can't generate SDK for Windows with Yocto

我已经为 freescale imx6qpsabreai 板和 SDK 构建了一个 Linux 图像,工具链在 Linux 上运行良好。

现在我想支持 Windows 和 之后的开发 post 我已经

但是,我无法通过这种方式构建新的 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 架构的编译器,所以也许我无法使用 arm 工具链Windows?

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

看来您使用的层 (meta-mingw) 需要更新的 bitbake 语义:

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

*** 0028:return 异常:类型错误:getVar() 缺少 1 个必需的位置参数:'expand'

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

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