Auteur: aitor_czr Date: À: dng Sujet: Re: [DNG] How to build a kernel module?
Hi Nik,
On 4/3/19 9:52, Dr. Nikolaus Klepp <dr.klepp@???> wrote: > Hi!
>
> I am trying to build a patched thinkpad_acpi module for 4.19 kernel (the patch removes the spaming error message from the battery charge/discharge levels BCTG/BCSG on thinkpads T60/T61/X61). I can build the module, but the creaded module won't load.
>
> This is what I did to compile the modules:
>
> # aptitude install linux-source-4.19
> # cd /usr/src
> # tar xJf linux-source-4.19.tar.xz
> # cd linux-source-4.19/
> # cp /boot/config-4.19.0-2-amd64 .config
> # make modules_prepare
> # make modules
>
> This succeeds, but the created modules won't load:
>
> root@t61:/usr/src/linux-source-4.19# insmod ./drivers/platform/x86/thinkpad_acpi.ko
> insmod: ERROR: could not insert module ./drivers/platform/x86/thinkpad_acpi.ko: Invalid module format
> root@t61:/usr/src/linux-source-4.19# file ./drivers/platform/x86/thinkpad_acpi.ko
> ./drivers/platform/x86/thinkpad_acpi.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=571675351aecfb803c56549d218d85d53f60b8d7, with debug_info, not stripped
>
> Any idea what I missed?
>
> Nik
Where can we find the sources of this patched module? Did you give a try
to module assistant?