You are not logged in.

#1 2013-10-10 22:54:52

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Should modules for different kernels differ?

I'm trying to build acpi_call-git from the AUR. The build seems to go rather too smoothly. I uninstalled a custom kernel (which I only have for debugging) which leaves the standard Arch and Arch LTS kernels installed. I have the headers installed for both kernels:

$ pacman -Qs linux-[lts-]*headers
local/linux-headers 3.11.4-1
    Header files and scripts for building modules for Linux kernel
local/linux-lts-headers 3.10.15-1
    Header files and scripts for building modules for Linux-lts kernel

What is confusing me is that the package seems to build identical modules for the two kernels and I am not sure whether that's right:

$ diff pkg/acpi_call-git/usr/lib/modules/extramodules-3.11-ARCH/acpi_call.ko.gz pkg/acpi_call-git/usr/lib/modules/extramodules-3.10-lts/acpi_call.ko.gz 
$ echo $?
0

Shouldn't there be a difference between the two? That is, I know that you typically need modules which match the kernel - otherwise the modules can't be loaded. So presumably if building module M for kernel K1 produces M1, and building module M for kernel K2 produces M2, then M1 cannot be identical with M2.

Is there a problem here or am I just horribly confused?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#2 2013-10-11 12:01:20

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Should modules for different kernels differ?

If the kernel functions (especially the specifications) used by acpi_call haven't changed, then the module could indeed be the same for both kernels.

You'd have to check the kernel commits for acpi related changes to be sure.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2013-10-11 22:38:15

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: Should modules for different kernels differ?

What makes me suspicious is that it produces exactly the same file for a third kernel with no headers installed. I don't think it is designed to handle the presence of multiple kernels at all.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB