[PATCH] bootchooser: warn if NV is used instead of barebox-state
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Aug 5 07:06:32 PDT 2024
I can't think of a reason why the environment would be preferable
to barebox-state, except for evaluation perhaps.
Thus warn the user if they configure bootchooser without state.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
common/bootchooser.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/common/bootchooser.c b/common/bootchooser.c
index 022e225165b4..65291c5e59d3 100644
--- a/common/bootchooser.c
+++ b/common/bootchooser.c
@@ -388,6 +388,13 @@ struct bootchooser *bootchooser_get(void)
}
} else {
bc->state_prefix = xstrdup("nv.bootchooser");
+
+ /* NV is available as a fallback, but shouldn't be used in
+ * production, because it's not power-fail safe.
+ *
+ * Thus warn the user about their configuration.
+ */
+ pr_warn("using non-redundant NV instead of barebox-state\n");
}
INIT_LIST_HEAD(&bc->targets);
--
2.39.2
More information about the barebox
mailing list