* [PATCH 1/2] Documentation: remove some references to zbarebox.bin
@ 2022-02-05 23:19 Ahmad Fatoum
2022-02-05 23:19 ` [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support Ahmad Fatoum
0 siblings, 1 reply; 7+ messages in thread
From: Ahmad Fatoum @ 2022-02-05 23:19 UTC (permalink / raw)
To: barebox; +Cc: Frank Wunderlich, Ahmad Fatoum
At least ARM doesn't generate zbarebox.bin anymore. Remove some of the
left-over references.
Reported-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
Documentation/boards/mips/qemu-malta.rst | 2 +-
Documentation/user/barebox.rst | 7 ++++---
Documentation/user/pbl.rst | 3 +--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/boards/mips/qemu-malta.rst b/Documentation/boards/mips/qemu-malta.rst
index fd37d5edb229..44f671638d9d 100644
--- a/Documentation/boards/mips/qemu-malta.rst
+++ b/Documentation/boards/mips/qemu-malta.rst
@@ -35,7 +35,7 @@ Using GXemul
GXemul supports MIPS Malta except PCI stuff.
You can use GXemul to run little-endian barebox (use gxemul-malta_defconfig).
-N.B. There is no need to swap words in ``zbarebox.bin`` for little-endian GXemul!
+N.B. There is no need to swap words in the barebox binary for little-endian GXemul!
GXemul run string:
diff --git a/Documentation/user/barebox.rst b/Documentation/user/barebox.rst
index b6b7a57af300..8634d8e48eef 100644
--- a/Documentation/user/barebox.rst
+++ b/Documentation/user/barebox.rst
@@ -220,10 +220,11 @@ another barebox. For instance, if you mounted a TFTP server to ``/mnt/tftp``
bootm /mnt/tftp/barebox.bin
-At least ``barebox.bin`` (with :ref:`pbl` support enabled ``arch/$ARCH/pbl/zbarebox.bin``)
-should be startable second stage. The flash binary (``barebox-flash-image``) may or may not
+At least ``barebox.bin`` (with :ref:`pbl` support enabled ``images/*.pblb``)
+should be startable second stage. The final binaries (``images/*.img``) may or may not
be startable second stage as it may have SoC specific headers which prevent running second
-stage.
+stage. barebox will usually have handlers in-place to skip these headers, so
+it can chainload itself regardless.
First Steps
-----------
diff --git a/Documentation/user/pbl.rst b/Documentation/user/pbl.rst
index f9b2d2030559..b0acd1a4f24d 100644
--- a/Documentation/user/pbl.rst
+++ b/Documentation/user/pbl.rst
@@ -13,8 +13,7 @@ PBL is available for ARM and MIPS. It can be enabled in ``make menuconfig`` with
the ``[*] Pre-Bootloader image`` option.
The user visible difference is that with PBL support ``barebox.bin`` is no longer
-the final binary image, but instead ``arch/$ARCH/pbl/zbarebox.bin``. Use the
-``barebox-flash-image`` link which always points to the correct image.
+the final binary image, but instead the images are placed in ``images/``.
Technical background
--------------------
--
2.33.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support
2022-02-05 23:19 [PATCH 1/2] Documentation: remove some references to zbarebox.bin Ahmad Fatoum
@ 2022-02-05 23:19 ` Ahmad Fatoum
2022-02-07 8:00 ` Sascha Hauer
0 siblings, 1 reply; 7+ messages in thread
From: Ahmad Fatoum @ 2022-02-05 23:19 UTC (permalink / raw)
To: barebox; +Cc: Frank Wunderlich, Ahmad Fatoum
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:
.. code-block:: console
--
2.33.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support
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
2022-02-07 8:14 ` Ahmad Fatoum
0 siblings, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2022-02-07 8:00 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox, Frank Wunderlich
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support
2022-02-07 8:00 ` Sascha Hauer
@ 2022-02-07 8:14 ` Ahmad Fatoum
2022-02-07 8:34 ` Sascha Hauer
0 siblings, 1 reply; 7+ messages in thread
From: Ahmad Fatoum @ 2022-02-07 8:14 UTC (permalink / raw)
To: Sascha Hauer, Ahmad Fatoum; +Cc: barebox, Frank Wunderlich
Hello Sascha,
On 07.02.22 09:00, Sascha Hauer wrote:
> 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.
This is what the documentation is saying right now. It only appeared
in the diff, because I rephrased the start a bit. I don't have a
32-bit ARM U-Boot here to test, so I'd rather not rewrite that part
myself.
Cheers,
Ahmad
>
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support
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
0 siblings, 2 replies; 7+ messages in thread
From: Sascha Hauer @ 2022-02-07 8:34 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: Ahmad Fatoum, barebox, Frank Wunderlich
On Mon, Feb 07, 2022 at 09:14:51AM +0100, Ahmad Fatoum wrote:
> Hello Sascha,
>
> On 07.02.22 09:00, Sascha Hauer wrote:
> > 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.
>
> This is what the documentation is saying right now. It only appeared
> in the diff, because I rephrased the start a bit. I don't have a
> 32-bit ARM U-Boot here to test, so I'd rather not rewrite that part
> myself.
Well you've introduced the part to use the bootm command yourself :)
commit 3a14fb79153af84323fee8308989011cd05c7d96
Author: Ahmad Fatoum <a.fatoum@pengutronix.de>
Date: Mon Jun 17 16:18:46 2019 +0200
However, I obviously failed to review this properly. I'll create a patch
for that.
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support
2022-02-07 8:34 ` Sascha Hauer
@ 2022-02-07 8:36 ` Ahmad Fatoum
2022-02-07 9:36 ` Frank Wunderlich
1 sibling, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2022-02-07 8:36 UTC (permalink / raw)
To: Sascha Hauer; +Cc: Ahmad Fatoum, barebox, Frank Wunderlich
On 07.02.22 09:34, Sascha Hauer wrote:
> On Mon, Feb 07, 2022 at 09:14:51AM +0100, Ahmad Fatoum wrote:
>> Hello Sascha,
>>
>> On 07.02.22 09:00, Sascha Hauer wrote:
>>> 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.
>>
>> This is what the documentation is saying right now. It only appeared
>> in the diff, because I rephrased the start a bit. I don't have a
>> 32-bit ARM U-Boot here to test, so I'd rather not rewrite that part
>> myself.
>
> Well you've introduced the part to use the bootm command yourself :)
>
> commit 3a14fb79153af84323fee8308989011cd05c7d96
> Author: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Date: Mon Jun 17 16:18:46 2019 +0200
>
> However, I obviously failed to review this properly. I'll create a patch
> for that.
Aua :D
>
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support
2022-02-07 8:34 ` Sascha Hauer
2022-02-07 8:36 ` Ahmad Fatoum
@ 2022-02-07 9:36 ` Frank Wunderlich
1 sibling, 0 replies; 7+ messages in thread
From: Frank Wunderlich @ 2022-02-07 9:36 UTC (permalink / raw)
To: Sascha Hauer, Ahmad Fatoum; +Cc: Ahmad Fatoum, barebox
Am 7. Februar 2022 09:34:40 MEZ schrieb Sascha Hauer <sha@pengutronix.de>:
>On Mon, Feb 07, 2022 at 09:14:51AM +0100, Ahmad Fatoum wrote:
>> Hello Sascha,
>>
>> On 07.02.22 09:00, Sascha Hauer wrote:
>> > 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.
>> >>
>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
>> >> +
>> This is what the documentation is saying right now. It only appeared
>> in the diff, because I rephrased the start a bit. I don't have a
>> 32-bit ARM U-Boot here to test, so I'd rather not rewrite that part
>> myself.
>
>Well you've introduced the part to use the bootm command yourself :)
>
>commit 3a14fb79153af84323fee8308989011cd05c7d96
>Author: Ahmad Fatoum <a.fatoum@pengutronix.de>
>Date: Mon Jun 17 16:18:46 2019 +0200
>
>However, I obviously failed to review this properly. I'll create a
>patch
>for that.
>
>Sascha
In barebox "bootm flashable.img" works, in uboot it is booti with barebox-dt-2nd.img +fdt like example. I have a armhf bananapi r2 (mt7623),but it looks not supported by barebox
regards Frank
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-02-07 9:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox