mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* chainload barebox from uboot
@ 2022-02-05 14:16 Frank Wunderlich
  2022-02-05 23:20 ` Ahmad Fatoum
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Wunderlich @ 2022-02-05 14:16 UTC (permalink / raw)
  To: barebox

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: chainload barebox from uboot
  2022-02-05 14:16 chainload barebox from uboot Frank Wunderlich
@ 2022-02-05 23:20 ` Ahmad Fatoum
  2022-02-06  9:46   ` Aw: " Frank Wunderlich
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2022-02-05 23:20 UTC (permalink / raw)
  To: Frank Wunderlich, barebox

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

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Aw: Re: chainload barebox from uboot
  2022-02-05 23:20 ` Ahmad Fatoum
@ 2022-02-06  9:46   ` Frank Wunderlich
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Wunderlich @ 2022-02-06  9:46 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

Hi,

thanks for your answer.

BOARD_ARM_GENERIC_DT [=y] and BOARD_ARM_GENERIC_DT_AARCH64 [=y] were already set,

so i just copied the

arch/arm/dts/rk3568-bpi-r2-pro.dtb
and the
images/barebox-dt-2nd.img
to my sdcard and could it boot this way (using booti instead of bootm) :)

=> fatload mmc 1:2 ${kernel_addr_r} barebox-dt-2nd.img
reading barebox-dt-2nd.img
403792 bytes read in 38 ms (10.1 MiB/s)
=> fatload mmc 1:2 ${fdt_addr_r} rk3568-bpi-r2-pro.dtb
reading rk3568-bpi-r2-pro.dtb
35602 bytes read in 8 ms (4.2 MiB/s)
=> booti ${kernel_addr_r} - ${fdt_addr_r}

so problem solved ;)

regards Frank


> Gesendet: Sonntag, 06. Februar 2022 um 00:20 Uhr
> Von: "Ahmad Fatoum" <a.fatoum@pengutronix.de>

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


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-06  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05 14:16 chainload barebox from uboot Frank Wunderlich
2022-02-05 23:20 ` Ahmad Fatoum
2022-02-06  9:46   ` Aw: " Frank Wunderlich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox