[U-Boot] One u-boot.bin for Raspberry PI 3 and 4 - possible?

Matthias Brugger matthias.bgg at gmail.com
Sat Sep 28 16:31:16 UTC 2019



On 28/09/2019 13:32, Geoff Williams wrote:
> Hi Matthias,
> 
>> Yes it is. I was working on this the last weeks and just posted the patches
>> today. Would be nice if you could test and provide feedback :)
> 
> The patch works for me on Raspberry PI 4B 1GB and a Raspberry PI 3B v1.2
> (BCM2837RIFBG) when applied to dfd590075c and using the rpi_4_defconfig I am
> able to boot to Linux via grub2 on both boards with the same u-boot.bin.
> 

Nice! Happy to hear that I'm not the only one that sees this working :)

> I did run into a couple of little problems though:
> 
> 1. On the PI 4 with mainline u-boot the screen turns yellow and wraps around on
> itself a second or so into the linux boot (grub screen is fine). With the patch
> applied I get the same behaviour on the PI3. Everything still works
> the screen is
> just messed up.
> 

Ok, the problem on the RPi3 honestly surprising. I'll have to check myself
what's happening there. BTW when you talk about linux, do you use the downstream
kernel for that?

> If I instead use rpi_3_defconfig, I get a rainbow screen on the PI4 and the
> screen goes switches off instead of just turning yellow on the PI3.
> 

It's exepcted that RPi4 won't boot with rpi_3_defconfig. Background is, that
RPi3 defconfig uses still embedded device tree which does not boot on RPi4.
On the other hand RPi4 defconfig uses the devicetree provided by the FW, that's
why it also (somehow) works on RPi3. It's on my todo-list to create one single
config for both RPi3 and RPi4, that wasn't done until now.

I'm not sure if you mean that the screen getting switched off on the RPi3 with
rpi_3_defconfig is a regression or if this is the behaviour you expect.

> 2. USB wireless keyboard doesn't work until Linux loads on both systems if
> built with rpi_4_defconfig. I tried copying settings from rpi_3_defconfig[1] but
> then keyboard didn't work on either system.
> > Anyways, this is great thanks for fixing this.
> 
> Cheers,
> GeoffOn the RPi4 we don't have
> 
> 
> [1]
> CONFIG_PREBOOT="usb start"
> CONFIG_CMD_USB=y
> CONFIG_USB=y
> CONFIG_DM_USB=y
> CONFIG_USB_DWC2=y
> CONFIG_USB_KEYBOARD=y
> CONFIG_USB_HOST_ETHER=y
> CONFIG_USB_ETHER_LAN78XX=y
> CONFIG_USB_ETHER_SMSC95XX=y
> 

Try to add CONFIG_USE_PREBOOT=y
but that should only give you USB on the type-c connector. USB on the type-b
connector isn't expect to work.

Regards,
Matthias


More information about the U-Boot mailing list