All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux: run depmod only if modules directory exists
Date: Sat, 29 Aug 2020 16:58:45 +0200	[thread overview]
Message-ID: <20200829145845.GI14354@scaer> (raw)
In-Reply-To: <20200623113859.172177-1-paul@crapouillou.net>

Paul, All,

On 2020-06-23 13:38 +0200, Paul Cercueil spake thusly:
> If the modules directory that corresponds to the version of the kernel
> being built has been deleted, don't try to run depmod, which will
> obviously fail.
> 
> This can happen for instance when the modules are stripped from the main
> root filesystem, and placed into a separate filesystem image, so that
> the root filesystem and the kernel can be updated separately.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  linux/linux.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/linux/linux.mk b/linux/linux.mk
> index b90b032bb9..d31933fea1 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -490,7 +490,8 @@ endef
>  # Run depmod in a target-finalize hook, to encompass modules installed by
>  # packages.
>  define LINUX_RUN_DEPMOD
> -	if grep -q "CONFIG_MODULES=y" $(LINUX_DIR)/.config; then \
> +	if test -d $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED) \

Removing stuff from target and then expecting everything continues to
work as expected is a bit hackish, I believe. But another maintainer
was OK with that patch, so applied to master now, thanks.

Regards,
Yann E. MORIN.

> +		&& grep -q "CONFIG_MODULES=y" $(LINUX_DIR)/.config; then \
>  		$(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) $(LINUX_VERSION_PROBED); \
>  	fi
>  endef
> -- 
> 2.27.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  parent reply	other threads:[~2020-08-29 14:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 11:38 [Buildroot] [PATCH] linux: run depmod only if modules directory exists Paul Cercueil
2020-06-24 20:17 ` Yann E. MORIN
2020-06-24 21:20   ` Paul Cercueil
2020-08-29 14:58 ` Yann E. MORIN [this message]
2020-08-29 17:43   ` Peter Korsgaard

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=20200829145845.GI14354@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.