PINE64
Boot sequence - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+--- Thread: Boot sequence (/showthread.php?tid=9864)



Boot sequence - Zweitaktmotor - 05-15-2020

Hi,

Is there any way to bypass the boot sequence of the Pinephone?

The two leading software contenders now seem to be Ubuntu Touch and Mobian. Both can be updated on a rolling basis.

I have Ubuntu in the phone and Mobian on a card and would like to keep an eye on both. - But I cannot do so without juggling the SD card in and out.

I have no idea about programming, but can't we have a solution like the Grub menu on the desktop? That would make things so much easier!

[Dreaming mode on] Ideally, I would like to see an OS with the slick look of Ubuntu and the functionality of Mobian, but I guess this is unlikely to happen, at least not any time soon.[Dream mode off]


RE: Boot sequence - Alho - 05-16-2020

We actually do use Grub in the Fedora images, and can as such boot anything.
Only current problem is, that we do not yet have the screen working at this early phase,
so you have to use a debug cable to do the selection in Grub.

As a more quick and dirty solution, you could simply overwrite uboot on the sdd card with
zeros with dd, and reboot, then it boots from emmc. When you want to boot from SDD card,
do wite the uboot.bin back to the SDD card and reboot.


RE: Boot sequence - Zweitaktmotor - 05-16-2020

(05-16-2020, 09:53 AM)Alho Wrote: We actually do use Grub in the Fedora images, and can as such boot anything.
Only current problem is, that we do not yet have the screen working at this early phase,
so you have to use a debug cable to do the selection in Grub.

As a more quick and dirty solution, you could simply overwrite uboot on the sdd card with
zeros with dd, and reboot, then it boots from emmc. When you want to boot from SDD card,
do wite the uboot.bin back to the SDD card and reboot.

Instead of actually deleting uboot, could this be done with a sort of temporary flag, fooling the Pinephone into thinking there was no bootable image on the card? Like having a preliminary boot to offer a choice of boot locations, then set the flag, reboot according to the choice made and finally deleting the flag before the OS actually starts?


RE: Boot sequence - colin hodsdon - 05-16-2020

(05-16-2020, 04:26 PM)Zweitaktmotor Wrote:
(05-16-2020, 09:53 AM)Alho Wrote: We actually do use Grub in the Fedora images, and can as such boot anything.
Only current problem is, that we do not yet have the screen working at this early phase,
so you have to use a debug cable to do the selection in Grub.

As a more quick and dirty solution, you could simply overwrite uboot on the sdd card with
zeros with dd, and reboot, then it boots from emmc. When you want to boot from SDD card,
do wite the uboot.bin back to the SDD card and reboot.

Instead of actually deleting uboot, could this be done with a sort of temporary flag, fooling the Pinephone into thinking there was no bootable image on the card? Like having a preliminary boot to offer a choice of boot locations, then set the flag, reboot according to the choice made and finally deleting the flag before the OS actually starts?

will  the "pineloader" that is being worked on ,do this for you (see the May update )


RE: Boot sequence - Zweitaktmotor - 05-16-2020

(05-16-2020, 04:31 PM)colin hodsdon Wrote:
(05-16-2020, 04:26 PM)Zweitaktmotor Wrote: Instead of actually deleting uboot, could this be done with a sort of temporary flag, fooling the Pinephone into thinking there was no bootable image on the card? Like having a preliminary boot to offer a choice of boot locations, then set the flag, reboot according to the choice made and finally deleting the flag before the OS actually starts?

will  the "pineloader" that is being worked on ,do this for you (see the May update )

Ah yes, sounds like it is. ooking forward to it.


RE: Boot sequence - Alho - 05-16-2020

(05-16-2020, 04:26 PM)Zweitaktmotor Wrote:
(05-16-2020, 09:53 AM)Alho Wrote: We actually do use Grub in the Fedora images, and can as such boot anything.
Only current problem is, that we do not yet have the screen working at this early phase,
so you have to use a debug cable to do the selection in Grub.

As a more quick and dirty solution, you could simply overwrite uboot on the sdd card with
zeros with dd, and reboot, then it boots from emmc. When you want to boot from SDD card,
do wite the uboot.bin back to the SDD card and reboot.

Instead of actually deleting uboot, could this be done with a sort of temporary flag, fooling the Pinephone into thinking there was no bootable image on the card? Like having a preliminary boot to offer a choice of boot locations, then set the flag, reboot according to the choice made and finally deleting the flag before the OS actually starts?

No, I don't think so - or rather it is what I'm suggesting. A flag itself is also a rewrite of a whole block on the 'disk'.
You really only need to zero or 'unzero' the first sector/block of the place where uboot is stored - any 1 letter 'flag'
will do the same.
Creating 2 scripts with a dd command to write the block for either case should be easy