Hacker News new | past | comments | ask | show | jobs | submit login
How to update U-Boot for PostmarketOS on the Pine Phone (bloggerbust.ca)
74 points by dustfinger 8 months ago | hide | past | favorite | 8 comments



The kB/KB/KiB explanation alone is worth the click. Wish someone had shown me those links the first time I saw "kibi" and did a WTF doubletake lamenting the decline of the convention I grew up with.


It's one of my pet peeves to see "b" used for bytes and "m" used for mega. Makes you have to fish out the units from context. Most of the time it's obvious, your file is not really "16 mb" or 16 thousands of a bit, but sometimes the b/B swap is not obvious as both could apply.


> U-Boot, or rather Das U-Boot a.k.a the Universal Boot Loader, is a small program that is loaded into read-only memory (ROM)

This is wrong. You cannot load a binary into a ROM memory. On most SoCs, thr bootloader is loaded in some RAM (DDR, OCRAM, TCM, or similar).


Eh, I dunno. I've been working with embedded Linux recently and this seems like a pretty good write-up. "ROM" might be a bit of a misnomer for re-writable non-volatile memory, but it makes sense in the context.

"Loaded into ROM" means that an external device like a laptop burns the code into non-volatile memory, it doesn't describe what the SoC does every time that it boots.

This article even explains how the A64 loads its initial boot logic into RAM, although there are a couple of extra steps thanks to the "ARM Trusted Firmware" security elements:

>Bootstrapping is complicated by initial memory address space limitations. The SPL is limited to 32 KiB, most likely because the BootROM, or BROM, loads the SPL into SRAM A1, which is a 32 KiB subsection. If the SPL is larger than 32 KiB the BROM will refuse to load it. After the SPL loads U-Boot proper and passes execution to the ATF, U-Boot proper in turn runs the Pine Phone’s u-boot command script.

So...I don't think I understand your complaint. It seems to me that the article does explain how "thr bootloader is loaded in some RAM".


> You cannot load a binary into a ROM

Nonsense. The terms to google for are "boot ROM" or "XIP". Boot Roms execute from rom because all that is available at the time. XIP binaries run from NOR or ROM happily


you're talking about different things. u-boot is not a boot rom. the actual bootrom is a maskrom on the a64. the maskrom looks to spi/mmc for spl and u-boot.

notably neither spl nor u-boot are xip in this case. spi/mmc are both easily overwritten from within u-boot (or any os loaded later) u-boot is not a boot rom. it is a bootloader.


UBoot is not generally stored in boot ROM. The boot ROM loads the UBoot binary from somewhere (eg. eMMC, SD, etc) to some RAM, and jumps there. In case of in place execution, that is not ROM anyway. You may XIP from a NOR memory, but that is still not ROM.


There are several ARM dev boards on the desk next to me that have U-Boot in ROM.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: