Reply
Thread Tools
Posts: 1,163 | Thanked: 1,873 times | Joined on Feb 2011 @ The Netherlands
#181
Originally Posted by chenliangchen View Post
Don't lose hope yet...

Everything is possible, it's just matter of time or the steps that need to take.

My goal is not just making a keyboard device, this is just a step forward from the Moto Keyboard, it's not the end.

This world needs something different, and we just had our little first step, I trust with all the experience and wisdom here, we can definitely achieve further.

So don't sink your hope for now.
That from your mouth is very encouraging, we'll see then
__________________
N900 loaded with:
CSSU-T (Thumb)
720p recording,
Pierogi, Lanterne, Cooktimer, Frogatto
N9 16GB loaded with:
Kernel-Plus
--
[TCPdump & libpcap | ngrep]
--
donate
 

The Following 3 Users Say Thank You to mr_pingu For This Useful Post:
chenliangchen's Avatar
Posts: 1,478 | Thanked: 9,871 times | Joined on Dec 2008 @ Shanghai / London
#182
Originally Posted by Venemo View Post
The main problem is well summarized by Greg Kroah-Hartman's blog post. In short, on the driver level the Android fork of the Linux kernel is incompatible with the mainline Linux kernel. Thus, you can't write a single graphic driver that is compatible with both.

Since Android is more popular on phones than mainline Linux, everybody just writes graphic drivers for Android, not mainline Linux. (Note: there are very few drivers which had a version for the mainline Linux kernel, eg. the NVidia Tegra, and the OMAP SGX driver, perhaps more?)
Basically, nobody but Nokia invested in mainline GNU/Linux on ARM phones...
Even the Android userspace is basically incompatible with the userspace of "normal" desktop Linux distributions. (They use a different set of libraries, etc.) "Normal" distributions usually run a GNU system, while Android uses something called bionic. But the most troubling issue is with the graphic drivers.

So when you want to run a "normal" distribution (Fedora, Debian, Arch, whatever) on a phone, even if it has an ARM version, you have two choices: either get a mainline Linux driver for your chip (which almost nobody develops), or just use software rendering, resulting in bad user experience.

How Jolla does it (and how Ubuntu Touch and Plasma, etc. did it) is through something called libhybris which allows to create a "mix-and-match" system by combining the Android kernel and drivers with the userspace of a "normal" Linux distribution. It is basically a hack that allows us to run a GNU system on top of the Android kernel with hardware grahics acceleration, thus allowing to create a non-Android system from the Android kernel.

Needless to say, this hacky approach with libhybris is quite incompatible with the way how a "normal" Linux distribution delivers its kernel.

Also, chip vendors usually only support one specific (old) version of the kernel, with closed-source graphics drivers, and it almost never gets updated (or only gets minor fixes and security patches). They have no interest in maintaining a newer kernel for their old chips, so they just don't do it, with few exceptions (OMAP maybe?).

Hope this helps!
That definitely helps!! And thank you for your information!

To make sure I understand correctly, so Fremantle is the last development on a mobile ARM platform for a GNU/Linux? Perhaps Harmattan as well.

Unfortunately TI has stopped mobile chipset business, that leaves Tegra being the only SoC that has mainline Linux Kernel driver support?

On the other hand, if we developed a Tegra solution from scratch, that should be able to power the mainline Linux?

And my last question, is it technically possible developing a graphic driver for mainline linux, on for example, Qualcomm chipsets?

And thank you for your knowledge!
 

The Following 13 Users Say Thank You to chenliangchen For This Useful Post:
Posts: 339 | Thanked: 1,623 times | Joined on Oct 2013 @ France
#183
Originally Posted by chenliangchen View Post
On the other hand, if we developed a Tegra solution from scratch, that should be able to power the mainline Linux?
I'm not an expert, so please take this with a grain of salt, and wait for someone like Venemo to confirm/correct me.

Anyway, linux support is not a yes/no question, there are several levels of linux availability for graphics drivers:
* only Android available through libhybris (with the drawbacks Venemo explained)
* linux version available as a proprietary binary blob, probably tied to a specific kernel version (like Mali drivers are on the user-space, the kernel side being open, see Odroid C2 discussions about mainlining it)
* linux version available as open-source, maybe mainlined (probably only Intel, Nvidia and AMD here ?)

There are a lot of ARM platforms having graphical acceleration under linux without using libhybris, but it is more common for industrial CPU (like Freescale iMx or TI OMAP) than consumers products. And it is probably not fully open to follow mainstream kernel.

And there are also open-source initiatives to reverse engineer GPU to make open-source drivers for the closed platforms, like freedreno for qualcomm, lima for ARM's Mali, etnaviv for Freescale's vivante, grate for Tegra... but it takes time and is usually quite behind the closed blobs (when available).
 

