public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Saul Wold <Saul.Wold@windriver.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 3/3] depmodwrapper: Use nonarch_base_libdir for depmod.d
Date: Fri, 01 Apr 2022 12:11:45 +0100	[thread overview]
Message-ID: <26d7155b1477eebde96ac003a62adeca55900c7d.camel@linuxfoundation.org> (raw)
In-Reply-To: <20220331222153.76037-3-saul.wold@windriver.com>

On Thu, 2022-03-31 at 15:21 -0700, Saul Wold wrote:
> This ensure that when depmod-native runs we can find the correct
> exclude.conf information, in this case adding .debug to ignore
> the .debug kernell modules. The kmod utilities like depmod can use
> either /etc/depmod.d or /lib/depmod.d. The kmod recipe is installing
> the existing search.conf to /lib/depmod.d (nonarch_base_lib)
> 
> When the busybox modutils are used, /lib/depmod.d is not used, so
> it's safe add the exclude.conf file to /lib/depmod.d.
> 
> Signed-off-by: Saul Wold <saul.wold@windriver.com>
> ---
>  meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
> index 04fc14a6d21..65068f02df8 100644
> --- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
> +++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
> @@ -30,11 +30,16 @@ if [ -r "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" ]; then
>      kernelabi=\$(cat "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion")
>  fi
>  
> +if [ ! -e "\3${nonarch_base_libdir}/depmod.d/exclude.conf" ]; then
> +    mkdir -p "\$3${nonarch_base_libdir}/depmod.d"
> +    echo "exclude .debug" > "\$3${nonarch_base_libdir}/depmod.d/exclude.conf"
> +fi

Shouldn't the above go into the kmod recipe? We need this on target as well as
in our rootfs build, right? I'm worried about the case where someone calls
depmod on target.

> +
>  if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then
>      echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
> -    exec env depmod -C "\$3${sysconfdir}/depmod.d" "\$1" "\$2" "\$3" "\$4"
> +    exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" "\$4"
>  else
> -    exec env depmod -C "\$3${sysconfdir}/depmod.d" "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
> +    exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
>  fi
>  EOF
>  	chmod +x ${D}${bindir_crossscripts}/depmodwrapper

Does anything in the build install to $sysconfdir/depmod.d ?

Cheers,

Richard




  reply	other threads:[~2022-04-01 11:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 22:21 [PATCH v2 1/3] busybox: Exclude .debug from depmod Saul Wold
2022-03-31 22:21 ` [PATCH v2 2/3] kmod: Add an exclude directive to depmod Saul Wold
2022-03-31 22:21 ` [PATCH v2 3/3] depmodwrapper: Use nonarch_base_libdir for depmod.d Saul Wold
2022-04-01 11:11   ` Richard Purdie [this message]
2022-04-01 15:28     ` [OE-core] " Saul Wold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26d7155b1477eebde96ac003a62adeca55900c7d.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=Saul.Wold@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox