Barebox support


I plan to start working on adding mender support for barebox bootloader. On google-group forum I found some topics that someone is using it already. Anyone here who have already something (to avoid duplicate efforts). Thanks. Marek


I would also like to know if it is possible for Mender to work with Barebox bootloader ?

Hi @gwebspace, we don’t currently have support for barebox. There is nothing technical that precludes adding support for it but it’s not something we have today. The docs on the UBoot integration points would be a good starting point if you are interested in implementing this yourself. We would happily take a PR.


We’ve setup Mender with Barebox. Never got the OK to release the code unfortunately.

The yocto mender-part-images bbclass requires uboot on ARM, as some kind of work-around for grub needing u-boot still. It puts in an unnecessary DEPENDS of u-boot:do_deploy on arm and aarch64. You’ll need to add something like:
_MENDER_PART_IMAGE_DEPENDS_remove_arm += "u-boot:do_deploy"
in the machine config to fix that.

If using the Barebox bootchooser framework, mostly one just needs to write code to use bareboxenv to read/write the barebox env variables instead of the uboot command. Barebox can overlay multiple env files into the final env (really, in barebox, it’s more like a filesystem) that will be used. This way the env file that mender modifies can contain just the variables for boot partition selection and retry count. It doesn’t need to contain the scripts that do the booting or the kernel load address, etc.

I was wondering why this is the case, since it shouldn’t require U-Boot on ARM if neither U-Boot nor GRUB integration is enabled. So I attempted to fix it.