Author Topic: Mainline linux kernel  (Read 14006 times)

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Mainline linux kernel
« on: February 16, 2018, 02:56:31 pm »
Ok so rather than me banging on in lots of tangential topics about how important upstream support is, I thought I would start a new thread to discuss efforts to bring mainline linux support to our Geminis.

At this time we have less than no information about what kernel our devices will be running when shipped.  Hopefully this won't remain the case for much longer!

Taking a look at the latest mainline kernel sources we can see that there is no device tree for any Helio X27 devices, so there is no upstream support at present.  There is support for a couple of closely related X20 SoC devices (MT6797) which is apparently identical to the X27, just with slower clock speeds.

Here is a useful reference for the X27 chip - https://en.wikichip.org/wiki/mediatek/helio/mt6797x

One likely stumbling block will be wireless drivers (WiFi/LTE/BT). If we are lucky we will just need to copy across the firmware blobs from the stock linux rootfs that is supplied with the Gemini to bring the wifi and BT up.  LTE will be harder probably.

One definite stumbling block is the Mali GPU.  We can just forget open source 3D hardware acceleration.  There has been some open source development for earlier Mali hardware (Mali 400) but we won't be seeing anything for the T880 any time soon, probably ever.  However framebuffer support will be fine for a lot of use cases, and the CPU is more that fast enough for software video playback.  Of course the display panel will need to be supported first.

Another question is whether we can get access to UART. Probably not but it would be awesome if we could. This is why I should have bought a second device so I could take a soldering iron to it - oh well!

Bootloader - will this be littlekernel? Will we have sources and be able to build our own binaries? If we can build our own blobs, will they need signing with keys held by Mediatek/Planet Computers? It may be that we need to patch the bootloader to bring up mainline support e.g. for proper initialisation of various hardware - clock speeds, setting MAC address, enabling virtualisation etc etc

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1264
    • View Profile
Mainline linux kernel
« Reply #1 on: February 17, 2018, 04:11:57 am »
+1 for upstream support.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

Steve Marinos

  • Newbie
  • *
  • Posts: 13
    • View Profile
Mainline linux kernel
« Reply #2 on: February 17, 2018, 05:36:17 am »
I have a question since others and long ago were able to bring the wireless drivers to work "LTE,WIFI,BT etc" why would it be hard on other distro regardless of planet computers choice, the N900/Maemo would be the ideal comparison and this was way before android was something to look for ...

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Mainline linux kernel
« Reply #3 on: February 17, 2018, 06:29:47 am »
Quote from: Steve Marinos
I have a question since others and long ago were able to bring the wireless drivers to work "LTE,WIFI,BT etc" why would it be hard on other distro regardless of planet computers choice, the N900/Maemo would be the ideal comparison and this was way before android was something to look for ...

It won't be hard on other distros, if we use the same kernel that ships with the Gemini (and as long as Planet Computers don't make some really silly decisions). It may be hard to get it to work with a newer kernel as there may not be drivers available in the main linux kernel source code.

Steve Marinos

  • Newbie
  • *
  • Posts: 13
    • View Profile
Mainline linux kernel
« Reply #4 on: February 17, 2018, 06:37:10 am »
I guess Planet Computers would love to see their dual boot OSs work with all hardware presented in the Gemini, this would be awesome for the user to switch to any system he wants and have it fully functional at least i hope that's their intentions ...

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Mainline linux kernel
« Reply #5 on: February 17, 2018, 03:04:10 pm »
I just hope that Planet will actually release the full kernel sources.. for both Linux and Android if they're different
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Mainline linux kernel
« Reply #6 on: February 20, 2018, 07:06:38 pm »
There has been work done on getting an X20 device to boot mainline kernel. There is a basic wiki and extensive git repo with required patches. From the looks of it a lot of this stuff has been upstreamed since 4.12.  It's interesting, especially the potential for getting EAS enabled kernel.

https://github.com/freedomtan/X20-96-board/...mainline-kernel

https://developer.arm.com/open-source/energ...ware-scheduling
« Last Edit: February 20, 2018, 07:07:03 pm by Murple2 »

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Mainline linux kernel
« Reply #7 on: March 09, 2018, 02:47:21 am »
Just checked the kernel version in android and disappointingly its a 3.19 release at the very least it is a starting point
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Mainline linux kernel
« Reply #8 on: March 09, 2018, 04:05:00 am »
Quote from: Da_Blitz
Just checked the kernel version in android and disappointingly its a 3.19 release at the very least it is a starting point

sadly, that'll be the Mediatek influence.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

noname

  • Newbie
  • *
  • Posts: 2
    • View Profile
Mainline linux kernel
« Reply #9 on: March 09, 2018, 11:13:03 am »
Quote from: Murple2
Ok so rather than me banging on in lots of tangential topics about how important upstream support is, I thought I would start a new thread to discuss efforts to bring mainline linux support to our Geminis.

...


Hello everyone,

Thank you for this post @Murple2

What is the significance of getting access to the UART module?

MediaTech is selling a dev board with the X20 on it.
https://www.mediatek.com/products/developme...-board-96boards
The dev board does not mention any GSM connectivity, although the X20 it self does
https://www.mediatek.com/products/smartphon...t6797-helio-x20

I have not played with a SoC dev board before. Does anyone have experience with a SoC api?
Do they give a well documented library that gives us full access to their hardware?  
Why do companies like this not want to freely give out a well documented library for users to play with? I would like to be able to just go on their website and download this library.
How does a company like Planet Computers go about developing for a SoC? They have to sign NDA? A non public dev board for the X27 exists or the X family is so similar you just use the same code.

