Khem Raj <[email protected]> escreveu no dia quarta, 25/10/2023 à(s) 18:18:

> I wonder if something like below would help
>
> diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> index 2cff48c39c3..6133721334c 100644
> --- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> +++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> @@ -12,7 +12,7 @@ S = "${WORKDIR}"
>
>  do_configure[depends] += "virtual/kernel:do_shared_workdir
> openssl-native:do_populate_sysroot"
>  do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
> -
> +do_populate_sysroot[depends] += "openssl-native:do_populate_sysroot"
>

This doesn't solve the problem because at compile time the openssl is
already there on native sysroot
and this is the reason for the sign-file to be linked with openssl.
The make-mod-script doesn't install anything and only calls make on the
shared staging kernel dir
and the consequence is creating some binaries on the shared staging kernel
builddir.
One of the tools it builds is the sign-file linked dynamically with the
openssl in the native sysroot of
make-mod-script. At the end of make-mod-script the rm_work deletes the
native sysroot
and this will remove the openssl libcrypto.so.3.
Next time the sign-file in the shared staging kernel builddir will run the
libcrypto.so.3 will not be found.
Without using the rm_work class everything works as expected.

Jose


>  DEPENDS += "bc-native bison-native"
>  DEPENDS += "gmp-native"
>
> On Wed, Oct 25, 2023 at 7:45 AM Bruce Ashfield <[email protected]>
> wrote:
> >
> > On Wed, Oct 25, 2023 at 7:40 AM Jose Quaresma <[email protected]>
> wrote:
> > >
> > > Hi Joerg,
> > >
> > > This topic has already been discussed previously in
> > > https://lists.openembedded.org/g/openembedded-core/topic/98296212
> > >
> > > Bruce even sent a patch but it was never integrated, probably because
> it was a very invasive change.
> > > https://lists.openembedded.org/g/openembedded-core/message/182024
> >
> > Heh. No, that wasn't the reason. The change wasn't invasive, it is
> > isolated to just the single recipe.
> >
> > I just didn't have the cycles to chase down host specific issues and
> > uninative updates.
> >
> > Clobbering rm_work isn't the right solution IMHO, but it can do the job.
> >
> > Bruce
> >
> > >
> > > Anyway you can solve this problem with:
> > > RM_WORK_EXCLUDE += "make-mod-scripts"
> > >
> > > Jose
> > >
> > > Jörg Sommer via lists.openembedded.org <joerg.sommer=
> [email protected]> escreveu no dia quarta, 25/10/2023
> à(s) 09:57:
> > >>
> > >> Hi,
> > >>
> > >> I'm having an odd problem building the external kernel module
> > >> kernel-module-imx-gpu-viv [1]. I'm using kirkstone and have rm_work
> > >> enabled.
> > >>
> > >> [1]  https://layers.openembedded.org/layerindex/recipe/40267/
> > >>
> > >> The module builds fine, but the install step contains the module
> signing
> > >> which **silently** fails with *libcrypto.so.3* not found:
> > >>
> > >> ```
> > >> | make -C /build/tmp/work-shared/ziborium/kernel-source
> > >>
> M=/build/tmp/work/machine-pyxis-linux/kernel-module-imx-gpu-viv/6.4.3.p4.2-r0/git/src
> > >> modules_install
> > >> | make[1]: Entering directory
> '/build/tmp/work-shared/machine/kernel-source'
> > >> | make -C /build/tmp/work-shared/machine/kernel-build-artifacts -f
> > >> /build/tmp/work-shared/machine/kernel-source/Makefile modules_install
> > >> | make[2]: Entering directory
> > >> '/build/tmp/work-shared/machine/kernel-build-artifacts'
> > >> | test -e include/generated/autoconf.h -a -e include/config/auto.conf
> ||
> > >> (               \
> > >> | echo >&2;                                                     \
> > >> | echo >&2 "  ERROR: Kernel configuration is invalid.";         \
> > >> | echo >&2 "         include/generated/autoconf.h or
> > >> include/config/auto.conf are missing.";\
> > >> | echo >&2 "         Run 'make oldconfig && make prepare' on kernel
> src
> > >> to fix it.";    \
> > >> | echo >&2 ;                                                    \
> > >> | /bin/false)
> > >> | make -f
> > >> /build/tmp/work-shared/machine/kernel-source/scripts/Makefile.modinst
> > >> |   mkdir -p
> > >>
> /build/tmp/work/machine-dist-linux/kernel-module-imx-gpu-viv/6.4.3.p4.2-r0/image/usr/lib/modules/5.15.60-imx8mm+g343e81c0e39e/extra/;
> > >> cp
> > >>
> /build/tmp/work/machine-dist-linux/kernel-module-imx-gpu-viv/6.4.3.p4.2-r0/git/src/galcore.ko
> > >>
> /build/tmp/work/machine-dist-linux/kernel-module-imx-gpu-viv/6.4.3.p4.2-r0/image/usr/lib/modules/5.15.60-imx8mm+g343e81c0e39e/extra/galcore.ko
> > >> |   :
> > >> |   scripts/sign-file "sha1" "certs/signing_key.pem"
> > >> certs/signing_key.x509
> > >>
> /build/tmp/work/machine-dist-linux/kernel-module-imx-gpu-viv/6.4.3.p4.2-r0/image/usr/lib/modules/5.15.60-imx8mm+g343e81c0e39e/extra/galcore.ko
> > >> || true
> > >> | scripts/sign-file: error while loading shared libraries:
> > >> libcrypto.so.3: cannot open shared object file: No such file or
> directory
> > >> |   sh /build/tmp/work-shared/machine/kernel-source/scripts/depmod.sh
> > >> echo 5.15.60-imx8mm+g343e81c0e39e
> > >> | Warning: modules_install: missing 'System.map' file. Skipping
> depmod.
> > >> | make[2]: Leaving directory
> > >> '/build/tmp/work-shared/machine/kernel-build-artifacts'
> > >> | make[1]: Leaving directory
> '/build/tmp/work-shared/machine/kernel-source'
> > >> ```
> > >>
> > >> I noticed that there are special dependency definitions in
> make-mod-scripts
> > >>
> > >> ```
> > >> do_configure[depends] += "virtual/kernel:do_shared_workdir
> > >> openssl-native:do_populate_sysroot"
> > >> do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
> > >> ```
> > >>
> > >> and module-base.bbclass (inherited by module.bbclass)
> > >>
> > >> ```
> > >> # We do the dependency this way because the output is not preserved
> > >> # in sstate, so we must force do_compile to run (once).
> > >> do_configure[depends] += "make-mod-scripts:do_compile"
> > >> ```
> > >>
> > >> Is there an additional dependency needed to address rm_work?
> > >>
> > >> Kind regards
> > >>
> > >> Jörg Sommer
> > >> --
> > >> Navimatix GmbH
> > >> Tatzendpromenade 2
> > >> D-07745 Jena
> > >> Geschäftsführer: Steffen Späthe, Jan Rommeley
> > >> Registergericht: Amtsgericht Jena, HRB 501480
> > >>
> > >>
> > >>
> > >
> > >
> > > --
> > > Best regards,
> > >
> > > José Quaresma
> >
> >
> >
> > --
> > - Thou shalt not follow the NULL pointer, for chaos and madness await
> > thee at its end
> > - "Use the force Harry" - Gandalf, Star Trek II
> >
> > 
> >
>


-- 
Best regards,

José Quaresma
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#105731): 
https://lists.openembedded.org/g/openembedded-devel/message/105731
Mute This Topic: https://lists.openembedded.org/mt/102174355/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to