2019-06-06 17:52:15 +02:00
|
|
|
config BR2_PACKAGE_MENDER_GRUBENV
|
|
|
|
bool "mender-grubenv"
|
|
|
|
depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
|
|
|
|
depends on BR2_PACKAGE_MENDER # runtime
|
2019-09-03 00:34:41 +02:00
|
|
|
depends on BR2_TARGET_GRUB2
|
package/mender-grubenv: fix grub module checks
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>
[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>
2021-12-03 19:51:06 +01:00
|
|
|
depends on !(BR2_TARGET_GRUB2_HAS_LEGACY_BOOT && BR2_TARGET_GRUB2_HAS_EFI_BOOT)
|
2019-06-06 17:52:15 +02:00
|
|
|
help
|
|
|
|
Contains the boot scripts and tools used by Mender to
|
|
|
|
integrate with the GRUB bootloader.
|
|
|
|
|
|
|
|
The following Grub modules must be selected for this package:
|
2021-12-03 23:58:04 +01:00
|
|
|
loadenv hashsum echo halt gcry_sha256 test regexp
|
2019-06-06 17:52:15 +02:00
|
|
|
|
|
|
|
https://github.com/mendersoftware/grub-mender-grubenv
|
|
|
|
|
|
|
|
if BR2_PACKAGE_MENDER_GRUBENV
|
|
|
|
|
|
|
|
config BR2_PACKAGE_MENDER_GRUBENV_DEFINES
|
|
|
|
string "path to grubenv defines"
|
|
|
|
help
|
|
|
|
Specify a path to the mender grubenv defines file.
|
|
|
|
If no path is specified, the example file in the source
|
|
|
|
directory will be used.
|
|
|
|
|
|
|
|
The example file in the source directory sets the following:
|
|
|
|
mender_rootfsa_part=2
|
|
|
|
mender_rootfsb_part=3
|
|
|
|
mender_kernel_root_base=/dev/mmcblk0p
|
|
|
|
mender_grub_storage_device=hd0
|
|
|
|
kernel_imagetype=bzImage
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
comment "mender-grubenv needs a grub2 bootloader"
|
|
|
|
depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
|
|
|
|
depends on BR2_PACKAGE_MENDER
|
|
|
|
depends on !BR2_TARGET_GRUB2
|
package/mender-grubenv: fix grub module checks
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>
[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>
2021-12-03 19:51:06 +01:00
|
|
|
|
|
|
|
comment "mender-grubenv does not support both legacy and EFI grub2 bootloaders at the same time"
|
|
|
|
depends on BR2_PACKAGE_MENDER
|
|
|
|
depends on BR2_TARGET_GRUB2_HAS_LEGACY_BOOT && BR2_TARGET_GRUB2_HAS_EFI_BOOT
|