[Successful] installation of PureOS on PinePhone

Thank you. I just crashed my pinephone with mobian trying to put wireguard on it and have to start from scratch. Now I can move on to pureos!

Ok i see yes i never have see it i have try till now all Oses for Pinephone but never try PureOS till nowā€¦ :wink:

You have made progress ? I tr to build it via GitLab CI but not manage it yetā€¦ If you know how or can help your welcome :wink:

Thank you! Still getting stuff set up on my linux machine.

Ok i see :wink: Then we wait :wink:

This could be also interesting i donā€™t have try it.

https://www.ruff.mobi/go/mobi/pine.html

1 Like

btw if youā€™re still after the image - Iā€™ve made a build script which follows the same principles albeit using now different kernel/uboot.
Edit: And if youā€™d want to flash generated image to emmc youā€™d need

  • boot from SD
  • start ssh on the phone and download the same image to SD
  • DD the image from SD to emmc
  • mount boot [mmcblk1p1] partition [somewhere]
  • modify boot.scr script to boot from mmc1 (instead of 0)

to modify boot scr you need to create a text file boot.txt

setenv bootargs root=/dev/mmcblk1p2 rootwait console=ttyS0,115200 loglevel=7 panic=10
load mmc 1:1 $kernel_addr_r Image
load mmc 1:1 $fdt_addr_r sun50i-a64-pinephone.dtb
booti $kernel_addr_r - $fdt_addr_r

and then

sudo mkimage -A arm64 -T script -n pinephone -d boot.txt <path to mounted emmc boot partition>/boot.scr

Hi sorry for the late answer thanks, but i have sold my PinePhone.

Just saw this yesterday, so Iā€™m reading through the script and the multi-boot image thread on the Pine64 forum now. This may be mentioned in the thread and I just havenā€™t gotten to it yet, but why is the kernel being fetched from xff.cz?

Itā€™s just a shorter alias for megiā€™s vps server

xff.cz.         718     IN      A       195.181.215.36
megous.com.     1800    IN      A       195.181.215.36
1 Like

Thanks, I ran the script with a few modifications (changed the kernel to megiā€™s 5.10 version and changed the Librem 5 image to librem5r4) and got it to work. I did run into a couple of issues, but they were minor:

  • Librem 5 image download wouldnā€™t ever complete more than a few bytes at a time with librem5r3
  • The script would fail at LO=`losetup -f` without sudo access. Changing the command to sudo losetup -f worked.
  • Some of the output is garbled (looks like curl is writing to stdout at the same time as the script) but I donā€™t think this has any effect on the script working:
** Resuming transfe*r*  fRreosmu mbiyntge  tproasnistfieorn  f1r3o2m0 7b5y4t6e
  p o%s iTtoitoanl  1 0 1 9%0 9R4e5c0e8i
v e d%  %T oXtfaelr d     A%v eRreacgeei vSepde e%d  X f eTridm e  A v e rTaigmee  S p e e dT i m eT i mCeu r r e nTti
m e           T i m e     C u r r e n t 
                           D l o a d     U p l o a d        T o tDallo a d  S pUepnlto a d    L eTfott a lS p e eSdp
t    0     L e f0t     S p0e e d 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Already up to date.--:--:-- -   - - :0--:-- --:--:--     0
+ cd atf
+ make CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_a64 DEBUG=1 bl31
100   190  100   190    0     0    263      0 --:--:-- --:--:-- --:--:--   263

I just put the image on an SD card, put it in my Pinephone, and now itā€™s running (slightly modified) PureOS! Itā€™s going to be interesting trying this out.

Yes, Iā€™m running 5,10 myself but didnā€™t commit the change since it;s still compiled from last RC.
Garbled output is expected - itā€™s written in README that this is intentionally made to be verbose and executed in parallel. Thanks for losetup feedback, will correct it (Iā€™m having too much permissions on my laptop it seems).
Image download issues as well described in readme and is the reason download runs in incremental mode (tries to resume download). Need to check r4 - last time I checked it was having quite low build activity while r3 was being built almost every day.

And yes, Iā€™m running it for quite a time now, you can go to settings and enable suspend on idle to prolong battery time (otherwise it drains in ~8hrs).

Edit: Ah, I know why Iā€™ve chosen r3 - it is byzantium while r4 is amber

Well, after some more testing, it looks like Iā€™m going to have to try r3. I tried r4 builds with kernel 5.10 and 5.9 and both fail to recognize the cellular modem, even though they seem to work otherwise. Unfortunately, I canā€™t get r3 to download no matter how many times I try running the script.

I tried to go to the image build server through a browser but Iā€™m not seeing any artifacts on any of the builds. Shouldnā€™t there be a ā€œlibrem5r3.img.xzā€ on this page?

In fact, I think thatā€™s the reason the build script might be failing for r3. If I try each line of the script manually, then I can see that the curl step is just downloading the HTML for Purismā€™s 404 error page.

yes just checked and it seems none of the l5r3 builds has artifacts - last successful build was a week ago and it has no artifacts already (likely expired).
But tbh Iā€™ve never checked cellular modem on pine, I had it switched off (by jumpers) from the day one.

It seems CI is now building r4 with byzantium, so Iā€™m updating script to use l5r4 byz as a filter for latest image artifact. Plus 5.10 kernel.