Author Topic: Mainline linux kernel  (Read 14007 times)

Bob Ham

  • Newbie
  • *
  • Posts: 8
    • View Profile
Mainline linux kernel
« Reply #15 on: May 24, 2018, 09:32:00 am »
Quote from: ArchiMark
For info on Debian 9 for Gemini

For kernel compilation

Hi Mark,

This thread is about mainling support for the Gemini.  That means sending patches upstream to the Linux developers so that Linus' releases contain support for the Gemini.  This can be a very involved and technical process and can take a long time.

Instructions on how to install Debian or compile the kernel aren't much help but thank you :-)

Cheers,

Bob

ArchiMark

  • Administrator
  • Hero Member
  • *****
  • Posts: 1830
    • View Profile
Mainline linux kernel
« Reply #16 on: May 24, 2018, 09:52:38 am »
Quote from: Bob Ham
Quote from: ArchiMark
For info on Debian 9 for Gemini

For kernel compilation

Hi Mark,

This thread is about mainling support for the Gemini.  That means sending patches upstream to the Linux developers so that Linus' releases contain support for the Gemini.  This can be a very involved and technical process and can take a long time.

Instructions on how to install Debian or compile the kernel aren't much help but thank you :-)

Cheers,

Bob

Got it, Bob!

Thanks,

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/

Bob Ham

  • Newbie
  • *
  • Posts: 8
    • View Profile
Mainline linux kernel
« Reply #17 on: May 25, 2018, 08:14:30 am »
I had a look at whether any of the patches here

https://github.com/freedomtan/patches-mainl...ard/tree/master

had been accepted in the kernel and indeed it looks like mainline now supports the X20 development board:

https://git.kernel.org/pub/scm/linux/kernel...ep&q=mt6797
https://git.kernel.org/pub/scm/linux/kernel.../mt6797-evb.dts

The X20 is MT6797, the X25 is MT6797T and the X27 is MT6797X.

So the bulk of the basic work is done.  According to wikichip.org, the X27 is "identical" to the X20.  I'm curious as to just how "identical" and whether a kernel built for the X20 will run on an X27.

The board name is apparently "aeon6797_6m_n", according to the Lineage kernel config.  The .dts file for the 3.18 Android kernel is here:

https://github.com/gemian/gemini-linux-kern...on6797_6m_n.dts

Unfortunately, nearly all of the entries are 'compatible = "mediatek,...";' meaning it's probably all mediatek hacks as drivers.
« Last Edit: May 25, 2018, 09:55:15 am by Bob Ham »

mifritscher

  • Newbie
  • *
  • Posts: 23
    • View Profile
Mainline linux kernel
« Reply #18 on: June 21, 2018, 02:49:12 pm »
TheKit managed to boot a mainline X20 kernel at the gemini - almost, stuck at switching to user mode (or initrd)

I collected some informations at https://github.com/gemian/gemini-keyboard-a...LinuxMainlining . Here is also a boot log.
« Last Edit: June 22, 2018, 02:45:11 am by mifritscher »

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Mainline linux kernel
« Reply #19 on: June 21, 2018, 06:41:29 pm »
I'm hopeful we will see kernel 4.something for the Gemini, maybe along with a release of Android O or P, but I don't think it will be any time soon. Long term, we'll be reliant on third parties getting newer kernels to run on the Mediatek SoC, because Mediatek will have moved on.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

mifritscher

  • Newbie
  • *
  • Posts: 23
    • View Profile
Mainline linux kernel
« Reply #20 on: June 22, 2018, 02:48:32 am »
I think that it is indeed possible to get all needed bits mainlined. Most, if not all components in kernel are OS, they need "only" to be fit to get into mainline kernel (and if only into staging as a first step) And for mali - the friends at panfrost are very active.

