All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: Joel Stanley <joel@jms.id.au>
Cc: "Frédéric Martinsons" <frederic.martinsons@gmail.com>,
	openembedded-core@lists.openembedded.org,
	"Andrew Geissler" <geissonator@gmail.com>,
	mdmii@outlook.com
Subject: Re: [OE-core] [PATCH] kernel: Don't fail if Modules.symvers doesn't exist
Date: Wed, 2 Aug 2023 16:25:21 +0300	[thread overview]
Message-ID: <ZMpZQU+duutoPL16@nuoska> (raw)
In-Reply-To: <CACPK8Xd1DqL9WoV=kwxDO3bzcBEB_KhH-1oKhKE2xoqZzX9a-A@mail.gmail.com>

Hi,

On Wed, Aug 02, 2023 at 01:15:34PM +0000, Joel Stanley wrote:
> On Wed, 2 Aug 2023 at 12:45, Fr�d�ric Martinsons
> <frederic.martinsons@gmail.com> wrote:
> >
> >
> >
> > On Wed, 2 Aug 2023 at 13:47, Joel Stanley <joel@jms.id.au> wrote:
> >>
> >> The one liner tests using `[ ] && action` need to have || true after the action,
> >> otherwise the line returns false and the recipie fails.
> >>
> >> Signed-off-by: Joel Stanley <joel@jms.id.au>
> >> ---
> >>  meta/classes-recipe/kernel.bbclass | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
> >> index 247ef4a48aa7..f1bc41e82be8 100644
> >> --- a/meta/classes-recipe/kernel.bbclass
> >> +++ b/meta/classes-recipe/kernel.bbclass
> >> @@ -486,7 +486,7 @@ kernel_do_install() {
> >>         install -m 0644 System.map ${D}/${KERNEL_IMAGEDEST}/System.map-${KERNEL_VERSION}
> >>         install -m 0644 .config ${D}/${KERNEL_IMAGEDEST}/config-${KERNEL_VERSION}
> >>         install -m 0644 vmlinux ${D}/${KERNEL_IMAGEDEST}/vmlinux-${KERNEL_VERSION}
> >> -       [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION}
> >> +       [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION} || true
> >>  }
> >>
> >
> > By doing that, you simply silent possible error of the action after the test, below is a little snippet showing that
> 
> Sure. But the test is looking for the file, so if it doesn't exist
> then the command install won't run.
> 
> I can't think of any realistic situation where install would fail if
> the file is present.
> 
> > I think the origin of your issue is that the action failed , having the log of kernel_do_install task would help.
> 
> That isn't the case.
> 
> The issue is the Modules.symvers file is not found. This is expected,
> because the kernel does not use modules.

This crucial bit of information is not in the commit message, please add it.

Then, I think there are better ways to detect if kernel modules are disabled
completely. See for example kernel.bbclass line 430:

if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then

Cheers,

-Mikko


  reply	other threads:[~2023-08-02 13:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 11:47 [PATCH] kernel: Don't fail if Modules.symvers doesn't exist Joel Stanley
2023-08-02 12:45 ` [OE-core] " Frédéric Martinsons
2023-08-02 13:15   ` Joel Stanley
2023-08-02 13:25     ` Mikko Rapeli [this message]
2023-08-02 13:38     ` Bruce Ashfield
2023-08-02 16:08       ` Andrew Geissler
2023-08-02 17:08         ` [OE-core] " Jose Quaresma

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=ZMpZQU+duutoPL16@nuoska \
    --to=mikko.rapeli@linaro.org \
    --cc=frederic.martinsons@gmail.com \
    --cc=geissonator@gmail.com \
    --cc=joel@jms.id.au \
    --cc=mdmii@outlook.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 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.