如何解决Yocto rust recipe 也产生需要包装的本地输出
我在 hardknott 上尝试了这种方法,但我无法让它起作用recipe also produces -native output that needs packaging
这是一个生成 x86_64 应用程序的 Rust 配方,我想以正确的方式将其打包到 sdk 中,以便可以使用。
我可以将主包分离到-native-bin,并且我在recipe-sysroot中看到它,但是在构建-native-时我无法让它填充文件的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@; "
这最终会在正确的目录中生成二进制文件
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。