Re: Using U-boot in Yocto


Zoran
 

Hello Jonas,

Do not forget that you can also build and use U-Boot completely out of
a YOCTO tree.

I do things like that, not using the YOCTO U-Boot build.

(As a matter of fact, I do not use the kernel as well, only rootfs for
the testing purposes)

But it depends what and how your business/project management model
looks like, I should say.

Zoran
_______

On Sun, Dec 20, 2020 at 3:10 PM Jonas Vautherin
<jonas.vautherin@...> wrote:

Oh, for some reason I had not found the docs. Thanks a lot, that looks really good!

On Sun, Dec 20, 2020 at 2:13 PM Paul Barker <pbarker@...> wrote:

On Sun, 20 Dec 2020 at 09:02, Jonas Vautherin <jonas.vautherin@...> wrote:

Hello!

I am new to Yocto, and hope that this is the right way to ask for help :-).

I would like to have a way to flash my RPi over USB using `fastboot`, and it seems to me that one way to do that is to enable a "fastboot mode" in U-boot. Therefore, I am trying to use U-boot in my Yocto image.

There seems to be a recipe for it, hence I just added the package to my `-image.bb` file:

```
IMAGE_INSTALL += "u-boot"
```

However, I am not really used to bootloaders, and I am not sure it is booting with it. How can I check if my system is booting with U-boot? It does not seem like it's appearing in `dmesg` (which I presume is only starting with the kernel). Do I need to observe that with a serial connection to my RPi, or is there a log saved somewhere on the system?

Note that my image uses `meta-raspberrypi` for MACHINE "raspberrypi4-64" (Raspberry Pi 4 Model B).
The IMAGE_INSTALL variable is used for packages to install into the
rootfs. Typically bootloaders need some special handling and simply
adding them to IMAGE_INSTALL either doesn't work or isn't sufficient
to enable booting via the chosen bootloader.

For Raspberry Pi we made this simple by adding the RPI_USE_U_BOOT
variable which you can set in your distro config or in local.conf. See
https://meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#boot-to-u-boot
for more details.

The layer documentation for meta-raspberrypi is actually pretty good,
you can find it at
https://meta-raspberrypi.readthedocs.io/en/latest/index.html.

Thanks,

--
Paul Barker
Konsulko Group


Join {yocto@lists.yoctoproject.org to automatically receive all group messages.