Author Topic: Compiling Cosmo Android kernel  (Read 415 times)

ZimbiX

  • Newbie
  • *
  • Posts: 36
    • View Profile
    • http://twitter.com/ZimbiX
Compiling Cosmo Android kernel
« on: June 26, 2020, 08:04:00 pm »
Anyone know how to compile the Cosmo Android kernel? I'd like to have a go at fixing keyboard debounce (pressing a key generating multiple of the character).
Is this repo even the source from the latest OTA? https://github.com/dguidipc/cosmo-android-kernel
It doesn't look like there are any public forks yet, which is not encouraging =\
I see there are Linux kernel compilation instructions here, but I doubt it's the same: https://github.com/gemian/gemian/wiki/KernelCompilation
I've also asked this in the Telegram group: https://t.me/GeminiPDA/26704 I'll collect any gathered info here in this OESF thread
« Last Edit: June 26, 2020, 08:04:39 pm by ZimbiX »

ehem

  • Newbie
  • *
  • Posts: 30
    • View Profile
Compiling Cosmo Android kernel
« Reply #1 on: June 27, 2020, 12:35:49 am »
Quote from: ZimbiX
Is this repo even the source from the latest OTA? https://github.com/dguidipc/cosmo-android-kernel
That appears to be a Planet Computers employee, but the repository certainly doesn't appear to be active.  This one: https://github.com/gemian/cosmo-linux-kernel-4.4 looks active, but I've got no idea which the correct branch is.

Quote from: ZimbiX
Anyone know how to compile the Cosmo Android kernel? I'd like to have a go at fixing keyboard debounce (pressing a key generating multiple of the character).
Well, usually it is the conventional Linux kernel build steps.  Configuration options are often odd due to mysterious manufacturer modifications.  Good news is there is a /proc/config.gz so Planet Computers appear to be shipping the kernel configuration in a very ready format (manufacturers don't always provide configuration).  Installation is massively different from desktop kernel installation, there are tools for handling Android boot images and you'll need those.

ZimbiX

  • Newbie
  • *
  • Posts: 36
    • View Profile
    • http://twitter.com/ZimbiX
Compiling Cosmo Android kernel
« Reply #2 on: June 27, 2020, 05:19:00 am »
Thanks. I'd seen that repo, but assumed it to be Linux-specific and hadn't realised it had an android branch. That looks to have been updated more recently than the dguidipc repo: 2020-04-26 vs 2020-02-13
https://github.com/gemian/cosmo-linux-kerne...commits/android

On Telegram, Zopin suggested https://www.mygnu.de/2020/02/exfat-support-...o-communicator/
I should have a proper read through that

I haven't compiled a normal Linux kernel before. Maybe I should start there =P

ehem

  • Newbie
  • *
  • Posts: 30
    • View Profile
Compiling Cosmo Android kernel
« Reply #3 on: June 27, 2020, 06:54:42 pm »
Quote from: ZimbiX
Thanks. I'd seen that repo, but assumed it to be Linux-specific and hadn't realised it had an android branch. That looks to have been updated more recently than the dguidipc repo: 2020-04-26 vs 2020-02-13
https://github.com/gemian/cosmo-linux-kerne...commits/android
This reminds me, the kernel source could be distinct due to differences in userspace.  The question of, "Is Android a Linux distribution?"  At times the answer seems "yes" and at times the answer seems "no".

Having reminded me of the situation, most likely you would want to use dguidipc/cosmo-android-kernel.  The reason being this should be what is in use on the Cosmo.  Issue is are there any differences between the kernel used in Cosmo release V1 and release V22?  It isn't certain, but there are often small tweaks between releases.  Yet with no tags nor branches that repository doesn't really satisfy the GPL.  I think I need to send e-mail to Planet about wanting more...


Quote from: ZimbiX
I haven't compiled a normal Linux kernel before. Maybe I should start there =P
The Linux kernel has some pretty good documentation.  The file "README" in the top directory is a good starting point.  There are a bunch of extra packages your build system may need before rebuilding a kernel for itself or a Cosmo.



EDIT: Partially note to self.  Grabbed /proc/config.gz.  The Cosmo configuration matches "k71v1_64_bsp_defconfig" the Cosmo may have an almost completely generic MediaTek kernel.
« Last Edit: June 27, 2020, 07:30:23 pm by ehem »

ehem

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Compiling Cosmo Android kernel
« Reply #4 on: July 31, 2020, 10:42:07 pm »
I've done some experimentation with this myself now.  I've determined what appears to be the official source (https://github.com/dguidipc/cosmo-android-kernel) is missing a number of files.  I believe those extra files were left out unintentionally, but that is clearly incomplete.

abliss

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Compiling Cosmo Android kernel
« Reply #5 on: September 12, 2020, 07:26:29 pm »
I have managed to successfully build and flash a working android kernel following instructions on the sticky thread in the Android Forum. Since oesf links seem to often not work lately, here's an archival version:
https://archive.is/RClCX

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1098
    • View Profile
Re: Compiling Cosmo Android kernel
« Reply #6 on: September 13, 2020, 04:54:28 am »
I have managed to successfully build and flash a working android kernel following instructions on the sticky thread in the Android Forum. Since oesf links seem to often not work lately, here's an archival version:
https://archive.is/RClCX
Hi, if you find any non-working link here, please let me know, I'll fix them. The only links I'm aware of not working are the old one using the old forum's URL syntax, we'll eventually fix them manually.

This is the link to the thread above: https://www.oesf.org/forum/index.php?topic=36338.0

Varti
« Last Edit: September 13, 2020, 04:56:08 am by 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!

Zarhan

  • Full Member
  • ***
  • Posts: 201
    • View Profile
Re: Compiling Cosmo Android kernel
« Reply #7 on: September 13, 2020, 06:31:59 am »
This may be a silly question but can this process be used to include upstream Android patches onto the Cosmo while keeping Planet's own adjustments in there? Can we somehow build more than just the kernel?

I commented on the indiegogo thread about new bluetooth vulnerability that probably means that we'll get patches soon, and knowing Planet's notoriously bad release process it's going to take ages to get them officially. Now when everyone is running Covid19 tracking applications with BT active I'd prefer to have my device secure.