Draft: temp/u-boot-pinephone: drop u-boot in favor of Tow-Boot
We've moved the PPP to Tow-Boot, let's do the same with the OG PP! This allows us to drop our custom u-boot package and boot with both extlinux and UEFI, and it standardizes booting over both the PinePhone's.
Eventually I'd like us to move to UEFI booting but we have to figure out how to do that properly without breaking existing installations, thus we'll stay on extlinux for now.
UEFI support is added as a separate commit, not sure if it will break existing installations.
Blockers that have to be figured out before this get merged as to not break some custom setups:
-
#1531: load pmOS_root / pmOS_boot partitions by UUID instead of label (-> also fixes #1485 (closed)) -
!2665 (merged) - Does Tow-Boot work as is with the Vccq hardware mod? I can't test this myself
-
https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/1998 - Can we still provide the option to choose the RAM hz when using Tow-Boot? Again, I can't test this myself
- We'll just drop this feature and use 528 MHz, there was not enough gain from this, see comment below.
-
should make everything work with on-device installer: make sure everything works with installing to SD, installing to eMMC, adjust if needed. (after #1531)
Merge request reports
Activity
added category::device device-pine64-pinephone discussion type::feature labels
Does Tow-Boot work as is with the Vccq hardware mod? I can't test this myself
CC: @symmetrist
Can we still provide the option to choose the RAM hz when using Tow-Boot? Again, I can't test this myself
CC: @BobbyTheBuilder
By Oliver Smith on 2022-04-10T19:20:56
Edited by Ghost UserYes, Tow-Boot works fine with the Vccq hardware mod!
I installed Tow-Boot on the eMMC boot partition as explained here.
Both my existing eMMC installation on and a fresh eMMC installation from the
drop-pp-u-boot
branch worked fine.Tow-Boot loads the
boot.scr
U-Boot script from /boot the same way as the current U-Boot fork.
If thedevice-pine64-pinephone-vccq-mod
package is installed,boot.scr
loadsuser.scr
that applies the DTB overlay for the Vccq mod.Bonus: The volume-up shortcut at boot exposes the eMMC as USB storage.
This storage drive can be used to install pmOS even with Vccq mod!
Jumpdrive is not compatible with Vccq mod, so before I had to export the image and boot from microSD to flash the eMMC.By Federico Amedeo Izzo on 2022-04-11T12:01:09
Edited by AdministratorAwesome, glad it works out of the box! Note that the longer term plan (no ETA yet) is to move to UEFI booting which will require changes to keep this working. It might be good to start figuring this out already and document it, I guess we'll use GRUB again like we do on the PPP now. Same for the RAM hz options.
By Bart Ribbers on 2022-04-11T12:10:53
Hi,
I could definitively send the patch upstream but modifying the nix build logic to create 3 different image doesn't look straight forward to me. I'd have to learn nix language, install nixOS, etc...
Unless someone really wants to handle the build part, I don't think it's worth the time to keep that feature.
I'd also add these personal arguments in favor dropping the feature:
-
I've run my fair share of benchmark on different PP and there's little to no speed gain between 624 and 528.
-
I've had devices running fine on 552 for a few months then, right after a kernel upgrade, they started freezing. I had to revert to the 528 clock
-
Most (all but one) of my devices are now running on 528 and are perfectly stable.
By Bobby The Builder on 2022-04-14T08:00:11
Edited by Ghost User-
marked the checklist item https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/1998 as completed
By Oliver Smith on 2022-04-14T08:01:34
Sorry to bother you @PureTryOut,
but we've detected that this merge request hasn't seen any recent activity. If you need help or want to discuss your approach with developers you can ping
@postmarketOS
. You can also ask on matrix in #devel:postmarketos.org or #postmarketos-devel on OFTC. If no further activity occurs in this MR, postmarketOS developers may close it in the future.Thanks for your contribution.
By * postmarketOS Bot on 2022-05-14T09:00:01
added 284 commits
-
c2f429ab...e6fc18b0 - 283 commits from branch
master
- 6381ca48 - temp/u-boot-pinephone: drop u-boot in favor of Tow-Boot
By Bart Ribbers on 2022-07-18T10:43:08
-
c2f429ab...e6fc18b0 - 283 commits from branch
Sorry to bother you @PureTryOut,
but we've detected that this merge request hasn't seen any recent activity. If you need help or want to discuss your approach with developers you can ping
@postmarketOS
. You can also ask on matrix in #devel:postmarketos.org or #postmarketos-devel on OFTC. If no further activity occurs in this MR, postmarketOS developers may close it in the future.Thanks for your contribution.
By * postmarketOS Bot on 2022-09-04T09:00:03
added 125 commits
-
6381ca48...6149a7d4 - 124 commits from branch
master
- af7d3b9f - temp/u-boot-pinephone: drop u-boot in favor of Tow-Boot
By Dylan Van Assche on 2022-09-04T18:51:08
-
6381ca48...6149a7d4 - 124 commits from branch
added 1 commit
- 8a4ff25f - linux-postmarketos-allwinner: enable EFI
By Dylan Van Assche on 2022-09-04T19:04:26
added 22 commits
-
8a4ff25f...f5fcfe6e - 20 commits from branch
master
- 97475c02 - temp/u-boot-pinephone: drop u-boot in favor of Tow-Boot
- 48bb4c6b - linux-postmarketos-allwinner: enable EFI
By Bart Ribbers on 2022-09-11T15:42:07
-
8a4ff25f...f5fcfe6e - 20 commits from branch
added 1 commit
- f9084f7b - main/device-pine64-pinephone: switch to UEFI booting
By Dylan Van Assche on 2022-09-11T17:42:26
added 1 commit
- ed66cfed - main/device-pine64-pinephone: switch to UEFI booting
By Dylan Van Assche on 2022-09-11T17:55:31
added 1 commit
- 50f78961 - main/device-pine64-pinephone: switch to UEFI booting
By Dylan Van Assche on 2022-09-11T17:57:06
While switching to Tow-Boot, I added support for UEFI as well. This is useful for moving towards Tow-Boot with fwupd updates since fwupd will identify PinePhone differently when running in UEFI mode since the SMBIOS properties are available which have sane values for generating HW ids in fwupd.
By Dylan Van Assche on 2022-09-11T20:19:25
Edited by Ghost Usermentioned in issue #1477
By Bart Ribbers on 2022-09-11T19:44:47
Sorry to bother you @PureTryOut,
but we've detected that this merge request hasn't seen any recent activity. If you need help or want to discuss your approach with developers you can ping
@postmarketOS
. You can also ask on matrix in #devel:postmarketos.org or #postmarketos-devel on OFTC. If no further activity occurs in this MR, postmarketOS developers may close it in the future.Thanks for your contribution.
By * postmarketOS Bot on 2022-10-11T20:00:02
added status::mr-stale label
Sorry to bother you @PureTryOut,
but we've detected that this merge request hasn't seen any recent activity. If you need help or want to discuss your approach with developers you can ping
@postmarketOS
. You can also ask on matrix in #devel:postmarketos.org or #postmarketos-devel on OFTC. If no further activity occurs in this MR, postmarketOS developers may close it in the future.Thanks for your contribution.
By * postmarketOS Bot on 2022-11-10T21:00:02
mentioned in issue #1946 (closed)
By Arnav Singh on 2023-03-01T07:24:23
Please add #1946 (closed) as a blocker to the OP, ie Tow-Boot breaks lower CPU idle states. And in my testing the latest release breaks other things too.
By Arnav Singh on 2023-07-07T23:51:30
I used
dd if=/dev/zero bs=1024 seek=8 count=768 of=/dev/mmcblk0
to disable u-boot but tow-boot doesn't see the pmOS.Is okay to ask here?
By Real Root on 2023-10-30T18:00:59
Edited by Ghost UserJust for testing Tow-Boot you don't have to do anything to remove u-boot. Use the Tow-Boot installer for PP to install. It'll install to
mmcblk#boot0
and take precedence over u-boot installed tommcblk#
so u-boot will automatically stop being used. Similarly if you use Tow-Boot uninstaller it'll clearmmcblk#boot0
and original u-boot will automatically start being used again.By Arnav Singh on 2023-10-30T18:00:59
This https://tow-boot.org/devices/pine64-pinephoneA64.html?
I have pmOS on the external eMMC so it takes over Tow-Boot.
By Real Root on 2023-10-30T19:34:26
Edited by Administratordd if=u-boot-sunxi-with-spl-528.bin of=/dev/path-to-sd-card bs=1024 seek=8
restores u-boot as the wiki states.I replaced all instances of
mmc_bootdev
withdevnum
in boot.txt. And I rebuild boot.scr:mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n postmarketos -d uboot-script.cmd boot.scr
Looks like you shouldn't use
mmc_bootdev
as reported here.The boot.scr works both for u-boot and tow-boot. I tested it only for the external SD.
By Real Root on 2023-11-30T15:15:34
mentioned in issue #2635
By clayton craft on 2024-03-05T00:46:40
Closing since there has been no recent activity. Please re-open if someone is willing to pick it up again. I filed a new issue here to help folks find patch if they want to continue it: #2635
By clayton craft on 2024-03-05T05:54:38
Edited by Administrator