Re: [PATCH 2/2] doc: user: barebox: add chainloading of fit images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15.12.23 13:11, Stefan Kerkmann wrote:
> This documents an alternate method for chainloading Barebox from U-Boot
> by packing the Barebox image and matching device tree into an FIT image.

S-o-b missing.

With that fixed:

Acked-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>

> ---
>  Documentation/user/barebox.rst | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/Documentation/user/barebox.rst b/Documentation/user/barebox.rst
> index f4e600bde0..ea4db28d08 100644
> --- a/Documentation/user/barebox.rst
> +++ b/Documentation/user/barebox.rst
> @@ -215,6 +215,32 @@ like a Linux kernel that is passed an external device tree. For example:
>    U-Boot: bootz $kernel_addr - $fdt_addr # On 32-bit ARM
>    U-Boot: booti $kernel_addr - $fdt_addr # for other platforms
>  
> +Another option is to generate a FIT image containing the generic DT image and a
> +matching device tree with ``mkimage``:
> +
> +.. code-block:: console
> +  sh: mkimage --architecture arm \
> +      --os linux \
> +      --type kernel \
> +      --fit auto \
> +      --load-address $kernel_addr_r \
> +      --compression none \
> +      --image images/barebox-dt-2nd.img \
> +      --device-tree arch/${ARCH}/dts/my-board.dtb \
> +      barebox-dt-2nd.fit
> +
> +This FIT image can then be loaded by U-Boot and executed just like a regular
> +Linux kernel:
> +
> +.. code-block:: console
> +  U-Boot: tftp $fit_addr barebox-dt-2nd.fit
> +  U-Boot: bootm $fit_addr
> +
> +Make sure that the address in ``$fit_addr`` is different from the
> +``$kernel_addr_r`` passed to ``mkimage`` as the load address of the Kernel
> +image. Otherwise U-Boot may attempt to overwrite the FIT image with the barebox
> +image contained within.
> +
>  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
> 

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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux