Kernel module support 4.4 - on the phone


Is there a way to compile a kernel module on this target platform (not “for”) and use insmod(8) successfully on it?

Why I want to do it:

My phone cannot be used as a hotspot because it cannot connect to my IP in Dual mode, only with IPV6. Wait is long… Meanwhile, I wanted to attempt to resolve the issue myself using Jool 464XLAT as CNAT. It contains a kernel module. Installation on a Linux box is straightforward. When I attempt the same on the phone, I am plagued by its non-support for dynamic kernel modules compiled in situ.

The only thing I get from the phone’s repository is kernel-headers-3.18.136-1.7.29.jolla.aarch64.

I have searched the forum, of course, and read about some other mishaps (unresolved) but also in the community news that somebody was working on getting the kernel-headers for 4.4 five months ago, but the git repo pointed looks stalled. The HADK installed on Ubuntu 22.04 does not bring happiness, and the entire procedure is an error-prone bloat and overkill seeing the given simple task, anyway.

I think this one is a direct question for @Thaodan ?

1 Like

Kernel headers 3 series on a 4.4 kernel?

That’s what you got.

That’s clear, rather im wondering is there some other repo, somewhere…the documentation is perhaps too vague on this?

The headers are what the toolchain and glibc are built against, not the kernel source headers.

There’s no harm in having them older (or even newer!) than the running kernel.

Anyway you need a different package to build modules.

That posted was related to the userspace api headers which are taken from the kernel-headers package.

The kernel for hardware adaptations based on Android such as Xperia 10 III is build inside the Android tree rather than using the regular rpm packaging and thous the kernel headers package isn’t used to build kernel modules (even when it would it would be branded for the devices kernel).

To build kernel modules you would have to build them inside the kernel build tree.

Which kernel module are you referring too @canne?


Thanks, @Thaodan, see the description in the first post: it is Jool 464XLAT. Works like a charm on any (other) Linux box. If its kernel module build and its insmod is not possible the same way on a target SailfishOS 4.4 without HADK, cross-compilers, re-built kernel, flashing, etc. (which I am capable to do but not willing to go with) let’s mark this issue resolved, I’ll drop the work. Thank you for your help.

1 Like

Hold your horses!
Maybe jolla could consider including the module in their kernel build?

1 Like

Thank you @tortoisedoc - I am sure that Jolla will find a way to fix the original issue, cannot connect to my IP in Dual mode, only with IPV6 without Jool and its kernel module since all worked well on 10 III Android before I flashed SailfishOS on it. I’ve moved on another platform on which Jool builds and works (Ubuntu) for my own testing.