Commit b68810e70c (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>
[yann.morin.1998@free.fr:
- drop superfluous check on empty modules lists
- move EFI and legacy commands under same condition as checks
- variables were renamed
- misc eye-candy
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Köry Maincent <kory.maincent@bootlin.com>