mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH RFT] defaultenv: boot/devboot: add a devboot boot target
@ 2026-06-10 12:49 Ahmad Fatoum
  2026-06-15  8:04 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-06-10 12:49 UTC (permalink / raw)
  To: barebox; +Cc: mtr, Ahmad Fatoum

Executing devboot without arguments instructs it to use
"$global.boot.default" and thus leaves no way to use devboot as default
boot target easily.

Address this by adding a new devboot boot target that internally uses
${global.boot.devboot_default} instead of the default
${global.boot.default}.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 Documentation/user/devboot.rst            | 11 +++++++++++
 defaultenv/defaultenv-2-base/boot/devboot | 10 ++++++++++
 2 files changed, 21 insertions(+)
 create mode 100755 defaultenv/defaultenv-2-base/boot/devboot

diff --git a/Documentation/user/devboot.rst b/Documentation/user/devboot.rst
index 550ab9120576..f8b2c8ec684e 100644
--- a/Documentation/user/devboot.rst
+++ b/Documentation/user/devboot.rst
@@ -200,6 +200,17 @@ script is loaded. Make them persistent with:
 ``global.hostname`` is typically derived from the device tree, but can be
 overridden.
 
+devboot boot target
+^^^^^^^^^^^^^^^^^^^
+
+Using the ``devboot`` boot target, the ``devboot`` script can be set
+as default boot target.  Example usage:
+
+.. code-block:: sh
+
+   nv boot.devboot_default=system0
+   nv boot.default=devboot
+
 Forwarding a remote build directory over the internet
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/defaultenv/defaultenv-2-base/boot/devboot b/defaultenv/defaultenv-2-base/boot/devboot
new file mode 100755
index 000000000000..ec75cf2f274c
--- /dev/null
+++ b/defaultenv/defaultenv-2-base/boot/devboot
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ "${global.boot.devboot_default}" = "" ] ||
+   [ "${global.boot.devboot_default}" = "devboot" ] ||
+   [ "${global.boot.devboot_default}" = "/env/boot/devboot" ]; then
+    echo "Set global.boot.devboot_default to your eventual boot target!"
+    exit 1
+fi
+
+devboot "${global.boot.devboot_default}"
-- 
2.47.3




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

end of thread, other threads:[~2026-06-15  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-10 12:49 [PATCH RFT] defaultenv: boot/devboot: add a devboot boot target Ahmad Fatoum
2026-06-15  8:04 ` Sascha Hauer

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