无法使用Yocto生成Windows的SDK [英] Can't generate SDK for Windows with Yocto
问题描述
我已经为飞思卡尔imx6qpsabreai开发板和带有工具链的SDK构建了Linux映像,该映像在Linux上运行良好.
I've build a Linux image for freescale imx6qpsabreai board and SDK with toolchain which works well on Linux.
现在,我想支持Windows上的开发并遵循这我发布的帖子
Now I want to support development on Windows and following this post I've
- 将 oe meta-mingw 下载到 sources/meta-openembedded/meta-mingw
- 在我的项目中将SDKMACHINE = x86_64-mingw32添加到local.conf中
但是,我无法以这种方式构建新的SDK.
however, I can't build new SDK this way.
~/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工具链?
Also, I am not an experienced C/C++ programmer, but from my point of view mingw doesn't contain compiler for arm architecture, so maybe I just can't get arm toolchain to use on Windows?
推荐答案
meta-mingw构建了从Linux到Windows(mingw)的交叉编译.然后,它使用此交叉编译器构建从(mingw)到目标SDK环境的标准工具链.您使用的层正确,但是存在其他问题.
meta-mingw builds a cross compile from Linux to Windows (mingw). It then uses this cross compiler to construct a standard toolchain from (mingw) to the target SDK environment. You are using the correct layer, but have a different problem.
您似乎正在使用期望较新的bitbake语义的层(meta-mingw):
It appears that you are using a layer (meta-mingw) that is expecting the newer bitbake semantics:
0027: if d.getVar("TARGET_OS") != "linux":
*** 0028:返回异常:TypeError:getVar()缺少1个必需的位置参数:"expand"
*** 0028: return Exception: TypeError: getVar() missing 1 required positional argument: 'expand'
Bitbake以前需要'd.getVar'两个参数,现在只需要一个(第二个是可选的).
Bitbake used to require two arguments to 'd.getVar', and now only requires one (the second is optional).
我建议您确定所使用的oe-core/poky版本,并获取匹配的meta-mingw版本.(它可能像签出正确的分支一样简单.)
I would suggest that you identify which version of oe-core/poky you are using and get a matching version of meta-mingw. (It may be as simple as checking out the correct branch.)
这篇关于无法使用Yocto生成Windows的SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!