We have moved to a new Sailfish OS Forum. Please start new discussions there.
7

Adding kernel modules to SailfishX

asked 2019-02-13 17:12:20 +0200

txtmode gravatar image

updated 2019-02-15 11:52:20 +0200

I've been searching for information about patching the kernel and I'm not sure if it's even possible. Is it possible to download sources, compile and add modules to the running Kernel?

I have SailfishX Beta running on a Sony Xperia XA2 variant.

In my case I want to try docker so I need some extra modules, but the question is open: Can we add not currently enabled kernel modules? And if it is possible, how?

Thanks.

Review 2/14/2019:

I've been looking at SW_binaries provided by Sony, they are .so files for hardware components: camera, FW radio sensor...

Going back to the file Jolla provides I've found a kernel candidate, altought not being sure it is being used, it's a kernel and an initrd.

Uncompressing Sailfish_OS-Jolla-3.0.1.14-h4413-0.0.7.14.zip shows a file named hybris-boot.img. By using:

https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android-serialport-api/android_bootimg_tools.tar.gz

I've uncompressed this boot image and it contains hybris-boot.img-zImage and hybris-boot.img-ramdisk.gz among other files. So it looks like kernel is provided by Jolla. Then googling for it I've found it is a MER project:

https://github.com/mer-hybris/hybris-boot

Which does not contain kernel sources and I assume they are provided by Jolla.

And again I ask for the same question:

  • how do I compile a new kernel/modules?

  • where is kernel source? Do we use one patched by Jolla?

  • how do we use hybris-boot to compile Jolla kernel

  • Am I totally wrong and the kernel is not provided by jolla?

Thanks again.

Update 2/15/2019:

I asked Jolla support and they provided this wiki page as an starting point to look at:

https://sailfishos.org/wiki/Sailfish_X_Build_and_Flash

It's meant to be used for Xperia X. I'll try to reproduce updating versions for XA2. If I succeed I'll post it here.

Thanks,

edit retag flag offensive close delete

Comments

1

Try looking into http://releases.sailfishos.org/sources/3.0.1.12/

velemas ( 2019-02-15 11:07:56 +0200 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2019-02-13 17:41:06 +0200

updated 2019-02-14 18:57:03 +0200

Kernel comes directly from Sony, I think. Is the part you download together with SFOS during installation, from Sony Open Device Program. According to Sony themselves, XA2 devices are still maintained and supported. There you will find also links to github source code, where you could find latest (Pie has just been released based on 4.9!) kernel.

Edit: maybe it was not clear. To build kernel you need both Sony source code (usually mirrored to lineageos/ex cyanogenmod) and Jolla sources; it's called HAL, you should be able to find all here: https://sailfishos.org/wiki/Hardware_Adaptation_Development_Kit

edit flag offensive delete publish link more

Comments

1

Adding a comment to myself, I see Xperia X has maintained kernel 4.4 version from Sony. It would be great to see it on Xperia X SFOS, it could enable LXC and Android 8 runtime, together with tons o fixes and security updates.

magullo ( 2019-02-13 17:44:25 +0200 )edit

Thanks, this seems to be the way to go!

txtmode ( 2019-02-13 18:31:43 +0200 )edit
1

@magullo Xperia X also support kernel 4.9! Even that OTA ends on Android 8.0 you can install AOSP from Sony with kernel 4.9

lolek ( 2019-02-13 19:28:20 +0200 )edit

But to reality; No real hope to get newest Sony kernel to any xperia with sailfish.

Jk ( 2019-02-14 00:34:35 +0200 )edit
2

It's doable but requires some work.

I have done it so; compile the merboat with HADK, and then just flash it on top of existing official SFOSX on XperiaX.

For me everything works OK, but I guess there could be problems if one wants to use dalvik for example.

juiceme ( 2019-02-14 15:50:34 +0200 )edit
1

answered 2019-02-15 11:12:47 +0200

velemas gravatar image

The latest sources are at http://releases.sailfishos.org/sources/3.0.1.12/sailfish-3.0.1.12-oss-adaptation-sony-nile.tar.bz2 (directory inside is sailfish-3.0.1.12-oss-adaptation-sony-nile\kernel-adaptation-sony-nile)

edit flag offensive delete publish link more

Comments

can we build/compile a kernel from here? and how to do it. please help me

xsetiadi ( 2019-02-15 17:08:26 +0200 )edit
Login/Signup to Answer

Question tools

Follow
6 followers

Stats

Asked: 2019-02-13 17:12:20 +0200

Seen: 954 times

Last updated: Feb 15 '19