mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <ahmad@a3f.at>
Cc: barebox@lists.infradead.org, Frank Wunderlich <frank-w@public-files.de>
Subject: Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support
Date: Mon, 7 Feb 2022 09:00:32 +0100	[thread overview]
Message-ID: <20220207080032.GO23490@pengutronix.de> (raw)
In-Reply-To: <20220205231930.2948516-2-ahmad@a3f.at>

On Sun, Feb 06, 2022 at 12:19:30AM +0100, Ahmad Fatoum wrote:
> Most users interested in chainloading barebox will probably want to use
> the generic DT format for that: It will pass the checks the boot command
> may have and it will ensure the system is in the correct state, e.g.
> that caches are disabled.
> 
> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
> ---
>  Documentation/user/barebox.rst | 18 +++++++++++++++---
>  1 file changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/user/barebox.rst b/Documentation/user/barebox.rst
> index 8634d8e48eef..4abcf79c6d2a 100644
> --- a/Documentation/user/barebox.rst
> +++ b/Documentation/user/barebox.rst
> @@ -203,9 +203,21 @@ Starting barebox
>  Bringing barebox to a board for the first time is highly board specific, see your
>  board documentation for initial bringup.
>  
> -barebox binaries are, where possible, designed to be startable second stage from another
> -bootloader. For example, if you have U-Boot running on your board, you can start barebox
> -with U-Boot's ``bootm`` command:
> +For ARM and RISC-V, the barebox build can additionally generate a generic DT image
> +(enable ``CONFIG_BOARD_ARM_GENERIC_DT`` or ``CONFIG_BOARD_RISCV_GENERIC_DT``,
> +respectively). The resulting ``images/barebox-dt-2nd.img`` can be booted just
> +like a Linux kernel that is passed an external device tree. For example:
> +
> +.. code-block:: console
> +
> +  U-Boot: tftp $kernel_addr barebox-dt-2nd.img
> +  U-Boot: tftp $fdt_addr my-board.dtb
> +  U-Boot: booti $kernel_addr - $fdt_addr
> +
> +For non-DT enabled-bootloaders or other architectures, often the normal barebox
> +binaries can also be used as they are designed to be startable second stage
> +from another bootloader, where possible. For example, if you have U-Boot running
> +on your board, you can start barebox with U-Boot's ``bootm`` command:

Hm, that seems wrong. U-Boot's bootm command starts images generated
with U-Boot's mkimage tool. A raw barebox image cannot be started with
this command, one has to create a uImage from it before.

Sascha


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

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2022-02-07  8:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05 23:19 [PATCH 1/2] Documentation: remove some references to zbarebox.bin Ahmad Fatoum
2022-02-05 23:19 ` [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support Ahmad Fatoum
2022-02-07  8:00   ` Sascha Hauer [this message]
2022-02-07  8:14     ` Ahmad Fatoum
2022-02-07  8:34       ` Sascha Hauer
2022-02-07  8:36         ` Ahmad Fatoum
2022-02-07  9:36         ` Frank Wunderlich

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=20220207080032.GO23490@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=ahmad@a3f.at \
    --cc=barebox@lists.infradead.org \
    --cc=frank-w@public-files.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