From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Adam Duskett <aduskett@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 1/1] package/mender-grubenv: fix grub module checks
Date: Wed, 3 Nov 2021 23:00:21 +0100 [thread overview]
Message-ID: <20211103230021.597fc1ff@windsurf> (raw)
In-Reply-To: <20211103214718.1149331-1-aduskett@gmail.com>
Hello Adam,
On Wed, 3 Nov 2021 14:47:18 -0700
Adam Duskett <aduskett@gmail.com> wrote:
> diff --git a/package/mender-grubenv/mender-grubenv.mk b/package/mender-grubenv/mender-grubenv.mk
> index 07df25512c..ce63323f2a 100644
> --- a/package/mender-grubenv/mender-grubenv.mk
> +++ b/package/mender-grubenv/mender-grubenv.mk
> @@ -31,9 +31,15 @@ MENDER_GRUBENV_DEFINES = \
> # These grub modules must be built in for the grub scripts to work properly.
> # Without them, the system will not boot.
> MENDER_GRUBENV_MANDATORY_MODULES=loadenv hashsum echo halt gcry_sha256 test regexp
> +ifneq ($(BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI),)
> MENDER_GRUBENV_MODULES_MISSING = \
> - $(filter-out $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES)),\
> + $(filter-out $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI)),\
> $(MENDER_GRUBENV_MANDATORY_MODULES))
> +else
> +MENDER_GRUBENV_MODULES_MISSING = \
> + $(filter-out $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES_PC)),\
> + $(MENDER_GRUBENV_MANDATORY_MODULES))
> +endif
Now that I further think of this, I think this is still not correct.
Indeed, one of the major change recently brought to the grub2 package
is the ability in a single configuration to have grub support for x86
PC (legacy BIOS) x86 EFI. So in fact you can have
BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI and
BR2_TARGET_GRUB2_BUILTIN_MODULES_PC non-empty at the same time.
So if you want to do the right thing, you would have to check that
BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI doesn't miss any of the mandatory
modules if one of the EFI grub2 variant is selected *and* check that
BR2_TARGET_GRUB2_BUILTIN_MODULES_PC doesn't miss any of the mandatory
modules if one of the legacy BIOS grub2 variant is selected.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2021-11-03 22:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 21:47 [Buildroot] [PATCH v2 1/1] package/mender-grubenv: fix grub module checks Adam Duskett
2021-11-03 22:00 ` Thomas Petazzoni [this message]
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=20211103230021.597fc1ff@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=aduskett@gmail.com \
--cc=buildroot@buildroot.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.