Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: buildroot@buildroot.org
Cc: "Köry Maincent" <kory.maincent@bootlin.com>,
	"Adam Duskett" <aduskett@gmail.com>
Subject: Re: [Buildroot] [PATCH 3/3] package/mender-grubenv: fix grub module checks
Date: Sat, 4 Dec 2021 10:17:50 +0100	[thread overview]
Message-ID: <20211204091750.GD50662@scaer> (raw)
In-Reply-To: <82bf2ffa3ad531e8e93cf4b2f65193438b8b7199.1638573387.git.yann.morin.1998@free.fr>

Me, All,

On 2021-12-04 00:17 +0100, Yann E. MORIN spake thusly:
> From: Adam Duskett <aduskett@gmail.com>
> Commit b68810e70cbd (boot/grub2: add support to build multiple Grub2
> configurations in the same build) broke mender-grubenv by splititng up
> BR2_TARGET_GRUB2_BUILTIN_MODULES into two separate symbols, one for
> legacy boot and one for EFI boot.
> 
> This change causes a systematic build failure now, as the legacy variable
> BR2_TARGET_GRUB2_BUILTIN_MODULES is now always empty (during build).
> 
> We fix that by supplicating the missing modules to check: one for EFI and
> one for legacy boot.
> 
> The EFI check is tricky: Indeed, there can be more than one EFI platform
> enabled simultaneously; indeed, on x86_64, we can have both the 32-bit
> and 64-bit EFI platforms enabled. So the check is inverted, and we check
> that no platform is not enabled (yeah, double negation). For consistency,
> we do the same for the legacy boot, even though in that case, there can
> only ever be only one enabled at once at most.
> 
> Furthermore, mender-grubenv does not support multiple installations of
> grub concurrently; it can only be installed for either legacy or EFI,
> not both at the same time: /etc/mender-grubenv.cfg, its configuration
> file, can only contain settings for one or the other, not both.
> 
> So we add a new check to Config.in to support only one grub installation
> type at a time.
> 
> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Köry Maincent <kory.maincent@bootlin.com>
[--SNIP--]
> diff --git a/package/mender-grubenv/Config.in b/package/mender-grubenv/Config.in
> index 38da5b84fe..33d63fbfa3 100644
> --- a/package/mender-grubenv/Config.in
> +++ b/package/mender-grubenv/Config.in
[--SNIP--]
> @@ -34,3 +36,6 @@ comment "mender-grubenv needs a grub2 bootloader"
>  	depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
>  	depends on BR2_PACKAGE_MENDER
>  	depends on !BR2_TARGET_GRUB2
> +
> +comment "mender-grubenv does not support both legacy and EFI grub2 bootloaders at the same time"
> +	depends on BR2_TARGET_GRUB2_HAS_LEGACY_BOOT && BR2_TARGET_GRUB2_HAS_EFI_BOOT

Missing dependency on BR2_PACKAGE_MENDER

> diff --git a/package/mender-grubenv/mender-grubenv.mk b/package/mender-grubenv/mender-grubenv.mk
> index d7bdcc99eb..dd0cf7e4f9 100644
> --- a/package/mender-grubenv/mender-grubenv.mk
> +++ b/package/mender-grubenv/mender-grubenv.mk
> @@ -13,7 +13,7 @@ MENDER_GRUBENV_LICENSE_FILES = LICENSE
>  MENDER_GRUBENV_DEPENDENCIES = grub2
>  MENDER_GRUBENV_INSTALL_IMAGES = YES
>  
> -ifeq ($(BR2_TARGET_GRUB2_I386_PC)$(BR2_TARGET_GRUB2_ARM_UBOOT),y)
> +ifeq ($(BR2_TARGET_GRUB_LEGACY)$(BR2_TARGET_GRUB2_ARM_UBOOT),y)

The ARM U-Boot part is superfluous, now.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2021-12-04  9:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 23:17 [Buildroot] [PATCH 0/3] package/mender-grubenv: fix breakage after grub2 rework (branch yem/mender-grubenv) Yann E. MORIN
2021-12-03 23:17 ` [Buildroot] [PATCH 1/3] boot/grub2/Config.in: add symbols to represent legacy and EFI boot Yann E. MORIN
2021-12-03 23:17 ` [Buildroot] [PATCH 2/3] package/mender-grubenv: fix modules list help and variable Yann E. MORIN
2021-12-03 23:17 ` [Buildroot] [PATCH 3/3] package/mender-grubenv: fix grub module checks Yann E. MORIN
2021-12-04  9:17   ` Yann E. MORIN [this message]
2021-12-04 22:36   ` Peter Korsgaard
2021-12-04 22:38     ` Peter Korsgaard
2021-12-04 22:55       ` Yann E. MORIN
2021-12-04 17:25 ` [Buildroot] [PATCH 0/3] package/mender-grubenv: fix breakage after grub2 rework (branch yem/mender-grubenv) Yann E. MORIN

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=20211204091750.GD50662@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=aduskett@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=kory.maincent@bootlin.com \
    /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