XonqNopp
Posts: 5
Joined: Thu Jun 08, 2017 8:30 am

buildroot + U-boot trials

Thu Jun 08, 2017 11:44 am

Hi community,

[Note to moderators] Not sure if I post it at the right place, don't hesitate to move it if necessary [/Note]

What I want to do:

I am working on a project where we want to update our RPi on boot. We are working with buildroot successfully for almost one year. Now I am trying to get it work with U-boot.

What versions I am working with:
  • RPi 3
  • buildroot 2017.05 which contains U-boot 2017.03
What I already have read:

I have read over 100 web pages. My main inspirations are:
What I have done so far:

So I build on a Debian (32bits). I configure buildroot with raspberrypi3_defconfig, and in the bootloader menu I select U-boot and set the U-boot config to rpi_3_32b. The simple rpi config does not work (hangs in rainbow) and obviously I am unable to build with rpi_3 config as it implies 64bits, which my host is not able to provide. (If I really must switch to 64bits for host and RPi and U-boot, I think I would be able to do it, but I am fairly sure I should be able to achieve my project with 32bits too.)

In the linux menuconfig of buildroot, I also changed some kernel settings to have early printk, logging level to 7 and to enable low-level debug.

What I am able to do:

I can boot and stop in U-boot menu.

The problem now:

When I proceed the fatload+bootz commands, I only get the starting kernel message and it hangs there. I am connected through UART serial line and I also have the official RPi touchscreen on the DSI. I tried to change the console in the bootargs since there are different minds on the web, I tried ttyAMA0, ttyS0, tty0, tty1.

But if I only changed the kernel= line in the config.txt, my RPi hangs in rainbow screen. I had to disable the overlay setting to fix this.

Since I get no output at all, it is really difficult to guess what the problem is... Any advice would be welcome :)

johnjones
Posts: 16
Joined: Sat Jun 03, 2017 5:09 am

Re: buildroot + U-boot trials

Sat Jun 10, 2017 3:07 am

Very interesting, I'm trying to do something similar to speed up the boot time.

Have you tried adding debug options to uboot ( like outputting a char to the serial console to indicate progress ) ?
do you have access to a JTAG programmer ?

what sort of boot time are you experiencing ?

thanks

John

XonqNopp
Posts: 5
Joined: Thu Jun 08, 2017 8:30 am

Re: buildroot + U-boot trials

Mon Jun 12, 2017 6:11 am

Hi johnjones and thanks for the reply,
  1. I don't know about the U-boot debug you mention. Can you please explain a little bit more about it?
  2. I currently don't have JTAG programmer but maybe I can find help about this with my colleagues if you think it could help debug this
  3. No idea about the boot time, I would like to boot, this is why I ask for advice here ;)

XonqNopp
Posts: 5
Joined: Thu Jun 08, 2017 8:30 am

Re: buildroot + U-boot trials

Thu Jun 15, 2017 5:34 am

I also posted my question on the RaspberryPi stackexchange: https://raspberrypi.stackexchange.com/q ... oot-u-boot
Here are some more information regarding the comments I received:
  • If in `config.txt` I replace `kernel=u-boot.bin` by `kernel=zImage`, it boots properly. Also in `config.txt`, I had to disable the pi3 overlays otherwise U-boot does not work and I got stuck in the rainbow screen.
  • Building buildroot with `raspberrypi3_64_defconfig` and U-boot with `rpi_3` (instead of `rpi_3_32b`), the compilation fails

XonqNopp
Posts: 5
Joined: Thu Jun 08, 2017 8:30 am

Re: buildroot + U-boot trials

Thu Aug 03, 2017 7:12 am

Is there anybody succeeding in running U-boot on RPi 3 installed with buildroot?

User avatar
flatmax
Posts: 336
Joined: Thu May 26, 2016 10:36 pm

Re: buildroot + U-boot trials

Mon Nov 27, 2017 6:43 am

Any updates on successes here ?

Are you using 64bit Linux by any chance ?

Matt
Check the Ultra 2 sound card - use our shop instead of Amazon Europe (Amazon USA is live).
Sound card for the Raspberry Pi with inbuilt microphone : www.audioinjector.net
Audio Inector Octo multitrack GPIO sound card

XonqNopp
Posts: 5
Joined: Thu Jun 08, 2017 8:30 am

Re: buildroot + U-boot trials

Mon Nov 27, 2017 12:34 pm

Hello,

I can update a bit...

Here is my same question on SO: https://raspberrypi.stackexchange.com/q ... oot-u-boot
(I thought I posted the link already but seems not, sorry...)

What I did was plug the serial link from GPIO header to my computer. From there I was able to interact with the RPi. But still I could not boot.

From the answer I got on stackexchange:
Robert wrote:It turned out that the predefined address for the device tree ${fdt_addr_r} was causing the problem (looks like there was some overlap with the kernel). Loading the device tree to 0x2000000 worked for me
And it worked.

BUT since then I thought deeper about what I was doing and let U-boot aside as it complicates more than it helps. Hope you'll succeed ;)

Return to “Advanced users”