Repository navigation
Miyoo Flip BaseOS v0.7.0
Pre-releasePre-release for BaseOS for Miyoo Flip. Read the installation instructions in INSTALL.md.
This is the biggest update to BaseOS for Miyoo Flip yet, it allows to reduce boot time by a whopping 1.8 s. To do so, I gave up the vendor U-boot and compiled a mainline U-boot with several customizations and optimizations:
- CPU boosted at 1800 MHz during decompression and handed off to kernel at 1104 MHz (0.34 s)
- zstd compressed kernel, decoder built without
-mstrict-alignorMINIFYand with-O2optimization (0.22 s) - SD clock fix (card really at 50 MHz, 12 → 23.8 MB/s, 0.58 s)
- data cache on before relocation (0.56 s)
blkcacheholding the GPT (0.15 s)- Flip-specific control tree (0.03 s)
In addition the following optimizations, independent from U-boot, were also made in the branch:
- WiFi probe race:
usbcore.authorized_default=0, with rcS authorizing devices, removes a ~0.3 s stall that hit 11 of 20 boots (about 0.16 s on average, and less variance). - SDR104 tuning in 10° steps: the 113 ms timeout now hits 6 of 22 boots instead of 13 of 16 (about 65 ms on average)
Overall, the boot time improvements are as follows:
- Hand-off: 3.73 → 1.94 s.
- Frontend starts: 4.2 → 2.4 s.
The branch also brings fixes and new features, some made possible with the U-boot change:
- HDMI hot-plugging is now possible on the device
- The boot card does not drop out anymore out of suspend
- adb reconnects after a suspend
- A crash leaves a record in the logs
- Faster and cooler charge while off because of lower CPU frequency and voltage
However, switching to mainline U-boot also has some downsides:
- U-boot has no VOP2 driver and therefore cannot draw a bootlogo. It is therefore drawn by rcS, about one second later. With the reductions in boot time, this feels acceptable.
- Similarly the charge screen while off is gone. Instead, the charge LED blinks three times to indicate the battery is too low to boot.
BSP U-boot was implementing a lot of the batter and state of charge logic, which had to be reimplemented as patches over mainline. I have tested those to work properly, but issues could appear, Be vigilant and report issues if they appear.