Problems integrating on x86_64 with GRUB Bootloader using Buildroot

Hello everybody,

we are currently trying to integrate and evaluate mender on our buildroot based board. In the board integration section, we mainly saw u-boot integrations that won’t work for our case.

Mender version: 3.4.0
Buildroot version: 2023.02
Board: x86_64
Bootloader: GRUB2

All mentioned requirements from the documentation are met and mender-grubenv package is activated.
It seems like the script “fw_setenv” is missing which is mentioned in the description of the mender Config.in file.

When trying to install an update, we receive errors like

**ERRO[0008] fw_setenv returned failure:  exit status 1**
**ERRO[0008] Failed to probe the U-Boot environment for which separator to use. Got error: exit status 1**

Is there a flag or a variable that eneds to be set in order to use GRUB with the buildroot mender package?

Hello @Simnacher,

Not a buildroot expert but in Yocto we have configurations like these:

MENDER_FEATURES_ENABLE:append = " mender-grub mender-image-uefi"
MENDER_FEATURES_DISABLE:append = " mender-uboot mender-image-sd" 

I found the following configs in a community repo: BR2_PACKAGE_MENDER_GRUBENV and BR2_TARGET_GRUB2 for x86-64 that I can assume enables GRUB but unsure if by definition disables u-boot. Have you tried them already?

Hope it helps,
Luis

Thanks for your reply.

BR2_PACKAGE_MENDER_GRUBENV and BR2_TARGET_GRUB2 are both enabled in buildroot config which should actually result in a grub supported mender implementation. Unfortunately the implementation doesn’t seem to work as intended.

Maybe @pamolloy or @aduskett can give pointers here?

Greetz,
Josef

Quick update from our research:

Taking a look into the packages, we figured out that the mender-grubenv buildroot package only executes the “install-boot-env” target from the grub-mender-grubenv repo. We assume that it should also execute the “install-legacy-tools” target to install the fw_printenv and fw_setenv script.

Maybe we can find some time to test and update the package…

Best regards
Lukas