The Following 10 Users Say Thank You to Zeta For This Useful Post:
Posts: 1,163 | Thanked: 1,873 times | Joined on Feb 2011 @ The Netherlands
#184
Well blobs are not as bad as libhybris but not ideal. As long there is a open driver currently in development we can sit at the blobs for time being. We survived the blobs of the n900 too.
__________________
N900 loaded with:
CSSU-T (Thumb)
720p recording,
Pierogi, Lanterne, Cooktimer, Frogatto
N9 16GB loaded with:
Kernel-Plus
--
[TCPdump & libpcap | ngrep]
--
donate
 

The Following 4 Users Say Thank You to mr_pingu For This Useful Post:
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#185
Originally Posted by chenliangchen View Post
To make sure I understand correctly, so Fremantle is the last development on a mobile ARM platform for a GNU/Linux? Perhaps Harmattan as well.
If I recall correctly, Tizen is still a GNU/Linux system, although I'm not entirely sure about its low-level driver infrastructure ― I haven't followed Tizen for a while now, but it might be worth checking out what kind of hardware they are using and what kind of kernel they deliver. (Not sure if Tizen as an OS is feasible or not, haven't seen it for a long time. But it is still in development by Samsung.)

Originally Posted by chenliangchen View Post
Unfortunately TI has stopped mobile chipset business, that leaves Tegra being the only SoC that has mainline Linux Kernel driver support?
There are others, see Zeta's post. A Tizen phone has a Mali GPU, so maybe there are some drivers for Mali. I think Broadcom also has something (at least the Raspberry Pi does have hardware graphic acceleration). We should look around to see what alternatives are there.

Originally Posted by chenliangchen View Post
On the other hand, if we developed a Tegra solution from scratch, that should be able to power the mainline Linux?
Possibly. They have "Linux for Tegra" although I have personally never worked with it. We should ask a guy like Vgrade, Sledges or Stskeeps who might know more about this, and other possible alternatives.

Originally Posted by chenliangchen View Post
And my last question, is it technically possible developing a graphic driver for mainline linux, on for example, Qualcomm chipsets?
Technically, everything is possible, but not everything is feasible. If there were mainstream commercial interest in developing such drivers, every chipmaker would develop them. It is also a matter of hardware documentation, but some people are doing it regardless, eg. the reverse engineering efforts that Zeta mentioned.
 

The Following 12 Users Say Thank You to Venemo For This Useful Post:
Posts: 38 | Thanked: 202 times | Joined on Sep 2015
#186
Chen, I posted your questions in the tinkerphones community mailinglist (built around Gta04 phone). And I got a reply from Nikolaus Schaller, the maker of this phone.

he should just port and provide a well maintained standard boot loader + kernel (by adding required special drivers to kernel.org) and then people can install everything they like. IMHO there is no need to provide a complete OS. GTA04 comes with a maintained kernel and some Debian/LXDE/XFCE demo. Community members developed QtMoko and Replicant for it. AFAIK, the Neo900 also will only provide hardware plus kernel and others will adapt Maemo/Fremantle.

For the Pyra, there will be something which is called "PyraOS", but technically this is just a preconfigured Debian XFCE4 image with a standard kernel built with a different defconfig. So it is not a separate OS, just a specific blend of existing things to make installation easier and the default installation more useable.
http://lists.goldelico.com/pipermail...ly/001660.html
 

The Following 9 Users Say Thank You to ravelo For This Useful Post:
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#187
Originally Posted by ravelo View Post
Chen, I posted your questions in the tinkerphones community mailinglist (built around Gta04 phone). And I got a reply from Nikolaus Schaller, the maker of this phone.



http://lists.goldelico.com/pipermail...ly/001660.html
He conveniently forgot to mention how to deal with graphics drivers...
 

The Following 8 Users Say Thank You to Venemo For This Useful Post:
Posts: 38 | Thanked: 202 times | Joined on Sep 2015
#188
Yes, thanks a lot for clearing this up.
So for me it looks like the choice of the appropriate graphics hardware is the most crucial issue.
 

The Following 2 Users Say Thank You to ravelo For This Useful Post:
locusf's Avatar
Posts: 159 | Thanked: 341 times | Joined on Dec 2007 @ Helsinki, Finland
#189
Originally Posted by chenliangchen View Post
This is actually my question from day 1, please educate me:

What is the barrier of porting a standard ARM Linux distribution on it? What's the technical difficulty?

And 2nd question is what is the cost/work needed doing so?

Thanks in advance!
Barriers are:
* not having any support from oem towards having a mainline kernel or at least an open source kernel
* no support for _linux_ graphics driver, libhybris conveniently goes around this by using android drivers so that linux can use them
* DIY licensing fee from ARM to make a processor oneself and everything included is what I consider the most expensive and craziest alternative (alongside the enormous amount of elbowgrease to make it work)

So there are very limited to nonexistent choices here:

* Freescale iMX 6,, this has yocto support to at least morty version, with vivante gpu, etnaviv in mesa

* RISC-V boards from SiFive, https://dev.sifive.com/freedom-soc/evaluate/fpga/ this is essentially coding the processor and gpu using fpga, which is quite painful and expensive

At least according to my own research (can't say if its extensive or brief yet) this is all I've come up with.

Peripherals themselves are quite easy to come by source code wise, counting out the baseband modem of course. For the latter problem, I'd suggest figuring out ways to connect to a modem in a non-cpu or memory bound way, like using the SDI bus.
__________________
Regards,
LoCusF
http://locusf.blogspot.com
 

The Following 13 Users Say Thank You to locusf For This Useful Post:
Posts: 248 | Thanked: 1,142 times | Joined on Dec 2014 @ Earth
#190
Originally Posted by mr_pingu View Post
I can't wrap around my head that sailfish would be possible but say archlinux doesn't work... What's blocking that?
Many distros with ARM support...
Originally Posted by chenliangchen View Post
This is actually my question from day 1, please educate me:
What is the barrier of porting a standard ARM Linux distribution on it? What's the technical difficulty?
So to summarize (thanks go to @Venemo for the indepth explanations)

- the main problems are drivers.

- most hardware make write driver for android which works differently than standard Linux.
(e.g.: standard graphics - both opensource and some semi-open - in Linux use an infrastructure called DRI. Android uses flinger).

- also most hardware manufacturer only write binary-only drivers which can only work with the specific kernel versions that exist at this time.
(This is much more noticeable with Android, where SoC manufacturer writes drivers for the exact specific Linux kernel that is used by the Android version of that moment (e.g.: that's why Jolla Phone is stuck at kernel version 3.4.xxxx , even if current modern kernel is at version 4.11, 4.12 will be out anytime soon, and 4.9 is the last LTS
I think on the mobile front, Nvidia puts a little bit more effort)


So basically you're stuck with 3 solutions :



-1- Use the official Android drivers, paired with the corresponding android drivers (GPU: "Flinger").

Jolla does this way. They use the libhybris they've created to be able to use these driver under a full blown GNU/Linux.

The also need to backport newer feature that aren't availble in kernel 3.4.xx (e.g.: they backport some fixes and enhancement of the BTRFS filesystem featured in later kernels).

Ubuntu was also doing that with Ubuntu Touch. But they've abandonned.
I haven't heard of any other distribution bothering to develop a functional libhybris stack (though Gentoo, and Arch are the most likely to get one, eventually).


- Use the official GNU/Linux binary driver (usually a kernel .ko DRM paired with a closed source binary openGL driver).
You might get more choice of kernel versions.

But less choice of actual vendor doing this.
- Nvidia is still making efforts, because GNU/Linux is still a choice in cars, specially for the infotainment part
(the few in-car computer which are plugged into the use-facing displays, and sound system. Real-time kernels like QNX might be popular instead on more critical computers)
and Tegra is a popular chip here (see Tesla cars - though in that case they even use Linux for the other in-car computers).
Also Tegra (by being equipped with a built-in Nvidia GPU and some parts even featuring PCIe lanes that could communicate with full blown Nvidia graphic cards) is a very interesting platform for some computing tasks (things that are purely done on GPU - e.g.: using CUDA) such as neural nets. And as Linux is basically *king* in the scientific research domain, they are putting some effort.

(Most of the netbooks have gone this route.
Most of the chromebooks have also gone this route.
Both provide most of the hardware on which you see "standard Linux distro such as Debian/OpenSUSE/Arch installed")



- Use the latest Linux kernel and try whatever open-source drivers are availble.

The big problem here is that unlike the desktop - where both Intel and AMD are even having developpers on their own payroll - much of the development is done by independent developers that need to reverse engineer everything from scratch.
There are few chipset that are a little bit supported.

Nvidia's Tegra are supported by the Nouveau drivers, because they share a lot with the mainstream Nvidia cards, and because Nvidia is a tiny bit less reluctant to publish some information from time to time.
Still, support isn't perfect.

Qualcom's Adreno are supported by the Freedreno driver, (because they have a shared parentage with Radeon and are massively popular chips, so there's some efforts).
Still, support isn't perfect.

Mali are support by Lima driver.
Still support isn't perfect.

Broadcom's VC4 and upcoming VC5 also have a driver (because of the massive popularity of the Raspberry Pi series of boards).

Non of the other GPU has any decent support (e.g.: Power VR is closed source).
 

The Following 11 Users Say Thank You to DrYak For This Useful Post:
Reply

Tags
n950 revival, q-device, qwerty keyboard, sailfishos, sailingchen


 
Forum Jump


All times are GMT. The time now is 09:39.