Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

is it possible to boot aarch64 kernels on Raspberry Pi 3B+ using u-boot WITHOUT using bootaa64?



I've been building a kernel for my Raspberry Pi 3B+.  And I'm loading it via u-boot, which uses bootaa64 to actually load and run it (along with a RAM disk).

But I'm running into weird problems (see below), so I was hoping to eliminate the bootaa64 variable if it's possible.

If it IS possible, can someone tell me which kernel binary I need to load (I've got netbsd, netbsd.bin, netbsd.img), and what the u-boot commands should be? (fatload mmc 0:1 ADDR? FILE?)

But maybe it isn't possible...

For those interested, here's some additional details on why I care.

Basically, certain things work fine when I boot "direct", but when I boot using u-boot/bootaa64, they don't (and FWIW, using UEFI/RPI_EFI.fd has similar problems).

For the past couple of weeks, I've been trying to write some code that talks to the Broadcom HCI BlueTooth controller on a Raspberry Pi 3B+.

It's sitting on the other side of /dev/dplcom0.

When I boot directly (say, using an image from www.armbsd.org), I can open the port, configure it for raw I/O at 115200, and send it an HCI reset packet ( { 0x01, 0x03, 0x0C, 0x00 } ), and it'll respond.

HOWEVER...

If I install u-boot (or UEFI), and have u-boot (or UEFI) load the kernel, then the BlueTooth device never responds.  It's like it's just not there.  But that can't really be the case, since it's part of a WiFi/BT combo part, and the Wi-Fi is working fine.

I've looked at several possible causes.

The most hopeful was that there's some stuff about needing to turn on the BT_ON GPIO, which is on the GPIO expansion so I needed to add some stuff to rpi_vcmbox to issue some firmware commands.  But those firmware ioctls only revealed that the GPIO is, in fact, already on.  (Indeed, I verified that all of those GPIOs are configured [input or output] and driven the same way on Linux [which works], NetBSD [direct, which works], and NetBSD [via u-boot/bootaa64, which doesn't]).

So then I tried to figure out if there's any differences in the FTD/DTB blobs -- u-boot, NetBSD, and the RPI foundation (and even start.elf) all have slightly different DTBs.  But I've tried all of them, and it doesn't matter -- u-boot/bootaa64/NetBSD loads up fine with each of the DTB blobs, but the BlueTooth part still never responds.

I'd like to go post on the Raspberry Pi forums (perhaps there's some clock to the BlueTooth part that's not enabled -- if only the WiFi/BT schematics for the 3B+ were available!), but I feel like I've got too many moving parts for them -- it's not Linux or even u-boot + Linux.  It's u-boot, plus EFI (bootaa64), plus NetBSD.

So I was trying to narrow it down.

BTW, I mentioned that other things don't work, either.  I noticed some months ago that if I u-boot initializes the Raspberry Pi's USB bus, then the kernel won't re-initialize it -- and if I have something plugged into it, it won't get detected.  So I had to disable USB in u-boot -- not ideal, but it got me further along.

Thanks a ton for any help.  Really driving me mad.

Rob



Home | Main Index | Thread Index | Old Index