Skip to content
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

Pinephone Support #119

Closed
3 of 8 tasks
EliteTK opened this issue Mar 12, 2020 · 17 comments
Closed
3 of 8 tasks

Pinephone Support #119

EliteTK opened this issue Mar 12, 2020 · 17 comments
Labels
enhancement New feature or request

Comments

@EliteTK
Copy link

EliteTK commented Mar 12, 2020

I've been working on supporting the Pinephone. I can already build a working image.

Similarly to the PBP issue, this one exists to track my progress on this and to bring attention to it so that anyone else wishing to get voidlinux working on the pinephone can re-use my existing work.

  • Voidlinux builds and runs
  • Package templates
    • Uploaded to public repo *
    • Conform to contributing standards
    • Merged
  • void-mklive
    • Uploaded to public repo *
    • Merged

* Note: I am going to push -f to these branches. Just so everyone is aware ahead of time.

I have some questions which I don't know the answers to:

  • Where do I get the config file for the bluetooth firmware for the pinephone? The source for the firmware has a file for the pinebookpro but nothing for the pinephone.
  • Does CC need to be exported for makefiles which rely on it? cc is not a symlink when I try to build which is odd to me. The pinebookpro u-boot package doesn't set CC and supposedly builds so I'm confused why my u-boot would need this.
  • The pinebookpro u-boot package doesn't flash the u-boot either as a kernel config hook or as some kind of postinstall, how should this be handled?

    Flashing is done by mkimage when the image is built. u-boot images are installed to /boot, so they have to be flashed manually after upgrades. To make it easier, I think we should just provide some tool to flash them to correct place (analagous to grub-install) and document it's use. Updates to u-boot images are not very frequent anyway.

  • The pinebookpro mkimage does an xbps-reconfigure in the chroot as part of the image making process to re-generate the u-boot boot.scr but it looks like this already happens in mkplatformfs.sh, is this necessary?

    Partition UUIDs are only known on mkimage step, so reconfigure is needed to update configuration with correct UUIDs.

Feel free to report issues to the issue trackers in the respective repositories and I'll have a look at them, or just post comments here.

Contributions are welcome but I'm not sure if they won't have to be squashed. If people have suggestions it would be easier to just tell me what I should do and I'll credit the person in the commit message.

Footnote: Bear with me, I don't know what I'm doing, I'm not a maintainer.

@renatoaguiar
Copy link
Contributor

@EliteTK Here are answers to some of your questions:

* The pinebookpro u-boot package doesn't flash the u-boot either as a kernel config hook or as some kind of postinstall, how should this be handled?

Flashing is done by mkimage when the image is built. u-boot images are installed to /boot, so they have to be flashed manually after upgrades. To make it easier, I think we should just provide some tool to flash them to correct place (analagous to grub-install) and document it's use. Updates to u-boot images are not very frequent anyway.

* The pinebookpro mkimage does an xbps-reconfigure in the chroot as part of the image making process to re-generate the u-boot boot.scr but it looks like this already happens in mkplatformfs.sh, is this necessary?

Partition UUIDs are only known on mkimage step, so reconfigure is needed to update configuration with correct UUIDs.

BTW, adding support for pinephone is on my personal todo list, so I'm willing to help with that.

@EliteTK
Copy link
Author

EliteTK commented Mar 20, 2020

@renatoaguiar
Thanks! I added your replies to the OP. I think my void-mklive only needs one small patch (chroot-cleanup after the reconfigure) now before it's ready for a PR.

@anjandev
Copy link

anjandev commented Jun 3, 2020

It would also be nice to have a ui packaged for the pinephone. My favorite and likely the easiest to package is sxmo: https://sr.ht/~mil/Sxmo/

@EliteTK
Copy link
Author

EliteTK commented Jun 3, 2020

@anjandev I saw that recently too and thought the same.

I had to take a bit of a break from this stuff as I was busy but now I think would be a good time for me to get back to this and get it finished off.

Pinephone software support has moved forward quite a bit in the time I’ve taken my break so it should be a lot easier to get things more polished.

@jjsullivan5196
Copy link
Contributor

jjsullivan5196 commented Aug 5, 2020

Hi everyone, I personally had an itch to get a well-supported KISS-style distro onto the pinephone, so I started working on support for it in void again.

