-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phone and tablet UX + mmcboot support #67
Conversation
For mass storage mode, is it possible to export the SD card as well? It would be nice if you can write to SD card from there. |
Unless I missed something when I looked, the UMS driver for U-Boot at this point in time only handles exporting one LUN. With UX improvements (mainly display output support) we could let the user pick which storage medium is exported. An alternative could be to look into adding support for exporting more LUNs in upstream U-Boot. |
I think letting the user choose which device is exported would be more foolproof. With both the SD and eMMC exported, the user could accidentally write to the wrong device. With Jump Drive on the PinePhone, I've had to check the drive size reported in dmesg to ensure I'm writing to the correct device. In the event the user is using an SD card that happens to be the same size as the eMMC drive, that could be tricky. |
7bf1c04
to
24124c3
Compare
This push rebases the work that was on this branch, with the refreshed work built on top of #78. That rewrite was done because this PR showed it was really needed (in addition to making other things easier). This push also includes the "ELO" changes, "Embedded Linux OS", which is used to build a touch-based installer system for installing to SPI, for devices that support installation to SPI. |
b165ac6
to
db86fbf
Compare
Just writing to confirm that the WIP2 builds work fine on my Pinephone Pro. Does the WIP3 build add something or is it just re-arranging some stuff? |
Re-arranging stuff, adding a Pinephone A64 pre-built artifact, and fixes the OS boot order regression. But otherwise mostly the same. |
Hello, the download links don't seem to work for me for some reason. Is there some problems with the domain name redirection? |
AFAICT it still is working just fine here. |
Thank you, it actually worked, it was just a bug or something in my web browser. I was able to download by copying the link to another tab (?!). Thanks for the work, now I'm rocking Tow-Boot on my PPP! It works great! |
Hello all. I erased spi and flashed it. Now I cannot boot from sdcard. Is there any way to recover from this? Thank you for your help. |
Apparently I still can boot from sdcard if i continue spamming volume down button on boot. Everything works as it should after. Strange. |
Note that you don't need to erase the SPI before flashing it, the flash button already handles that. Also please don't ask for user support here but join #tow-boot:matrix.org instead. |
Thank you. Joined;) |
db86fbf
to
ccf5627
Compare
It was beginning to be too cumbersome to separate the changes for mmcboot support, when this PR touched the installer config. I hate bundling more features into a huge PR, but this had to be done. |
The tow-boot matrix doesn't seem to be join-able anymore? |
That's likely because to discover rooms, sometimes "via" servers are needed, try: |
... except for the phone UX.
Reminder: this is a bespoke build process.
This board is slighly special since it doesn't have a trivial to use "external storage" that is bootable.
I just installed this onto my A64 Pinephone. The installation process was very smooth, and thanks to the new mmcboot support, it didn't wipe my existing OS installation! Awesome work. |
This PR should get linked to #76 |
Co-authored-by: Noah Andrews <noah@noahandrews.me>
Co-authored-by: Noah Andrews <noah@noahandrews.me>
65adabe
to
81b34dd
Compare
Give me the build
Woah there, you probably want to read and review before, but eh, if you want it, here it is:
Build 004.5
Built against e65e42d
Outdated builds
WIP 1 Pinephone Pro buildWIP 2 Pinephone Pro buildBuilt against db86fbfWIP 3 Pinephone A64 buildWIP 3 Pinephone Pro buildBuilt against ccf5627; main difference: mmcboot installer for Pinephone A64.WIP 4 Pinephone A64 buildWIP 4 Pinephone Pro buildTODO
What is this?
This is my attempt at making boot on "Linux phones" as painless as possible.
Features:
Anti-features:
LED management
The LED is lit-up as early as possible, assuming it's RGB, it's lit-up red first.
When Tow-Boot starts running the default distro boot (as defined by U-Boot), it turns yellow.
Some additional boot modes will turn the LED different colours:
Phone keys based control
As commonly done with "consumer" phones and mobile devices, holding volume keys during early boot phases will affect the boot in different manner.
User-friendlier universal defaults
To make things less confusing across devices, all devices will load the operating system using the same rules.
The schemes supported by the distro boot scheme from U-Boot are all tried on the following devices in order:
The order is static and eMMC first on all devices. This is a deviation from the defaults from the different communities, and somewhat a deviation from the defaults of U-Boot. Doing so helps reduce confusion and should help reduce support load.
This helps reduce confusion, because the order the operating systems will be tried to be loaded is the same, wherever Tow-Boot was started from. This is quite important considering different SoCs have a different BootROM startup order, making it harder to "just" boot the SD card if started from the SD card.
Furthermore, attempting Operating System boot from eMMC first is a done considering booting from a removable storage should be a conscious choice, requested by the end-user.
Not specific to the Phone UX, Tow-Boot always uses 115200 baud rate. This way, the UART rate is always the same, helping a bit more with unified instructions.
"Status reporting"
In addition to the LEDs reporting the current boot state, vibration support has been added. The device will vibrate once as early as possible.
When failing to do the Operating System boot from SD as requested by the user (holding volume down), the LED will flash 4 times, and the device will vibrate accordingly. Boot will continue to the default distro boot.
When failing to do the default distro boot, the LED will flash 10 times, and the device will vibrate accordingly. Then the device will poweroff.
In addition to that, with the shared disk image, a protective partition is added to the GPT to prevent bad manipulations from breaking the installed Platform Firmware. This protective partition also provides strong guarantees when updating the Tow-Boot install, such that when its size increases, it is assured not to interfere with the other partitions.
Superficial status reporting without display enablement
As described previously, all of this is done such that the user knows what is happening, even though the display shows nothing.
This, to me is a sort of "anti-feature", but in reality we must keep this scheme such that further devices can use it even if a display driver has not been written yet for them.
How do I install this?
Ideally this would be installed to SPI flash using an SPI flash installer. An implementation was written with a "specialized" Linux system build so that the initial lack of display enablement on the Pinephone Pro wouldn't be an issue.
Alas, none of the targeted devices support SPI boot, thus none can be installed to dedicated storage.
To install to eMMC, the steps will generally be the same:
shared.disk-image.img
to an SD card as-isshared.disk-image.img
to the phone.How do I install a Linux distro after installing Tow-Boot?
This is a hard question to answer correctly. This will require a change in habits of the different distributions.
Misc. distro notes
Mobile NixOS
I can only answer for the distribution I'm involved with, Mobile NixOS.
A temporary installation method has been added:
outputs.u-boot.temp-tow-boot-install-script
mobile-nixos/mobile-nixos#442It relies on a script and Mass Storage support on the target device. This is a method I think would be acceptable to keep recommending for other distros. The main thing to understand here is the script manipulates the partitions, then splats the content in them.
Handles part of #104. (Devices listing on the website.)