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

Target platforms and devices #13

Open
madb1lly opened this issue May 24, 2018 · 7 comments
Open

Target platforms and devices #13

madb1lly opened this issue May 24, 2018 · 7 comments

Comments

@madb1lly
Copy link
Contributor

madb1lly commented May 24, 2018

To recap some discussion in telegram:

Currently Servonk is targetting Gonk from B2G derived from Android Lollipop. There's also the desktop build with Glutin. As far as I understand it the Gonk port is more for convenience of familiarity and available devices for potential contributors.

Long term there is a desire not to support old hardware and to make Servonk usable on new devices. Options for this are:

  • For Gonk to continue to be useful it needs to be updated to base it off later versions of AOSP. Since tha latest Gonk is currently 4 versions behind the current AOSP it would a lot of effort to bring it up to date.
  • Porting Servonk to AOSP directly probably isn't much different from updating Gonk and porting Servonk to these later versions of Gonk. It would probably be less work for a small number of devices, but for a large number the benefits of a smaller number of targets (Gonk-M, N, O, etc) wouldbe preferred.
  • LineageOS isn't exactly a fixed target, AFAIK, at least, they seem to be moving rapidly on to O base (15.1), 14.1 is now in maintenance and there is no more support for earlier versions. The benefit of lineage is that there's more people maintaining them, and they have better longevity than the vendor support for AOSP.
  • For using either AOSP or LineageOS as a base it should be easier to target devices that support Project Treble than ones that don't. Treble was mandatory for any device which shipped with O, but is not mandatory for devices which are upgraded to O. However, many of the suitable devices (which have an unlockable bootloader) are still quite expensive.

Other options:

  • Would it be easier just to target Halium and save porting effort? Aries does have a port, but I don't know the current work status.

  • GNU/Linux options:

  • Librem 5 is already a stated target, is working on the desktop build enough for this?

  • postmarketOS is another option but I don't know how much different it will be to target it's Alpine Linux base vs the Debian base of Librem 5 PureOS.

  • Both these should also make it easier to port to Halium, because they are closer to each other than they are to AOSP.

In all cases one still needs to choose which devices to target. Is it actually easier to choose devices to support first, then choose the best porting option?

  • Sony have stopped support for Aries and there's less than 100 LineageOS users on Aries (see stats.lineageos.org).
  • Nexus 5 is also no longer supported by Google/LG but is obviously in a much better state with LineageOS support.
  • But these are still older devices and both of the above are supported with Gonk-L anyway, so they could be continued to be supported via the Gonk platform, although supporting multiple platforms could become laborious.

What are the minimum system requirements of Servo? How low a spec device can be supported? Is it worth it? Who would use it? Will they contribute to Servonk front end development? At this stage porting to a new device/platform is probably only worth it if it increases contributions to the servo and front end parts of Servonk. Longer term the aim would be to make Servonk available for more general use.

Finally, what about Gonk-KK based devices? What needs to be done to port Servonk to Gonk-KK? That would make the flame, open c and many others possible - even the FX0 using the work by Cutol on Reddit! This may get more previous FirefoxOS/B2G users interested and potentially contributing to the servo and frontend stuff. Most of these people will have moved on to more modern devices now anyway, so once they have success on their old FirefoxOS phones they will probably want to try on their newer, faster phones instead. So "support" for Gonk kk probably won't be needed for long.

  • Note that Fabrice did try to build for KK devices first but some dependencies like Spidermonkey would not compile. So, some work to be done to get this working.

In summary, I don't think it's easy to decide. Whichever platforms(s) are chosen there should be a ready to go set of devices which can be targeted (see the lists of supported devices in all the links above), but it's not clear how to choose the platform.

To try and limit the available choices, here are the devices which I think meet the criteria of Project Treble enabled, with an unlocked bootloader, derived from LineageOS 15.1 devices list and which ones have Project Treble :

  • OnePlus 5 and 5T (unofficial)
  • Xiaomi Redmi Note 4, Mi Note 2, Mi 5, Mi 5s, Mi 5s plus, Mi 6 (unofficial)
  • Motorola Moto Z (unofficial)
  • There must be devices which support Project Treble officially and have an unlocked bootloader, but I haven't found an an easy source for this info.
@fabricedesre
Copy link
Owner

Thanks for the comprehensive writeup @madb1lly !

Here's how I see things. One factor is that we have very limited resources, so focusing is important. That's why even though it could attract people with older fxos devices, I would not spend another minute on a KK port (of course, anyone is free to try). Right now I went with b2g Lollipop because that was practical in terms of available ported devices (z3c and Nexus5), but this should be ditched also and we should only focus on Treble ready devices for anything that is Android based.

However, since I backed the Librem 5 I'm very likely to switch to it when I'll get the dev board and will not have time to spend on Android ports anymore. It's also true that there will be opportunity to share some of the HAL adaptation of the Librem with regular desktop Linux which could make development easier.

@madb1lly
Copy link
Contributor Author

So, Librem 5 and any Project-Treble enabled device are the preferred porting targets.

Everyone's welcome to try porting to another platform but we probably shouldn't expect much support with it (although non-project treble Android O, Halium, postmarketOS and other GNU/Linux platforms would probably be useful).

@madb1lly
Copy link
Contributor Author

Wiki page drafted for inclusion into main repo: https://github.com/madb1lly/servonk/wiki/Target-devices-and-platforms

@fabricedesre
Copy link
Owner

Looks great, thanks @madb1lly! If it's easier than the wiki (I can't find how to grant creation/edit rights to it) send a PR to a docs/ folder instead (bonus points if you update the readme to point to it!).

@madb1lly
Copy link
Contributor Author

Done: #20.

@suoko
Copy link

suoko commented Mar 17, 2020

@madb1lly did you ever try to run b2g on postmarketos? I read you had some problems with glibc and Alpine Linux somewhere else.
In case you did you can reach me here https://www.reddit.com/r/postmarketOS/comments/fgm19q/running_b2g_gaia_on_postmarketos/

@madb1lly
Copy link
Contributor Author

Hi @suoko,

No unfortunately I didn't manage to get b2g running on pmOS, not any version of b2g. In fact, I didn't even manage to compile it - if you search "gcc" in the Servonk chat on telegram you will see my last comments on this. Unfortunately my available free time became less and less and I haven't got back to playing with b2g since then.

I presume that you have no problems compiling it - if so I will contact you on Reddit (since it is off topic of this issue and this repo 😉).

Cheers 🙂

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

No branches or pull requests

3 participants