Author Topic: List of Android kernel repositories and a guide on how to compile modules  (Read 203 times)

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1073
    • View Profile
    • http://
Here's the official repository of the Android kernel for the Cosmo:

https://github.com/dguidipc/cosmo-android-kernel

Though it seems to be not compilable since some files are missing from it. Here's an more updated repository which should be easier to compile:

https://github.com/deadman96385/android_kernel_planet_mt6771

The Cosmo Gemian Linux kernel has also an Android branch:

https://github.com/gemian/cosmo-linux-kernel-4.4
https://github.com/gemian/cosmo-linux-kernel-4.4/commits/android

And lastly, a guide on how to setup the compiler and to compile missing modules:

https://www.mygnu.de/2020/02/exfat-support-for-the-cosmo-communicator/

If anyone has more updated info on the matter feel free to share! Thanks to the guys on @GeminiPDA on Telegram for the above links.

Varti
« Last Edit: August 07, 2020, 04:57:36 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!
#gemini-pda, #zaurus and #alarmz on Freenode: https://webchat.freenode.net/
#planetgemini on matrix: https://riot.im/app/#/room/#planetgemini:matrix.org
Gemini PDA on Telegram

dst6se

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: How to compile the Android kernel
« Reply #1 on: August 04, 2020, 03:54:56 pm »
Hi !

Im trying to compile ftdi_sio module for android kernel !

Im doing like this

git clone https://github.com/deadman96385/android_kernel_planet_mt6771.git KERNEL
make O=../KERNEL_OUT -C KERNEL ARCH=arm64 k71v1_64_bsp_defconfig
cd KERNEL
make O=../KERNEL_OUT ARCH=arm64  CC=clang  CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=aarch64-linux-gnu- menuconfig
make -j4 O=../KERNEL_OUT ARCH=arm64  CC=clang  CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=aarch64-linux-gnu- modules

but when trying to do a insmod on the .ko files I got Exec format error

here is the modinfo

root@homer:/opt/cosmo/KERNEL_OUT/drivers/usb/serial# modinfo ./usbserial.ko
filename:       /opt/cosmo/KERNEL_OUT/drivers/usb/serial/./usbserial.ko
author:         Greg Kroah-Hartman <gregkh@linuxfoundation.org>
description:    USB Serial Driver core
license:        GPL
vermagic:       4.4.146+ SMP preempt mod_unload modversions aarch64
intree:         Y
depends:
srcversion:     319AD7A689B7B86CC90F0E9
parm:           product:User specified USB idProduct (ushort)
parm:           vendor:User specified USB idVendor (ushort)

and

filename:       /opt/cosmo/KERNEL_OUT/drivers/usb/serial/./ftdi_sio.ko
author:         Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>, Andreas Mohr, Johan Hovold <jhovold@gmail.com>
description:    USB FTDI Serial Converters Driver
license:        GPL
vermagic:       4.4.146+ SMP preempt mod_unload modversions aarch64
intree:         Y
depends:        usbserial


Have i done something wrong ?


cam1965

  • Full Member
  • ***
  • Posts: 243
    • View Profile
    • http://
Re: How to compile the Android kernel
« Reply #2 on: August 04, 2020, 05:44:58 pm »
Problem is that your android kernel was compiled from a different version of the kernel source you have downloaded. Try another branch of the kernel source. Or compile the full kernel from the kernel source you have downloaded and install it. This is a risk of course (to  install a compiled kernel in android ). In linux I had  success doing this. But in android I have never tried. Good luck.

Note : From my android

$ uname -a
Linux localhost 4.4.146 #2 SMP PREEMPT Mon Jul 6 19:51:17 CST 2020 aarch64 Android

So, you can see that is different from your compiled version.
« Last Edit: August 04, 2020, 05:49:22 pm by cam1965 »

dst6se

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: How to compile the Android kernel
« Reply #3 on: August 05, 2020, 06:21:32 am »
Oki , i see , thanks for the help !

drbytes

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: List of Android kernel repositories and a guide on how to compile modules
« Reply #4 on: September 11, 2020, 04:38:20 am »
https://www.oesf.org/forum/index.php?topic=36319.0

Also works for android, obviously :)