Wayland and LVGL on PinePhone with Ubuntu Touch
lupyuen.github.io
lupyuen.github.io
Ummmm what?
SDL is basically timeless as it's just a layer that abstracts various platforms (Wayland, X11, Mac, Windows, game consoles…) to offer one single API for just making a window with a GPU context, receiving input and stuff.
GTK is a really solid toolkit with a strong, consistent UI design philosophy. The upcoming GTK 4 transitions everything to GPU-based rendering without reinventing the whole toolkit from scratch (unlike Qt with QML, Windows with WPF and UWP…). GTK suffers from lack of funding sadly, so it's a slow project, but the current state of GTK4 is already pretty impressive.
Qt is a monster framework with corporate interests working on it, but it's also really solid and QML/QtQuick was basically Flutter years before Flutter (so actual Flutter is just Google NIH syndrome…).
"Simple" UI libraries like LVGL are always bound to make your life not simple. They usually don't support accessibility, lack support for various platforms (you've just had to port that one to Wayland), have various limitations and so on.
Flutter is not even simple.. it needs the whole Dart VM or compiler whatever monstrosity to run.
So true.
If Google can't control it, they build a competitor. If Google can't figure it out, or if it is not 100% what they need, they will build a competitor.
This has caused tons of problems for both the industry and consumers. For example, Android updates would be much less of a mess if Google had used linus' LTS kernel...
Also I don’t know how closely you followed the ARM tree of the Linux kerne but pre-Google the authors were resistant to the board config approach because you don’t have that on x86 because there isn’t an SoC that bundles a lot of the functionality. It wasn’t until Android that the Linux tree started taking ARM more seriously (which arguably it wasn’t really before anyway)
Treble is Google's attempt to fix a problem they - at least mostly - created themselves thanks to their NIH attitude.
Not sure I would attribute use of device trees to Google. I think the ARM-fication of the kernel happened a few years before Android.
Russell King as recently as 2009 was against it. It got merged around ~2013 so it took about 4 years. The first Android phone was supposed to be 2009 but IIRC it got delayed to 2010 because of the iPhone (announced 2008). I think my characterization of this is fair and accurate.
> Well, for one thing you have only one ABI to consider if you go with the LTS instead of hundreds we have today.
I don't follow. You have 1 Android release per year. There is a new LTS kernel every year. I don't see how sticking to LTS solves the problem. You have to actively hold off on Linux kernel releases to get any advantage of this process. For something like Android this means they'd be forking LTS & it would be even more work to move to a new kernel (all the out-of-tree development + all your driver vendors switching kernels). So now you'd be complaining why Android is using such an ancient Android kernel. Treble solves a real problem and has nothing to do with NIH unless you just define all kernel development happening at Google as NIH (which would be strange considering how many Linux kernel developers and maintainers they employ).
I'm not sure I agree with this assessment but even if this were true I still think it's a good thing that we have an open-source alternative to Qt considering the recent drama about its licensing [1].
[1] https://mail.kde.org/pipermail/kde-community/2020q2/006098.h...
With Ubuntu Touch, you can not install anything on the phone. It has a read-only root filesystem that gets updated over the air.
So just like with the locked down phones (iOS, Android), to gain control over the filesystem, you would have to root it. But then your changes would get wiped with the next update.
This seems just as far from a "Linux Phone" as Android to me.
I am looking forward to one day having a phone that runs Linux. But then I want the same freedom I have on my laptop. To install whatever I want from the Debian repos via apt-get and update via apt-update / apt-upgrade.
But the more I probed, the more it looked like plain Ubuntu with Wayland and AppArmor, without X11 :-)
Check out what I found: https://lupyuen.github.io/pinetime-rust-mynewt/articles/wayl...
I will wait until there is a phone where I can just open a terminal and type apt install whatever I want.
This phone can boot any Linux distro you like from SD-card or usb.
That’s pretty unique and you really don’t get much more open than that.
Feels like running a regular GNU/Linux distro, just on my phone. Much more suited to my purposes.
This is why it felt weird to me that there were special distributions at first, but it seems like we're finally mainlining (pretty standard Debian, Arch, Manjaro), which is nice.
It seems like GNOME shell is also being adapted, which is exactly what I wanted to see. Hopefully some other DEs and large apps will follow.
No, given root access you can simply overlay a separate read-write filesystem over the readonly system partition. It can be as "Linux" as any Live distribution with persistence.
sudo mount -o remount,rw /
Then we can sudo apt install anything...
sudo apt install gcc gdb git make libgles2-mesa-dev
You can install whatever you want using Libertine http://docs.ubports.com/en/latest/userguide/dailyuse/liberti...
I could do that on my Nokia N9 running Meego.
Pinephone [0] is a platform designed by pine64 together with the community. A community that is very FLOSS-centric.
That phone has a few pieces of proprietary firmware, that's true[1] (mostly for the RF parts). But besides that, you can pretty much do anything you want with it, even write your own bootloader[2].
By default, the bootloader will try to boot from the SD card over the EMMC, so you can just slap an arbitrary system image on an SSD card to distro-hop. That's right, there are multiple distributions available: Ubuntu touch, which is indeed built like you say, but you should also have root access OOTB, and AFAIK can change every piece of the system (OTA source, system image, build your own). But also a few others like Maemo Leste (a meego spiritual successor, I think), SailfishOS, android[3], or even plain Linux distributions: PostmarketOS [4] is an Alpine-based distribution tailored to phones, but you can also run Manjaro, Arch Linux, Fedora, Nix, and port your own.
The Lima open source graphics driver for Mali GPUs works quite well, so that helps a lot compared to other "open" phones.
A similar phone is the Purism Librem 5, that goes further with the de-blobing effort, though the price point is quite different.
[0]: https://wiki.pine64.org/index.php/PinePhone
[1]: https://www.pine64.org/2020/01/24/setting-the-record-straigh...
[2]: https://megous.com/git/p-boot/about/
[3]: https://forum.pine64.org/showthread.php?tid=10613
[4]: https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-...
However, if you're looking for "out-of-the-box GNU/Linux experience", Librem 5 comes with PureOS, which is essentially a FSF-approved Debian. See https://puri.sm/posts/what-is-mobile-pureos/
That said, Mobian is working better for me than UBports right now. Theoretically, I like what UBports should be able to offer. But right now in practice Mobian has the advantage. It will be interesting to see where things stand in 6 months.
This is a false equivalency. If you don't like Ubuntu Touch. Try Mobian (Debian) or Manjaro for Pinephone. The Linux phone is still in its infancy, but its prospects now are far better than they've ever been. And even if it's in a rough state right now, my next phone is going to be Linux simply because of how much control Google takes away from users (let's not even get started on Apple).
However... When I was doing all this, TTGO used LVGLv6. LVGL had just released 7, changed everything on their site and all their support. Documentation were pointing to a mix of v6 and v7 items, and there are breaking changes.
When I say breaking changes I mean the entire freaking toolkit is different in the way styles and widgets are handled. I have to rewrite everything by hand to go from 6 to 7.
Lilygo updated to v7 recently but I haven't had a chance to update the AWatch code for it, nor am I inclined to. For a do-over. I get that LVGL is good for say, Arm project size stuff but on ESP32 in the Arduino IDE it's no fun, a sentiment well expressed here in the current docs[2].
One other pitfall I found was that I wanted to be able to dynamically draw items on the screen so I could create a decent Protracker VU-meter for AWatch and possibly a little finger note thing. I ended up falling down a Canvas[3] rabbit hole. Do not touch Canvas if you can avoid it, especially on a low memory platform like ESP32. I had massive memory problems with it. Again, this was 6, not 7 so YMMV but it's put me off for life.
I'm looking for something simpler with limited inheritence. I don't forsee a need for something as complex as LVGL on a simpler watch like the TTGO T-Watch series.
[1] - https://github.com/stevelord/AWatch
[2] - https://docs.lvgl.io/latest/en/html/get-started/espressif.ht...
[3] - https://docs.lvgl.io/latest/en/html/widgets/canvas.html
That said I love seeing the momentum and attention the PinePhone is attracting. Can’t wait until my order arrives.
Hoping my PinePhone arrives soon.
The writing is excellent and thorough though.
Fortunately, C++ works. Modern C++ coding is very fun, and gets more fun with each new Standard.