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

Martin Townsend mtownsend1973 at gmail.com
Wed May 2 14:05:29 PDT 2018


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.


Any help would be greatly appreciated,
Marin.


More information about the yocto mailing list