Implement recovery boot detection for SPI flash
Get series with b4
b4 am 20260520-fpf-bootsource-instance-index-v1-0-29942f0e8f2f@pengutronix.de change-id 20260518-fpf-bootsource-instance-index-a7bb108392a3Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bootsource: add bootsource instance index variableDocumentation/ common/ include/ | +32 | 1 reply | |
| 2/2 | arch: arm: imx: detect secondary bootarch/ | +52 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Implement recovery boot detection for SPI flash
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.
---
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,
Signature · 1 line
Fabian Pfitzner <[email protected]>