A good deal has changed in the past few months, and I believe I've captured most of the work that's been done so far. Here's a shortlist for the important stuff:

  • Added u-boot and devicetree support for hardware revisions 1.1 and 1.2
  • Crust power management firmware is now stable, adds features like deep sleep and wake-on-modem. See crust-firmware
  • Downstream stable kernel 5.8 that includes support for most of the hardware features in the pinephone (modem audio routing/power management, USB-C DisplayPort Alt Mode/Power Delivery/OTG, fast charging, etc) More info

So far I've built a new image using the changes @EliteTK already forked from void-mklive, and u-boot runs/kernel boots with a working console.

I still want to test some of the hardware features mentioned, so I'll only be opening a draft pull request with what I have right now. I'd still appreciate any review notes in the meanwhile, as I believe the bulk of the work to bring these features in is done already.

@jjsullivan5196
Copy link
Contributor

jjsullivan5196 commented Aug 7, 2020

A little more progress, tested USB-C connectivity on a HP lapdock and the important stuff appears to work. Looks like I can go buy a lotto ticket!

I also confirmed that the on-board power managment is able to activate, and wifi is able to connect. I haven't extensively tested power managment yet, but I can at least get battery capacity without an issue.

Video of it working here if you'd like to see https://drive.google.com/file/d/1-HjJd4wct4DrwBEz2X8DukFvlM4pQGFT/view

@EliteTK
Copy link
Author

EliteTK commented Aug 7, 2020

My apologies for dropping this, I really ran out of free time to work on it. It's good to see that you're picking it up @jjsullivan5196.

@jjsullivan5196
Copy link
Contributor

jjsullivan5196 commented Aug 8, 2020

@EliteTK it's no trouble, I was motivated to get good software on this device and I have too much free time. Also your patch for mklive really helped get me off the ground, thank you!

Actually, it probably would help a lot if you could open a PR for your branch of mklive. If both PRs get pulled we pretty much have full support for the device.

@jjsullivan5196
Copy link
Contributor

jjsullivan5196 commented Sep 10, 2020

I've patched @EliteTK's mklive to make it work with the pinephone PR https://github.com/jjsullivan5196/void-mklive/tree/pinephone just want to check a couple of things (mostly #148) then I'll submit it for a PR against this repo.

@sgn
Copy link
Member

sgn commented Sep 11, 2020

pinephone has been merged to void-packages

@ghost
Copy link

ghost commented Oct 3, 2020

Any chance someone can make some docs on how to use this for the pinephone? Would be super cool!

@justinmbrock
Copy link

I'd love to know the current status of this. I also came here thinking I'd port Void over to the PinePhone, since it wasn't on Pine64's list of OSes and I have zero interest in supporting ExpidusOS. I have no Idea what I'm doing, but I do have a lot of free time to figure it out, and I need to do something.

@paper42
Copy link
Member

paper42 commented Jul 30, 2021

git clone https://github.com/void-linux/void-mklive
make
sudo ./mkrootfs.sh aarch64-musl
sudo ./mkplatformfs.sh pinephone void-aarch64-musl-ROOTFS-YYYYMMDD.tar.xz # replace aarch64-musl with aarch64 if you want the glibc version

then follow the guide in the handbook: https://docs.voidlinux.org/installation/guides/arm-devices/index.html
If you need a complete image and not just platformfs, generate it with:

sudo ./mkimage.sh void-pinephone-PLATFORMFS-YYYYMMDD.tar.xz

The mesa lima driver is required for graphical interfaces.

@the-maldridge
Copy link
Member

The current status is that it works. This is probably about as far as void will take it as to be a mobile OS, someone needs to put together DE/DM combination and lots of other config, which is not what Void does.

@justinmbrock
Copy link

Hey, that's awesome! Thanks for the answers. I'll see what I can do. If anyone on the thread wants to maybe work on it too, hit me up. This is exactly the kind of project I need to focus on 😀

@paper42
Copy link
Member

paper42 commented Aug 19, 2021

The current status is that it works. This is probably about as far as void will take it as to be a mobile OS, someone needs to put together DE/DM combination and lots of other config, which is not what Void does.

@the-maldridge can we close this issue then?

@paper42 paper42 added the enhancement New feature or request label Jan 15, 2022
@paper42 paper42 closed this as completed Jan 15, 2022
@darkralts

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants