mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Sascha Hauer" <s.hauer@pengutronix.de>
To: "Ahmad Fatoum" <a.fatoum@barebox.org>
Cc: barebox@lists.infradead.org, mtr@pengutronix.de,
	"Ahmad Fatoum" <a.fatoum@barebox.org>
Subject: Re: [PATCH RFT] defaultenv: boot/devboot: add a devboot boot target
Date: Mon, 15 Jun 2026 08:04:37 +0000	[thread overview]
Message-ID: <E1wZ2JB-00000006GFE-2BDA@pty.whiteo.stw.pengutronix.de> (raw)
In-Reply-To: <20260610124916.2629105-1-a.fatoum@barebox.org>

On 2026-06-10 14:49, Ahmad Fatoum wrote:
> 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}.

Have you considered using bootentry_register_provider() instead of doing
this entirely in shell? That way we might be able to configure the
devboot boot target as "devboot.system0"

Sascha

> 
> 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
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2026-06-15  8:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 12:49 Ahmad Fatoum
2026-06-15  8:04 ` Sascha Hauer [this message]

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=E1wZ2JB-00000006GFE-2BDA@pty.whiteo.stw.pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=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