Re: chainload barebox from uboot
Hi, On 05.02.22 15:16, Frank Wunderlich wrote: > Hi, > > documentation says that barebox can be loaded from uboot: > > https://www.barebox.org/doc/latest/user/barebox.html#starting-barebox > > i tried the ./barebox.bin and the barebox-rk3568-*.img, both are not working > in uboot. > > => fatload mmc 1:2 ${scriptaddr} barebox-rk3568-bpi-r2pro.img > reading barebox-rk3568-bpi-r2pro.img > 768000 bytes read in 68 ms (10.8 MiB/s) > => bootm ${scriptaddr} > Fdt Ramdisk skip relocation > Wrong Image Format for bootm command > ERROR: can't get kernel image! > > => fatload mmc 1:2 ${scriptaddr} barebox.bin > reading barebox.bin > 860784 bytes read in 76 ms (10.8 MiB/s) > => bootm ${scriptaddr} > Fdt Ramdisk skip relocation > Wrong Image Format for bootm command > ERROR: can't get kernel image! > > documation talkes about a "arch/$ARCH/pbl/zbarebox.bin" but i have no such > file. Symbol PBL_IMAGE is already set to y > > for testing i used my vendors uboot > > => version > U-Boot 2017.09 (Nov 21 2021 - 14:25:03 +0100) > > isn't it possible to chainload barebox from uboot or do i miss any > config-option to get the right image? You'll want to use the generic DT 2nd image, which in your case would have a Linux ARM64 header and be bootable just like a Linux kernel. See the documentation patches I cc'd you on. Cheers, Ahmad > > regards Frank > > > ___ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 1/2] Documentation: remove some references to zbarebox.bin
At least ARM doesn't generate zbarebox.bin anymore. Remove some of the left-over references. Reported-by: Frank Wunderlich Signed-off-by: Ahmad Fatoum --- 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
[PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support
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 --- 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
blspec - autoboot + timeout/default
Hi, can i boot directly to blspec-menu (boot -m sd.1) with setting in default env and boot a specific entry (by title/filename) after some time (e.g.3-5 sec)? i have defined some blspec files in /mnt/sd.1/loader/entries/ and i want to show the menu by default and after some time the entry from specific file should be booted. this gives user the possibility to modify this conf to define his kernel for autoboot in headless mode. i tried to modify defaultenv/nv/boot.default, but this needs filenames in /env/boot, no commands and if i use a script, it cannot start the "boot -m sd.1" because the /env/boot scripts run bootm (tried loading barebox with such script - ended with putting a separate script in /env/bin/) btw. is there a way to load environment from a txt file from a specific partition (similar to uboots uEnv.txt)? regards Frank ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
chainload barebox from uboot
Hi, documentation says that barebox can be loaded from uboot: https://www.barebox.org/doc/latest/user/barebox.html#starting-barebox i tried the ./barebox.bin and the barebox-rk3568-*.img, both are not working in uboot. => fatload mmc 1:2 ${scriptaddr} barebox-rk3568-bpi-r2pro.img reading barebox-rk3568-bpi-r2pro.img 768000 bytes read in 68 ms (10.8 MiB/s) => bootm ${scriptaddr} Fdt Ramdisk skip relocation Wrong Image Format for bootm command ERROR: can't get kernel image! => fatload mmc 1:2 ${scriptaddr} barebox.bin reading barebox.bin 860784 bytes read in 76 ms (10.8 MiB/s) => bootm ${scriptaddr} Fdt Ramdisk skip relocation Wrong Image Format for bootm command ERROR: can't get kernel image! documation talkes about a "arch/$ARCH/pbl/zbarebox.bin" but i have no such file. Symbol PBL_IMAGE is already set to y for testing i used my vendors uboot => version U-Boot 2017.09 (Nov 21 2021 - 14:25:03 +0100) isn't it possible to chainload barebox from uboot or do i miss any config-option to get the right image? regards Frank ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: RFC: Gitlab CI for barebox
On Mon, 31 Jan 2022 11:39:45 +0100 Ahmad Fatoum wrote: Hello Ahmad! > On 30.01.22 13:00, Antony Pavlov wrote: > > Hi! > > > > I have made simple Gitlab CI for barebox. > > Nice. > > > Gitlab CI runner setup instruction and > > the source for Debian 11 docker image can be found at: > > > > https://gitlab.com/frantony/barebox-gitlab-ci-runner > > I had tried something similar, but with Github actions > > https://github.com/a3f/barebox/actions/runs/740206381 > > I didn't have the time to pursue this further. I am fine > with Gitlab as well. > > > > > Sample gitlab-ci.yaml config file: > > > > > > https://gitlab.com/frantony/barebox/-/commit/b1ed597d8e67c8f76f4f98cd1c6605b936cf2471 > > Here's how it looks for Github actions with emulate.pl: > > https://github.com/a3f/barebox/blob/emulate.pl/.github/workflows/build-configs.yaml I have just update gitlab runner, please see https://gitlab.com/frantony/barebox-gitlab-ci-runner/-/commit/f90c3932f1e90f900c4d4304c6a54898a5ee0e1e As a result runner can build barebox for openrisc architecture and run emulate.pl, see https://gitlab.com/frantony/barebox/-/pipelines/464224894 There is a problem with emulate.pl for MIPS (see https://gitlab.com/frantony/barebox/-/jobs/2058215656). log/mips/console_main artifact contains the fragment: begin Hit any to stop autoboot:3 barebox@qemu malta:/ echo "YGIS""XTJCSB" YGISXTJCSB barebox@qemu malta:/ echo -o /cmd 'cat /env/data/config'; echo "EOVL""SAWCFS"; sh /cmd; echo "EOVL""SAWCFS" $?; EOVLSAWCFS could not open /env/data/config: No such file or directory EOVLSAWCFS 1 barebox@qemu malta:/ echo -o /cmd selftest; echo "BOCZ""OJHGFV"; sh /cmd; echo "BOCZ""OJHGFV" $?; BOCZOJHGFV printf: all 116 tests passed progress_notifier: all 12 tests passed BOCZOJHGFV 0 barebox@qemu malta:/ end there is a problem: "could not open /env/data/config: No such file or directory" How we can pass error to gitlab runner? Now runner reports that there is no error. > > > > @Ahmad > > > > I suppose we can add your qemu barebox/test/emulate.pl tests into CI. > > Here is the Github action config for the tests: > https://github.com/a3f/barebox/blob/emulate.pl/.github/workflows/vm-tests.yaml > > Any thoughts on how/if to integrate with the mailing list? I suppose gitlab itself can send e-mails on CI pipeline fail. -- Best regards, Antony Pavlov ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox