[OE-core] make-mod-scripts question

Nicolas Dechesne nicolas.dechesne at linaro.org
Thu Sep 5 14:42:52 UTC 2019


hi,

I was looking into a build issue today, related to signing an external
kernel module. My build failed when calling the kernel utility
sign-file, the error was that libcrypto.so was not found.

Looking a bit more into that, I realized that make-mod-scripts will
built some kernel utilities, including scripts/sign-file which link
against libcrypto, however we 'copy' sign-file into
STAGING_KERNEL_BUILDDIR.

Later on, when my own recipe uses sign-file from
STAGING_KERNEL_BUILDDIR, it still requires the libcrypto.so file which
is in the make-mod-scripts per recipe sysroot. So basically my recipe
needs a binary from STAGING_KERNEL_BUILDDIR and a shared library from
another recipe sysroot. That looks wrong to me.

My problem is fixed by adding a dependency on make-mod-scripts, it
still feels wrong to reply on another recipe sysroot , doesn't it go
against the whole idea of per recipe sysroot?

Here is the sign-file in the kernel shared workdir:

$ find tmp-glibc -name sign-file
tmp-glibc/work-shared/open-q-212a-homehub/kernel-build-artifacts/scripts/sign-file

And here we can see the dependency against make-mod-scripts sysroot:
$ ldd tmp-glibc/work-shared/open-q-212a-homehub/kernel-build-artifacts/scripts/sign-file
        linux-vdso.so.1 =>  (0x00007fff8299d000)
        libcrypto.so.1.1 =>
/local/mnt2/workspace2/ndec/le.um.3.4.1/build-wlan/tmp-glibc/work/open_q_212a_homehub-oe-linux-gnueabi/make-mod-scripts/1.0-r0/recipe-sysroot-native/usr/lib/libcrypto.so.1.1
(0x00007fcb2247d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcb220b3000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcb21eaf000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007fcb21c92000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fcb2293c000)

or like that:
$ strings tmp-glibc/work-shared/open-q-212a-homehub/kernel-build-artifacts/scripts/sign-file
| grep tmp-glib
/local/mnt2/workspace2/ndec/le.um.3.4.1/build-wlan/tmp-glibc/work/open_q_212a_homehub-oe-linux-gnueabi/make-mod-scripts/1.0-r0/recipe-sysroot-native/usr/lib:/local/mnt2/workspace2/ndec/le.um.3.4.1/build-wlan/tmp-glibc/work/open_q_212a_homehub-oe-linux-gnueabi/make-mod-scripts/1.0-r0/recipe-sysroot-native/lib

cheers
nico


More information about the Openembedded-core mailing list