Pinebook Pro support
This issue tracks progress towards a usable voidlinux image for the Pinebook Pro. Currently, we can already build a working image
- [x] packaging
- [x] pinebookpro-kernel (https://github.com/void-linux/void-packages/pull/19293)
- [x] pinebookpro-uboot (https://github.com/void-linux/void-packages/pull/19196)
- [x] pinebookpro-base (https://github.com/void-linux/void-packages/pull/19216)
- [x] pinebookpro-firmware (https://github.com/void-linux/void-packages/pull/19197)
- [x] add support to scripts in this repo (#109)
- [x] set_target_arch_from_platform in lib.sh.in
- [x] mkplatformfs
- [x] mkimage
- [x] fix broken things in the scripts here
- [x] make sure /tmp is mounted correctly (#110)
- [x] fix post-install scripts on cross builds (#111)
- [ ] Images available on https://alpha.de.repo.voidlinux.org/live/
How to read the list: A checked box means that the work is done and merged, an unchecked box with a PR linked means that this is basically done, but not merged yet.
Can we try to use the generic uboot and kernel for this? I believe upstream uboot can run this machine
If that's possible, absolutely. The kernel still needs a few patches, but is very close to mainline
upstream uboot supporting the device does not allow to build a "generic" uboot.
@xtraeme I do have the hardware here and am willing to test stuff, but I have no experience packaging things like the linux kernel, so your help is appreciated!
A lot of the work done by the manjaro people can be used, like https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinebookpro/tree/master for example, so it's mostly a job of "translating" stuff from their PKGBUILDs to our templates
I've already been playing around with a simple rootfs install by replacing the root partition of the default debian image, so it's running their kernel and uboot right now. It booted just fine out of the box, but I did have to copy the wifi firmware to get wifi to work.
Maybe we could make a pbp-firmware package like the one for the rpi3?
That said, I should be able to test most things, but I'm not great at packaging, and stuff like configuring kernels and uboot is probably beyond me.
I don't have any packaging knowledge, but I have a pbp and would be willing to offer my services to get void running on it.
I think we don't lack testers, we mostly lack someone with packaging experience and time who is interested in working on this. I have a bit of experience and am certainly interested, but my schedule is pretty packed right now..
I can do the packaging. I'm also pretty busy right now, but I hope to find some time to work on that over the weekend.
would really like to see this happen, i only have packaging experience with arch though. i have a lot of free time coming up, like 2 months free time for reasons and PBP is my favorite new toy, i will learn and help maintain if someone points me in the right direction.
I just pushed WIP to 'pbp' branch on my forks:
- https://github.com/renatoaguiar/void-packages/tree/pbp
- pinebookpro-kernel (build works, boot not yet tested)
- pinebookpro-base
- https://github.com/renatoaguiar/void-mklive/tree/pbp
- add arch detection for pinebookpro
- add pinebookpro to mkplatformfs
I'm now working on packaging pinebookpro-uboot.
you know, there is already https://github.com/void-linux/void-packages/pull/17672
Also, we don't want a 4.4 kernel, it won't work with panfrost and the proprietary libmali which works with 4.4 doesn't work with modern userlands (and if you hack around it it still works poorly)
Also, we don't want a 4.4 kernel, it won't work with panfrost and the proprietary libmali which works with 4.4 doesn't work with modern userlands (and if you hack around it it still works poorly)
From what I read so far, mainline kernel still doesn't support some features, e.g. suspend/resume. My plan is to initially use same version as official (factory) build and upgrade to mainline kernel as soon as it becomes feature complete.
Suspend/resume may not work, but accelerated graphics not working is worse.
You can use s2idle for suspend for now, which works.
Assuming the kernel @renatoaguiar packaged is the same one I copied from the default debian (I can confirm they are both version 4.4.202):
I am currently unable to launch any DE or WM both for wayland and x11 (I tested XFCE, KDE on both and Sway). I believe it is an issue with dbus because it seems NetworkManager doesn't work either (I normally use connman so I hadn't noticed before), but runit reports dbus as up, and I can't find any errors with socklog.
I haven't tried a 5.4 or 5.5rc kernel from Manjaro yet because I haven't got those to boot yet, and I don't have a working UART cable to see what's wrong.
In any case, it might be worth looking into.
Wayland won't work on 4.4, except weston fbdev. Sway needs drm, and for that you need libmali (with weston you might be able to get away with pixman), and libmali does not expose enough of libgbm to have weston-drm/sway working. Out of curiosity, I set up proprietary libmali and went to make a preload library to stub out the missing libgbm calls, and got far enough to launch weston and sway with drm, but EGL still does not work. In X11, you will not get acceleration either, since GLAMOR requires EGL, which does not work. So yeah, unaccelerated fbdev or at most drm with llvmpipe is best you will get with the 4.4 kernel. Use 5.5-rc7 or 5.4 from the manjaro tree and panfrost if you want accel of any kind.
Ah, that probably explains why KDE was complaining about $DISPLAY not being set. I didn't know about fbdev. I'm learning new things by the minute.
In that case, I'll try to get a more recent kernel to run after I fix my UART cable.
I updated the top post with the WIP stuff that happened so far. I think going with a 4.4 kernel doesn't make sense, since mainline is so close to being feature complete. I'm using the manjaro build at the moment and it works definitely good enough for me.
Firmware for the mainline kernel is here: https://gitlab.manjaro.org/tsys/pinebook-firmware/ .
I pushed 5.5 to the PR linked in the top comment, but have yet to test it.
I'm using 5.5-rc7-panfrost-fixes branch and it works ok - I have not checked which branch your PR is based on now but you should use that one
Btw, I talked to the pine64 folks at fosdem yesterday and showed off mine with void on it a little, turns out at least with the 5.5 kernel we have the best battery life of all distros, nothing else comes close :P (i get 16+ hrs with low brightness and wifi and some slight usage like irc and so)
I was checking the latest news and It turns out @q66 was right from the beginning :)
Mainline kernel support is progressing faster than I initially thought, so I'll be focusing now on verifying the existing kernel package from @CameronNemo and packaging whatever is still missing.
I just finished compiling @CameronNemo 's kernel, and looking at the commit referenced in the template, it is the head of the v5.5 branch of manjaro's kernel.
That said, it boots just fine and sway seems to work, although scrolling in Wayland-native firefox is a bit laggy. Is there any way for Wayland to check if it's using software rendering? As far as I can tell glxinfo is only accurate for X11 and XWayland. XWayland firefox works just fine and mesa is installed.
I'll test some other DE's later this week.
I just added pinebookpro-uboot to https://github.com/renatoaguiar/void-packages/tree/pbp. It still needs some cleanup, but I was good enough to generate a bootable image from https://github.com/renatoaguiar/void-mklive/tree/pbp.
@CameronNemo could you rename your linux-pinebook-pro to pinebookpro-kernel, so it matches naming convention used on kernels for other platforms?
pinebookpro-uboot: https://github.com/void-linux/void-packages/pull/19196 pinebookpro-firmware: https://github.com/void-linux/void-packages/pull/19197
I tried @renatoaguiar's build scripts. Just for anyone else that wants to try this:
clone https://github.com/renatoaguiar/void-packages and run git checkout pbp && ./xbps-src binary-bootstrap && ./xbps-src -a aarch64 pkg pinebookpro-base.
Run ./xbps-src -a aarch64 pkg wpa_supplicant cause the default rootfs doesnt come with a wireless...
Then, clone https://github.com/renatoaguiar/void-mklive and run git checkout pbp && make.
The rootfs off void's website has an outdated xbps that won't let us run mkplatform.sh. It's ok because we can generate one with ./mkrootfs.sh -o aarch64latest aarch64.
Next, we run sudo ./mkplatformfs.sh -r ../void-packages/host binpkgs/pbp/ -p 'pinebookpro-base wpa_supplicant' pinebookpro aarch64latest.
Finally, to generate the img, I ran: sudo ./mkimage.sh void-pinebookpro-PLATFORMFS-20200216.tar.xz
I burned it to my eemc and it works! It's 4 am and I have been up since 7am so I will do further testing in the morning. Thanks for your work. =)
If anyone wants me to test anything, please let me know.
I tried @renatoaguiar's build scripts. Just for anyone else that wants to try this:
Thanks for trying that out and posting instructions :)
Run
./xbps-src -a aarch64 pkg wpa_supplicantcause the default rootfs doesnt come with a wireless...
wpa_supplicant for aarch64 is available in official repos. You don't need to build it locally.
Next, we run
sudo ./mkplatformfs.sh -r ../void-packages/host binpkgs/pbp/ -p 'pinebookpro-base wpa_supplicant' pinebookpro aarch64latest.
I didn't have to specify any extra packages in mkplatformfs. At least pinebookpro-base and wpa_supplicant are being installed automatically as part of pinebookpro platform, so you shouldn't need to list them in '-p'.
I burned it to my eemc and it works! It's 4 am and I have been up since 7am so I will do further testing in the morning. Thanks for your work. =)
I haven't tried booting from emmc yet. Good to know that it works too :)
So, to summarize: We have WIP stuff for everything now, we can use that to actually build images that work too, we just need to get the stuff merged now. Some thing have already gotten PRs, for the rest that still needs to be done. I updated the issue description, have I missed something there? Do we have something that's merged already?
void-mklive: https://github.com/void-linux/void-mklive/pull/109
pinebookpro-base: https://github.com/void-linux/void-packages/pull/19216
@renatoaguiar So I installed void on the emmc but I changed my fstab in a way that it void failed to boot. Unfortunately, this failure to boot is not visible to the user. I looked to flash manjaro to an sd card and boot from it to fix the issue. However, the uboot on void doesnt prioritize booting from the sdcard before emmc like on most distros for pinebook pro.
This is an important bug that needs to be fixed before these pull requests can be merged.
I fixed my issue by following the advice here: https://forum.pine64.org/showthread.php?tid=8790