From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: mtr@pengutronix.de, Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH RFT] defaultenv: boot/devboot: add a devboot boot target
Date: Wed, 10 Jun 2026 14:49:12 +0200 [thread overview]
Message-ID: <20260610124916.2629105-1-a.fatoum@barebox.org> (raw)
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
next reply other threads:[~2026-06-10 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 12:49 Ahmad Fatoum [this message]
2026-06-15 8:04 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260610124916.2629105-1-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
--cc=mtr@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox