megi's PinePhone Development Log RSS

+972

2023–07–31: My new U-Boot builds

I have not been providing any bootloaders for Rockchip boards along with my kernels. Now that I have many Rockchip based boards and most of them require the use of U-Boot, because levinboot only supports RK3399 currently, it makes sense to organize things somewhat to make bootloader development and installation/updates somewhat easier for me, and hopefully for you too, if you choose to use my builds for whatever reason.

Other reason to provide U-Boot builds to the public is that rk2aw requires some build artifacts that are not normally distributed by other U-Boot binary distribution projects, such as Tow-Boot.

And the last reason is that I have a U-Boot branch that may be very useful to other people, because it contains improved features for Pinephone Pro that I developed:

I also provide two different builds of mainline U-Boot where possible. One with fully FOSS firmware (only on RK3399 based boards). And one which uses Rockchip's closed source TF-A and DRAM initialization blobs. The other build automatically patches Linux kernel DTB for the target board, to enable DRAM downclocking, which results in massive power savings – as much as 0.5W on Pinephone Pro/Pinebook Pro. So while proprietary, it's just too power efficient to not use it at this time, when desired.

In any case, rk2aw allow you to have both FOSS and non-FOSS U-Boot builds in SPI NOR flash at once and to switch between them with a press of a power button. Best of both worlds, I guess. :)

So you may want to use my U-Boot build for Pinephone Pro. That one offers the most new features over the mainline one.

U-Boot builds are available at: https://xff.cz/kernels/bootloaders/

U-Boot source code is at: https://xff.cz/git/u-boot/log/?h=ppp-2023.07

Some documentation is included with each build.

I tested rk2aw builds fairly thoroughly, because that's the key piece of the system, which has to work. If it works after installation, and you're happy with the UI, there should never be a reason for updating it ever again.

Bootloader builds are somewhat in flux. Mainline U-Boot is constantly developed, and breaks often. For example, currently U-Boot master branch has broken display support for Pinebook Pro for whatever reason.

Moreover, I don't need any fancy features from my bootloaders, so I normally disable features that slow down boot massively for no reason, like USB support, network support, etc. You may not like this either.

If my bootloader build works for you, fine, if it doesn't, just make your own build and configure it how you want, based either on my branch or on mainline U-Boot code.

After all, rk2aw should make this kind of bootloader experimentation fairly painless due to ability to have a fallback bootloader in SPI NOR flash, and priority for running bootloader from SD card. That's its whole purpose. If your build is broken or makes the system unstable, just use rk2aw to boot a fallback one, tweak your build and try again.

Enjoy!