【问题标题】:Yocto SDK Kernel Source make scripts failsYocto SDK 内核源制作脚本失败
【发布时间】:2021-12-13 03:37:21
【问题描述】:

我正在尝试使用我通过bitbake 生成的 Yocto SDK 编译我的内核模块。

SDK 构建没有问题,但是当我尝试在目标 sysroot 的内核源目录中运行 make scripts ARCH=arm64 时,我收到有关缺少头文件的问题:

  ...
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/asn1_compiler
  HOSTCC  scripts/extract-cert
scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory
   21 | #include <openssl/bio.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:107: scripts/extract-cert] Error 1
make: *** [Makefile:1096: scripts] Error 2

我的图像 .bb 文件中有 TOOLCHAIN_TARGET_TASK_append = " kernel-devsrc openssl-dev alsa-dev",我认为它应该提供缺少的 openssl/bio.h 文件,但情况似乎并非如此。

我能够解决此问题的唯一方法是在我的 SDK 机器上安装 libssl-dev,但这感觉像是一种解决方法,而不是正确的解决方案。我的期望是,当您从 SDK 获取环境时,它应该为内核提供必要的头文件。

【问题讨论】:

    标签: linux-kernel openssl yocto


    【解决方案1】:

    由于scripts/extract-cert.c 是为宿主环境编译的,我宁愿尝试在TOOLCHAIN_HOST_TASK 变量中附加" openssl-dev "

    看到这个问题:TOOLCHAIN_HOST_TASK Vs TOOLCHAIN_TARGET_TASK

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-08-24
      • 1970-01-01
      • 2022-10-21
      • 1970-01-01
      • 2018-05-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多