mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] Implement recovery boot detection for SPI flash
@ 2026-05-20  8:32 Fabian Pfitzner
  2026-05-20  8:32 ` [PATCH 1/2] bootsource: add bootsource instance index variable Fabian Pfitzner
  2026-05-20  8:33 ` [PATCH 2/2] arch: arm: imx: detect secondary boot Fabian Pfitzner
  0 siblings, 2 replies; 5+ messages in thread
From: Fabian Pfitzner @ 2026-05-20  8:32 UTC (permalink / raw)
  To: Sascha Hauer, BAREBOX; +Cc: Fabian Pfitzner

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 <f.pfitzner@pengutronix.de>
---
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 <f.pfitzner@pengutronix.de>




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-21 12:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-20  8:32 [PATCH 0/2] Implement recovery boot detection for SPI flash Fabian Pfitzner
2026-05-20  8:32 ` [PATCH 1/2] bootsource: add bootsource instance index variable Fabian Pfitzner
2026-05-21 12:02   ` Sascha Hauer
2026-05-20  8:33 ` [PATCH 2/2] arch: arm: imx: detect secondary boot Fabian Pfitzner
2026-05-21 12:27   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox