I’m trying to understand what’s going on in the Meles early boot. I like to understand what’s going on and what the chain of operations are from early boot on my SBCs, and I like to set that up myself if possible rather than just use a downloaded image. In my pursuit of that, I’ve come up with several questions, and I hope someone here is more knowledgeable and can point me in the right direction!
So what can we see happening on UART? Following a representative boot log… The BROM fires up:
brom_ver 8
[APP][E] protocol_connect failed, exit.
I’m guessing the protocol it’s talking about is the flashing protocol used by yoctools. OK, great, moving on.
Next we have a Ruyi SDK banner, and U-boot SPL. The Ruyi banner is printed by the SPL. The SPL seems to be doing a custom RAM initialization:
U-Boot SPL 2020.01-g3d877f36 (Jan 10 2025 - 10:02:35 +0000)
FM[1] lpddr4x dualrank freq=3733 64bit dbi_off=n sdram init
failed to setup ddr addrmap
ddr initialized, jump to uboot
Next we have u-boot, and it’s clearly got a bunch of extra stuff going on, notably involving several binaries, most of which are on GitHub, though notably the str.bin
is missing.
I wonder if the OpenSBI is customized like u-boot is, and if so, where is its source code at? And what are these other bin files? What do they each do and how critical are they? Where do they come from? Can I build them myself?
After u-boot says it’s kicking off the kernel, OpenSBI runs…? Why is OpenSBI running after u-boot? This is unusual…
I’m having trouble understanding how the kernel gets started; I’ve built a custom kernel and if I just replace the RevyOS kernel with mine, it runs and boots; however, if I start with a clean boot environment I can build myself, the kernel doesn’t run. If I add in the blackbox binaries from the RevyOS image, it runs OpenSBI but still my kernel isn’t starting.
So how does OpenSBI get started when u-boot said it was starting the kernel, and how then does OpenSBI hand off to the kernel? And, once again, where is this OpenSBI coming from? Sources please =)
Many thanks to anyone who can help me answer any of these questions!