[yocto] Can't compile out of tree kernel module when CONFIG_SYSTEM_TRUSTED_KEYRING is set in the kernel configuration

Bruce Ashfield bruce.ashfield at gmail.com
Wed May 2 19:27:41 PDT 2018


On Wed, May 2, 2018 at 5:05 PM, Martin Townsend <mtownsend1973 at gmail.com>
wrote:

> Hi,
>
> I get the following error when compiling a kernel module using the
> latest version of Rocko (The kernel is not linux-yocto but NXP's
> freescale linux-imx, maybe this could be a factor) :
>
> ERROR: kernel-module-driver-0.1-r0 do_make_scripts: Function failed:
> do_make_scripts (log file is located at
> /ws/yocto-rocko/build/tmp/work/mach_1717-linux-gnueabi/
> kernel-module-driver/0.1-r0/temp/log.do_make_scripts.23703)
> ERROR: Logfile of failure stored in:
> /ws/yocto-rocko/build/tmp/work/mach_1717-cwr-linux-
> gnueabi/kernel-module-driver/0.1-r0/temp/log.do_make_scripts.23703
> Log data follows:
> | DEBUG: Executing shell function do_make_scripts
> | make: Entering directory
> '/ws/rufilla/yocto-rocko/build/tmp/work-shared/mach-1717/kernel-source'
> | make[1]: Entering directory
> '/ws/rufilla/yocto-rocko/build/tmp/work-shared/mach-
> 1717/kernel-build-artifacts'
> |   HOSTCC  scripts/extract-cert
> | /ws/yocto-rocko/build/tmp/work-shared/mach-1717/kernel-
> source/scripts/extract-cert.c:21:25:
> fatal error: openssl/bio.h: No such file or directory
> | compilation terminated.
> | scripts/Makefile.host:107: recipe for target 'scripts/extract-cert'
> failed
> | make[2]: *** [scripts/extract-cert] Error 1
> | /ws/rufilla/yocto-rocko/build/tmp/work-shared/mach-1717/
> kernel-source/Makefile:560:
> recipe for target 'scripts' failed
> |
>
> I checked the makefile and extract-cert is only compiled if
> CONFIG_SYSTEM_TRUSTED_KEYRING is set which we have.
>
>  I could install libssl-dev but it doesn't feel right installing this
> and it's not in the system requirements plus the file openssl/bio.h is
> in the recipe-sysroot-native directory of the kernel module WORK_DIR.
>

I've run into this plenty of times with newer kernels (4.14+), which is why
all the linux-yocto recipes have:


DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"

As does my re-worked kernel-devsrc.

So yah, you can just add the dependency to fix the problem.

Bruce


>
>
> Any help would be greatly appreciated,
> Marin.
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180502/95309a0a/attachment.html>


More information about the yocto mailing list