When you say there is no upstream support, what this means is that MediaTech has not submitted any code/drivers to the linux kernel that drives their hardware. Is this correct?

Please help me understand how this scene works.

----

admin edited to snip a lot of the huge quote ~~speculatrix
« Last Edit: June 21, 2018, 06:37:16 pm by speculatrix »

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Mainline linux kernel
« Reply #10 on: March 10, 2018, 08:34:51 am »
Quote
What is the significance of getting access to the UART module?

Helpful but not a major blocker, there are other ways to get data off the device and its common to have a serial via the usb connection if you have a special cable.

Quote
MediaTech is selling a dev board with the X20 on it.
https://www.mediatek.com/products/developme...-board-96boards
The dev board does not mention any GSM connectivity, although the X20 it self does
https://www.mediatek.com/products/smartphon...t6797-helio-x20

Our dev board is essentially the gemini itself, there will be enough differences that it will likely not be much of a gain to use a working dev board as these boards allow you to start software work before you have the hardware. as the gemini is delivered already we have the hardware to test on.

Quote
I have not played with a SoC dev board before. Does anyone have experience with a SoC api?
Do they give a well documented library that gives us full access to their hardware?  
Why do companies like this not want to freely give out a well documented library for users to play with? I would like to be able to just go on their website and download this library.
How does a company like Planet Computers go about developing for a SoC? They have to sign NDA? A non public dev board for the X27 exists or the X family is so similar you just use the same code.

When you say there is no upstream support, what this means is that MediaTech has not submitted any code/drivers to the linux kernel that drives their hardware. Is this correct?

Please help me understand how this scene works.

Kernel development is a bit different to userspace development, there is no 'library' that we can drop in and use, and the quality of most chip vendors code is questionable at best. The major problems are that the 3.19 kernel is real old and has diverged significantly, in addition the android 3.19 kernel had a large amount of custom written parts in it that diverged from the base 3.19

There are some things we can leverage cross vendor, eg cpufreq stuff and some graphical/GPU stuff as this is mostly licesed cores that only really diffre by locaiton in memory. In addition the armv8 series came up with a spec that is sort of like the PC-XT spec and standardizes armv8 designs allowing a lot of power and boot code to be reused. the real issues will include the following

* Board specif cbring up
* memory timings
* SD reader driver
* usb type c drivers (still in flux in 4.15, will not really be stable 100% complete till 4.18 or end of this year)
* wif drivers (MT7610U/USB is supported but not confirmed this is the chip we use)
* 4g modem
* Keyboard driver
* IIO Sensors (gyroscope/compuss)

even once we do get access to the source (if we do) this si not going to be a simple copy and paste job and will likely be without vendor documentation

I would have paid 2x the current costs for an exynos based chip as i know samsung upstreams their drivers in mainline before devices hit production making ti a very simple affair to get a newer kernel working. there also would not be these limitations with the usb ports and chargng/displaying whihc is one of the major points of contention for me.

(mainline means that the kernels on kernel.org contain the drivers required to run the board)

still poking things at my end and hope to come up with a  todo list soon but if anyone has a link to the kernel sources and is willing to share let me know as there are some drivers i would not mind having on hand
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Mainline linux kernel
« Reply #11 on: March 10, 2018, 11:09:06 am »
I think Linux on Gemini is using 3.18.41, not the android kernel

https://developer.planetcom.co.uk/showthrea...id=5&page=2

noname

  • Newbie
  • *
  • Posts: 2
    • View Profile
Mainline linux kernel
« Reply #12 on: March 10, 2018, 03:45:06 pm »
@Da_Blitz

Thank you for your response. I have a better understanding and a sense of direction.

Bob Ham

  • Newbie
  • *
  • Posts: 8
    • View Profile
Mainline linux kernel
« Reply #13 on: May 24, 2018, 06:44:14 am »
Quote from: Da_Blitz
Our dev board is essentially the gemini itself, there will be enough differences that it will likely not be much of a gain to use a working dev board as these boards allow you to start software work before you have the hardware. as the gemini is delivered already we have the hardware to test on.

Except to do kernel work (i.e. mainlining) you really need access to a UART console, which it looks like we won't have without soldering to test points.  That said, it looks like a lot of work has been done with the X20 on the 96 board so if the kernel is mainly brought up, you could work on drivers and such with kernel output going over a USB port or something, maybe even the MicroSD card port.
« Last Edit: May 24, 2018, 06:44:45 am by Bob Ham »

ArchiMark

  • Administrator
  • Hero Member
  • *****
  • Posts: 1830
    • View Profile
Mainline linux kernel
« Reply #14 on: May 24, 2018, 09:04:25 am »
For info on Debian 9 for Gemini, check out the Gemian dev pages:

https://github.com/gemian/gemini-keyboard-apps/wiki/DebianTP


For kernel compilation:

https://github.com/gemian/gemini-keyboard-a...rnelCompilation


And if you see posts in the OESF, Gemini PDA, Linux OS forum section here by Adam Boardman, he's the lead for the project.

 


HTH,

Mark
Silicon Valley Digerati - * Please see my Mini Laptops For Sale Listing *
Cosmo Communicator / One-Netbook One Mix Yoga 3S (Win 10/Manjaro 18)
Banana Pi Zero UMPC/Armbian
MacBookPro
Sold: C3200/N900/OQO/N5/Dell Mini9/Netwalker/UMID M1/