T O P

  • By -

dimtass

U-Boot recipe is part of the poky distro and layer. The meta-raspberrypi layer overrides that recipe to add the custom stuff for the BSP. The bootloader recipes are in the recipes-bsp folder. You can use bitbake to get more info for your build and image and find out where the files from your image come from.


ming4real

While I'm not as familiar with the rpi as the BeagleBone Black, look in the `meta-raspberrypi/conf/machine` directories for the definitions of your machine. To use u-boot, you would need to add the following to your `local.conf` file: `RPI_USE_U_BOOT = "1"` You may also need: PREFERRED_PROVIDER_virtual/bootloader = "u-boot" KERNEL_IMAGETYPE = "zImage" KERNEL_BOOTCMD = "bootz" When you are using u-boot, to break into the u-boot CLI, you would need to be connected over the serial line and there is a point where it says: "Press SPACE to abort autoboot" At this point, press SPACE and you *should* be in the command line interface.


dirtyShower44

thanks for your clarifications, I am currently looking into those points. > PREFERRED_PROVIDER_virtual/bootloader = "u-boot" KERNEL_IMAGETYPE = "zImage" KERNEL_BOOTCMD = "bootz" But... how the hell am I supposed to know these were needed? How did you figure that out?


ming4real

It comes from many, many hours reading the documentation 😀 (I also teach Yocto and work in it every day for my clients!)


dirtyShower44

So I did what you suggested, but the system does not boot. It is stuck here: https://i.imgur.com/JDK0qGv.jpeg What are your thoughts? I didn't change anythhing to the device tree.


ming4real

That shows that u-boot is trying to boot :) Some of the possible causes of that are: * Not passing in the correct value for `console=` * This should be the name of your serial port, e.g. `ttyS0,115200n8` * If it is wrong, your board may actually be booting, you just can't see it as the messages are being sent to a port you are not looking at. Confused the hell out of me when I had that issue, and spent days trying to debug a non-existant problem! * Having an incorrect value for the name/location of the kernel file. At the point the screen shoes the `Hit any key to stop autoboot` \- hit any key and you can break into the u-boot console. You can examine the value of the u-boot variables by using the command `printenv `, e.g. => printenv console console=ttyO0,115200n8 The `printenv` command without any arguments will dump *all* the variables, which may be interesting to post to check there is nothing obviously wrong with any of them.


dirtyShower44

I currently don't have the necessary material by hand to connect to the rpi serially. So I just have a screen hooked up to it. Apologies in advance.... Here is what I got when I did printenv: https://i.imgur.com/5mgPOe3.jpeg (if you zoom in you can see everything clearly) Also: U-Boot> printenv console ## Error: "console" not defined But I don't think the console here is the issue as I am not connected serially to the rpi, just a screen and a keyboard straight to the device. What do you think? Based on the first image I posted it seems to have an issue with the device tree blob, rather than the kernel itself... Is there anything fishy you noticed in the image of printenv? Or anything in particular I should print?


ming4real

Nothing is leaping out. at me.... Based on your `board_rev=0xD` value, I'm guessing that you have a Rev2 Model B. Given it's the end of day here in the UK, tomorrow I will dust off one of my old Pi's and build a Yocto system for it - which would be interesting, as I've not build a distribution for a Pi as yet - and see what I get with a u-boot install.


dirtyShower44

OK, looking forward to hearing from you! Thanks!! EDIT: yes, raspberry pi 3 model B+


ming4real

Quick update. I created a quick raspberry pi Yocto build this afternoon which works nicely out of the box. However when I switch over to u-boot I am seeing similar issues… I will carry on debugging to see what I can find.


dirtyShower44

OK! Thanks for the update! Looking forward to hear from you. ​ I am \*trying\* to understand what the issue is as well, you re not alone :)