Running on x86

Hello,

We are running Mender on Yocto Dunfell, months ago we had integrated an old x86 (32bit) device with this following local.conf configuration:

INHERIT += "mender-full"
MENDER_STORAGE_TOTAL_SIZE_MB = "6144"
MENDER_BOOT_PART_SIZE_MB = "256"
MENDER_DATA_PART_SIZE_MB = "2048"
MENDER_STORAGE_DEVICE = "/dev/sda"
MENDER_FEATURES_ENABLE_append = "mender-image-bios mender-grub mender-bios"
MENDER_FEATURES_DISABLE_append = "mender-image-uefi"

and it works smoothly, but by building a new image today, we get this error:

INFO: Creating image(s)...
ERROR: unrecognized bootimg-efi loader:
WARNING: exit cod 1 from a shell command.

also with:

INHERIT += "mender-full-bios"

without MENDER_FEATURES_ENABLE_append and MENDER_FEATURES_DISABLE_append.

produce the same issue.

Please share how to set the correct features to boot on a 32bit Intel class system.

Thank you.

Best,
Mauro

Hi @malveo.

The error is new to me, and not yet clear what the root cause is.

Which revision of the dunfell branch are you using for meta-mender? What would be interesting to know if it is this PR that introduced an regression?

Can you test reverting meta-mender to 71286ec47fe856179f9aa1bf7f6445c1db4e640c which would be before mentioned PR was merged.

Also could you test with the changes in this PR? Primarily the first commit that is interesting and that could be related to your problem…

Hi @mirzak,

Thank you, tested reverting to 71286ec47fe856179f9aa1bf7f6445c1db4e640c, build successfully and boot.

Tested with master + PR 1175 same issue:

INFO: Creating image(s)...
ERROR: unrecognized bootimg-efi loader:
WARNING: exit code 1 from a shell command.

Best,
Mauro

Hi @malveo where are you seeing this issue? Is this a build failure? Can you provide a more thorough build log?

Hi @drewmoseley -

Yes, it is a build failure, here the full log:

Thank you,
Mauro

Can you provide the contents of /home/5267d0dea6/yocto/layers/custom/meta-customer/meta-customer-distro/recipes-extended/images/customer-image.bb:do_image_wic

And also the output of bitbake -e customer-image?

Thank you @drewmoseley

Sorry for replaying you back after all these months. I’ve restarted working on x86 devices with Mender in the last few days.

This issue appear with this commit:

and was enforced with this one:

that introduces default values for EFI_PROVIDER if some features of Mender are enabled or disables.

If ‘mender-grub’ is enabled, EFI_PROVIDER is set to ‘grub-efi’, but if mender-grub + mender-bios are set, EFI_PROVIDER is ‘null’.

Building an image using ‘mender-full-bios’ class, enable both feature “mender-grub + mender-bios” in meta-mender-core/classes/mender-setup-grub.inc

MENDER_FEATURES_ENABLE_append_x86 = " mender-image-bios mender-grub mender-bios"

the combo mender-grub + mender-bios, set EFI_PROVIDER to null, this consequently trigger an issue when wic is invoked because during the build process on do_image_wic is used the kickstart file genericx86.wks (from ./meta-yocto-bsp/wic/genericx86.wks.in), that inside, use a reference of EFI_PROVIDER as argument for the loader var.

part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --ondisk sda --label msdos --active --align 1024

And this triggers the error at build-time:

INFO: Creating image(s)...
ERROR: unrecognized bootimg-efi loader:
WARNING: exit code 1 from a shell command.

the delta betwheen bitbake -e on dunfell and on the commit:71286ec47fe856179f9aa1bf7f6445c1db4e640c, confirm the
analisys above, EFI_PROVIDER is ‘null’ .

dunfell · GitHub (dunfell)
71286ec47fe856179f9aa1bf7f6445c1db4e640c · GitHub (71286ec47fe856179f9aa1bf7f6445c1db4e640c)

Using mender-full-bios and removing mender-bios from MENDER_FEATURES_ENABLE fix the issue.

Please do some sanity check around mender-full-bios.class.

Best,
Mauro

@drewmoseley just un update and errata corrige.

mender-bios is needed for a bootable artifact. It installs the grub bootloader on the resulting image, and with this commit.

in conjunction with the default wks file from poky, the build always fail. The only workaround possible is to provide a custom wks file with hardcoded --sourceparams=“loader=grub-EFI”, because EFI_PROVIDER variable is null.

Best,
Mauro

Hi @malveo,

I’m not quite following what needs to change here. Can you provide a detailed setup of how to replicate the reported issue when building with mender-bios? Ideally if you can provide a pull request that fixes the issue that would be great since I don’t really work with the EFI code much at present.

Drew

I’m also not quite following. EFI and BIOS setups are mutually incompatible, both can’t be used at the same time. Using EFI_PROVIDER in a recipe is a mistake, since there isn’t one when mender-bios is enabled. Are you sure you don’t just need to add this:

IMAGE_FSTYPES_remove = "wic wic.bmap"
1 Like

Thank you @kacf and @drewmoseley for the hint.