void-linux / void-mklive

The Void Linux live image maker
https://voidlinux.org
Other
325 stars 189 forks source link

Pinephone Support #119

Closed EliteTK closed 2 years ago

EliteTK commented 4 years ago

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.

* 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:

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 commented 4 years ago

@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 commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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:

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

pinephone has been merged to void-packages

ghost commented 4 years ago

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

justinmbrock commented 3 years ago

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 commented 3 years ago
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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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?

darkralts commented 1 year ago

bruh