Overall I think we are at a position where the linux-sunxi.org people were a few years ago. And nowadays, almost all things are running with a mainline kernel.

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Mainline linux kernel
« Reply #21 on: June 22, 2018, 03:53:24 am »
This is a page that contains the state of the mainlining project (edit: didn't read the last page of comments it seems, mifritscher already mentioned this):
https://github.com/gemian/gemini-keyboard-a...LinuxMainlining

Also to point out that Omegamoon on irc managed to get UART console out of the kernel via a USB cable using a modified version of these instructions (using an FTDI): http://www.stevenhoneyman.co.uk/2014/11/mt...ebug-cable.html

It also sounds like just getting a pound shop USB C charge+data cable and cutting it open and wiring to the serial port on a Raspberry Pi could also work for those without an FTDI but a RPi.
« Last Edit: June 22, 2018, 04:49:01 am by Adam Boardman »

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Mainline linux kernel
« Reply #22 on: August 01, 2018, 01:46:40 pm »
Quote from: mifritscher
TheKit managed to boot a mainline X20 kernel at the gemini - almost, stuck at switching to user mode (or initrd)

I collected some informations at https://github.com/gemian/gemini-keyboard-a...LinuxMainlining . Here is also a boot log.

The bootlog is 404, does anyone have another link to it?

I have been trying to boot mainline now I have a UART cable but I keep getting device tree not found error. I was creating boot images with mkbootimg and using the --dt option to specify the dtb, but i've also tried appending the dtb to the kernel image. Both methods give me the same error. IMO appending the dtb to the kernel is hacky and very un-futureproof, does anyone know why we are doing this? Is it a limitation of our version of lk? I know old arm boards did this as a workaround for nonexistant or  buggy device tree support in their bootloaders, but this is going back years. It shouldnt be required in the world of arm8 and mature multiplatform support in the kernel
« Last Edit: August 01, 2018, 01:54:08 pm by Murple2 »

TheKit

  • Newbie
  • *
  • Posts: 28
    • View Profile
Mainline linux kernel
« Reply #23 on: August 03, 2018, 07:15:48 pm »
Quote from: Murple2
I have been trying to boot mainline now I have a UART cable but I keep getting device tree not found error. I was creating boot images with mkbootimg and using the --dt option to specify the dtb, but i've also tried appending the dtb to the kernel image. Both methods give me the same error. IMO appending the dtb to the kernel is hacky and very un-futureproof, does anyone know why we are doing this? Is it a limitation of our version of lk? I know old arm boards did this as a workaround for nonexistant or  buggy device tree support in their bootloaders, but this is going back years. It shouldnt be required in the world of arm8 and mature multiplatform support in the kernel
You need to append dtb to Image.gz. MediaTek's lk bootloader actually handles device tree (there is no appended dtb support for aarch64 in kernel), but in current implementation bootloader searches for appended device tree. The reason is that --dt option isn't/wasn't standard for abootimg format, it's generally used only by Qualcomm devices.

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Mainline linux kernel
« Reply #24 on: August 04, 2018, 11:09:42 am »
Quote from: TheKit
You need to append dtb to Image.gz. MediaTek's lk bootloader actually handles device tree (there is no appended dtb support for aarch64 in kernel), but in current implementation bootloader searches for appended device tree. The reason is that --dt option isn't/wasn't standard for abootimg format, it's generally used only by Qualcomm devices.

Thanks, I will give this another try. I was doing this:
Code: [Select]
cat Image.gz dtb_file > Image-dtb >
Is this correct? I also tried gunzipping the Image, appending and the gzipping it back up. But I dont think thats right..?

TheKit

  • Newbie
  • *
  • Posts: 28
    • View Profile
Mainline linux kernel
« Reply #25 on: August 04, 2018, 03:37:06 pm »
Quote from: Murple2
Thanks, I will give this another try. I was doing this:
Code: [Select]
cat Image.gz dtb_file > Image-dtb >
Is this correct? I also tried gunzipping the Image, appending and the gzipping it back up. But I dont think thats right..?
Code: [Select]
cat Image.gz dtb_file > Image.gz-dtb is the correct way, yes, this worked for me.

Kero

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://https://https://chmeee.org/#GeminiPDA
Mainline linux kernel
« Reply #26 on: August 09, 2018, 03:58:04 am »
When I tried
Code: [Select]
make Image.gz-dtbit just worked

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Mainline linux kernel
« Reply #27 on: August 09, 2018, 04:40:51 am »
Quote from: Kero
When I tried
Code: [Select]
make Image.gz-dtbit just worked
Is that with the mainline kernel source?

Kero

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://https://https://chmeee.org/#GeminiPDA
Mainline linux kernel
« Reply #28 on: August 09, 2018, 10:26:05 am »
Hm, no.

mifritscher

  • Newbie
  • *
  • Posts: 23
    • View Profile
Mainline linux kernel
« Reply #29 on: August 13, 2018, 02:01:57 am »
hmm, 4.19 seems to have a lot of cool stuff for x20 /mt 6797  https://www.phoronix.com/scan.php?page=news...-4.19-ARM-Early