2018-07-04
Some updates!
I have been working on this off and on, making some progress, though there’s still the elusive root switching to stage-2 to implement.
New device
I have added support for asus-flo
, otherwise known as Nexus 7 2013 (WiFi), thus strengthening the boot.img build system.
It fully builds using the downstream android kernel, the mainline kernel is yet to be implemented. Why the downstream kernel? Multiple reasons:
- Hardware support in mainline: I don’t know how it compares to downstream.
- Allows testing a 3.4 downstream kernel with armv7.
I will eventually also add the mainline kernel, as it’s always better to have mainline support when possible.
Improvements / enhancements
BGRA / RGBA
One major nitpick I had was with how the framebuffer configuration was seemingly wrong. I may have done something wrong elsewhere, but I believe everything I did was right. What’s happening is that both my devices seem to default to a BGR(A) framebuffer format, while seemingly presenting themselves as RGB(A) framebuffers. This meant that the red channel and blue channels were inverted.
For asus-z00t
it wasn’t as much an issue, as I could use fbset
to change the parameters to the framebuffer. It seems that asus-flo
’s parameters cannot handle being changed to BGR(A)[1]. I dove into the kernel sources and “fixed”(opinions may differ) the drivers so they (1) could switch to BGR(A) (2) defaulted to BGR(A). When a config option existed to set the defaulf framebuffer format, I added another one, otherwise I simply overruled the defaults.
I would love anyone knowing about framebuffer and/or kernel development to take a look at the patches, I don’t think they could cause issues, but I don’t actually know.
I’d like to know as soon as possible if I did something bad (wrt/ framebuffers) as I otherwise will recommend this approach to “fixing” RGBA/BGRA, and making all supported devices work as initialized in-kernel, instead of fixing them during boot.
Splash screen
Other than that, and partially related, I have decided to forget about fbv
and instead use ply-image
; I initially didn’t use ply-image
because of an error printed on the CLI, but after reading the source, and testing, it looks like it’s a warning and doesn’t affect its used for splash screen purposes.
What’s good with ply-image
is that it’s an actively (not much is needed) maintained program expressly used for boot splashes. It is maintained by the chromium team. It even has support for basic animations, which will definitely help spruce up the boot.
Soon I’ll switch the temporary splashes and make some more permanent ones.
Next
Stage-2! I’m itching since I basically have a hacky stage-2 working with qemu. I need to figure out a cleaner approach that will work better for android devices.
Then, once stage-2 is working, work on making this useful, so porting stuff for nixos, trying to make it usable.
1: It may be that my patch fixes setting the framebuffer config through fbset
. I haven’t tested if I change the CONFIG option back to its previous default and apply fbset
instead.