As of now, there is only the boot rom log on i.MX processors that give us information on whether we have booted from the primary or recovery image.
Extract this information into a Barebox variable in order to pass this information to user space. This is useful for tools such as RAUC, that rely on that information when updating the bootloader atomically. The variable is called `bootsource_instance_index`. The intention behind the name is, that for an instance we can have multiple boot images, where the primary is depicted as zero, and the recovery/secondary is depicted as a 1. There is no implementation on how to pass this information to user space. This could be implemented by a boot script that interprets the content of that variable into a human readable format. Successfully tested on the congatec-qmx8p. Signed-off-by: Fabian Pfitzner <[email protected]> --- Fabian Pfitzner (2): bootsource: add bootsource instance index variable arch: arm: imx: detect secondary boot Documentation/user/variables.rst | 1 + arch/arm/mach-imx/boot.c | 52 ++++++++++++++++++++++++++++++++++++++++ common/bootsource.c | 20 ++++++++++++++++ include/bootsource.h | 11 +++++++++ 4 files changed, 84 insertions(+) --- base-commit: 1806d0f4835a1217a298f82fa2fc88b2694380f2 change-id: 20260518-fpf-bootsource-instance-index-a7bb108392a3 Best regards, -- Fabian Pfitzner <[email protected]>
