Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Compiling drivers on a different kernel version than the one they are to be installed on

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
tomcass
Posts: 21
Joined: 2021-09-18 12:40
Has thanked: 1 time
Been thanked: 2 times

Compiling drivers on a different kernel version than the one they are to be installed on

#1 Post by tomcass »

I have a computer that I just updated the motherboard running Debian 9. The version of Debian I have doesn't support my network card (I219V) so I need to download and compile the drivers myself from the intel website. My original idea was just to put the source code on a USB stick and compile the driver on that computer but I started running into dependency problems which couldn't be solved (within a reasonable time) without internet access. I've seen suggestions on the internet to use a WiFi USB dongle or tethering but both of these solutions require drivers that I need internet access to download so I'd be in the same situation.

So my plan was to try and compile the drivers on another computer and put the module on a USB stick. I downloaded the appropriate header files but now I'm stuck. I've tried make with the -C flag specifying the headers I want to use, but I get the following error message:

Code: Select all

sudo make -C /usr/src/linux-headers-4.9.0-11-common/
make: Entering directory '/usr/src/linux-headers-4.9.0-11-common'
scripts/Makefile.build:44: scripts/basic/Makefile: No such file or directory
make[2]: *** No rule to make target 'scripts/basic/Makefile'.  Stop.
make[1]: *** [Makefile:445: scripts_basic] Error 2
make: *** No rule to make target 'scripts/link-vmlinux.sh', needed by 'vmlinux'.  Stop.
make: Leaving directory '/usr/src/linux-headers-4.9.0-11-common'
I noticed that the command doesn't work even with my current header directory so I know I'm running the wrong command but the problem is I have no idea what the right command is.

Can anyone help me out?

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Compiling drivers on a different kernel version than the one they are to be installed on

#2 Post by sunrat »

What directory is cwd when you run the make command? Exactly which driver are you trying to compile?

A quick web search reveals a few posts on different sites about getting this device working - https://duckduckgo.com/?q=debian+networ ... fcm&ia=web
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

tomcass
Posts: 21
Joined: 2021-09-18 12:40
Has thanked: 1 time
Been thanked: 2 times

Re: Compiling drivers on a different kernel version than the one they are to be installed on

#3 Post by tomcass »

The working directory I'm using is the driver directory in my home folder so ~/e1000e-3.8.4/src/ which is where the makefile is for the driver. I am trying to compile the e1000e driver from intel. I have done a similar search before and my conclusion was that I had to compile the driver myself as the kernel I am running doesn't support my card. I just need to know how to compile the driver using the kernel header files I downloaded rather than the latest ones. I don't do any programming so I don't know anything about compiling. I know it's probably just something simple as I am able to compile the drivers fine when running just make but when I try and change the kernel headers I am using with the -C flag I get those error messages.

It's so frustrating that I'm in this ridiculous situation of needing the drivers to access the internet so I can compile the drivers I need. I thought compiling the drivers on another computer using the headers from a different kernel version wouldn't be too difficult but I've asked this question on a couple of forums now and no one seems to know how to do it.

peter_irich
Posts: 1403
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation
Been thanked: 11 times

Re: Compiling drivers on a different kernel version than the one they are to be installed on

#4 Post by peter_irich »

It is possible install headers from the different kernels on on the same computer but then you will must edit
drivers source by hands to select desired headers.

Peter.

tomcass
Posts: 21
Joined: 2021-09-18 12:40
Has thanked: 1 time
Been thanked: 2 times

Re: Compiling drivers on a different kernel version than the one they are to be installed on

#5 Post by tomcass »

Ok thank you. I'm not entirely sure what I need to edit but I'll keep trying to figure it out. Thanks for the help.

Post Reply