AndiWeiss / alx-wol

dkms for atheros alx ethernet driver wol patch
23 stars 4 forks source link

Install Failure | kernel_version: File not found #12

Closed arnaudclerc closed 3 months ago

arnaudclerc commented 3 months ago

Environnement

OS: Debian GNU/Linux 12 (bookworm) Kernel: 6.1.0-20-amd64

Hardware

Motherboard: msi 1.0 jasmineR (2AE0) NetCard: Atheros AR8161

Context

I previously successfully installed alx-wol (version 1.5), but during a package conflict, lost its functionnality. When trying to reinstall it i happily found a new version but i no cannot install it anymore

steps taken

i purged all dkms configuration and previous installed alx-wol versions

since last update, i also upgraded the kernel from 6.1.0-18, the error i encounter seems pretty easy to fix, but i have little to no knowledge about the scope of this kernel fix.

Issue

here is the complete log of ./install.sh

Sign command: /usr/lib/linux-kbuild-6.1/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
/usr/src/alx-wol-2.0/scripts/extract_kversion_string.sh: 41: /lib/modules/6.1.0-20-amd64/build/scripts/extract-vmlinux: not found
rm: impossible de supprimer '/var/lib/dkms/alx-wol/2.0/6.1.0-20-amd64/kernel_version_string': File not found
Creating symlink /var/lib/dkms/alx-wol/2.0/source -> /usr/src/alx-wol-2.0

Running the pre_build script:
cat: /var/lib/dkms/alx-wol/2.0/build/../6.1.0-20-amd64/kernel_version: File not found
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/net/ethernet/atheros/alx?h=v:
2024-05-02 14:39:35 erreur 404 : Not found.
fetch_kernelparts.sh failed

Building module:
Cleaning build area...(bad exit status: 2)
make -j4 KERNELRELEASE=6.1.0-20-amd64 -C /lib/modules/6.1.0-20-amd64/build M=/var/lib/dkms/alx-wol/2.0/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-20-amd64 (x86_64)
Consult /var/lib/dkms/alx-wol/2.0/build/make.log for more information.
#### FAILED installation of alx-wol version 2.0 ####

content of dkms log file

DKMS make.log for alx-wol-2.0 for kernel 6.1.0-20-amd64 (x86_64)
fri. 26 april 2024 23:18:23 CEST
make : entering repository « /usr/src/linux-headers-6.1.0-20-amd64 »
/usr/src/linux-headers-6.1.0-20-common/scripts/Makefile.build:44: /var/lib/dkms/alx-wol/2.0/build/alx/Makefile: File not found
make[2]: *** no rule to Make target « /var/lib/dkms/alx-wol/2.0/build/alx/Makefile ». stopping.
make[1]: *** [/usr/src/linux-headers-6.1.0-20-common/scripts/Makefile.build:505 : /var/lib/dkms/alx-wol/2.0/build/alx] Error 2
make: *** [/usr/src/linux-headers-6.1.0-20-common/Makefile:2035 : /var/lib/dkms/alx-wol/2.0/build] Error 2
make : leaving repository « /usr/src/linux-headers-6.1.0-20-amd64 »

[logs were manually translated]

i get a 404 while fetching some sources but i guess it comes from the failure in retrieving the kernel_version informations.

I'm not sure my problem is related to the 2.0, but when using 1.5, everything when flawlessly. I could try reinstalling the 1.5 but i would enjoy using the latest release

all directions are welcome

AndiWeiss commented 3 months ago

Hi there, your guess is correct, reason for this problem is the new mechanism of version 2.0. The reason is that since this version there is a mechanism which tries to get the kernel version and the used compiler out of the kernel binary to install. I didn't find another possibility to do that than extracting the version string out of the kernel and analyze this string. Point here is that this string can be defined during kernel configuration. Up to now my mechanism supports the Ubuntu kernels out of the regular update process and the Ubuntu kernels which can be downloaded. I already was thinking about the expansion to debian, but didn't do it up to now. I'll take a look on it - that shouldn't be a big deal. On the other hand - if you are experienced with bash, grep and sed you can take a look into three scripts: scripts/extract_kversion_string.sh scripts/extract_kversion.sh scripts/gcc_used.sh The first one extracts the string out of the kernel binary. It's a bit more complicated because the ubuntu kernel is compressed. But only official kernel tooling is used to do that. The second script extracts the kernel version out of the complete version string. This has to be adapted to other kernels than ubuntu. And the last script extracts the gcc version out of the string. All of these features can be tested without doing a kernel installation. Compared to the previous versions this mechanism has advantages and disadvantages: Disadvantage: it has to be able to extract the kernel version information Advantage: there's no need to keep the sources for the module. Instead the sources belonging to that kernel version are fetched and patched. As long as the configured patch applies the module gets build. Kind regards Andreas Weiss

arnaudclerc commented 3 months ago

I was able to emulate the variables extracted from your mentionned scripts and got it to work.

thank you for your switf reply. Best regards.

AndiWeiss commented 3 months ago

Hi, may I ask what you mean with 'emulated'? Did you add the extraction of the versions into the scripts? If yes: could you provide the changes? I could use and provide them ... Thank you in advance Kind regards Andreas Weiss