yocto - Yocto rust recipe 还产生需要打包的 -native 输出
问题描述
我在 hardknott 上尝试了这种方法,但我无法让它工作配方也产生需要打包的 -native 输出
这是一个生成 x86_64 应用程序的 rust 配方,我想将它以正确的方式打包到 sdk 中,以便可以使用。
我可以将主包分离到-native-bin,并在recipe-sysroot中看到它,但是在构建-native-helper配方时,我无法让它填充文件的workdir的recipe-sysroot。我怀疑原因是我收到一个错误,即找不到 x86_64 的主要配方?
ERROR: Manifest xxxxxx.populate_sysroot not found in vs_imx8mp cortexa53 armv8a-crc armv8a aarch64 allarch x86_64_x86_64-nativesdk (variant '')?
因此,任何有用的信息将不胜感激!
解决方案
像这样被黑客入侵:
食谱.bb:
do_install_append() {
# Set permision without run flag so that it doesn't fail on checks
chmod 644 ${D}/usr/bin/@RECIPE@-compiler
}
# @RECIPE@ generates a compiler during the target generation step
#separate this to the -native-bin package, and skip the ARCH checks
#also in the image file for stations_sdk move the app to right dir and add execute flag
PACKAGES_prepend = "${PN}-native-bin "
PROVIDES_prepend = "${PN}-native-bin "
INSANE_SKIP_${PN}-native-bin = "arch"
FILES_${PN}-native-bin = "/usr/bin/@RECIPE@-compiler"
SYSROOT_DIRS += "/"
图片.bb:
# @RECIPE@ produces a compiler that is produced as a part of the target generation
#so we use the recipe and hack it to supply the -compiler as part of the
#host binaries
TOOLCHAIN_TARGET_TASK_append = " @RECIPE@-native-bin"
do_fix_@RECIPE@() {
mv ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/usr/bin/@RECIPE@-compiler ${SDK_OUTPUT}/${SDKPATHNATIVE}/usr/bin/@RECIPE@-compiler
chmod 755 ${SDK_OUTPUT}/${SDKPATHNATIVE}/usr/bin/@RECIPE@-compiler
}
SDK_POSTPROCESS_COMMAND_prepend = "do_fix_@RECIPE@; "
这会在最后生成正确目录中的二进制文件
推荐阅读
- python - 打印出具有最大/最佳 AUC 分数的最佳参数
- asp.net-mvc-5 - MVC 6 和 ADFS 身份验证
- python - 在另一条曲线上拟合和外推一条曲线
- vagrant - 如何修复 Homestead Vagrant 错误“配置和启用网络接口...`await_response_state':代理 pid 3330 (RuntimeError)”
- c++ - C++ 使用用户输入和指数查找现值
- django - Django模板标签在逗号分隔条件下循环
- php - 通过 Laravel 使用 Mailgun 从 HTML 表单发送数据
- python - 在字典中查找键/值
- python - AttributeError:“模块”对象没有属性“样式”/无法更新
- reactjs - 如何在没有商店的情况下在 npm 上打包反应组件