Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] - Compiling external driver for kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sayusi
n00b
n00b


Joined: 10 Aug 2006
Posts: 26
Location: Hungary

PostPosted: Mon Aug 20, 2018 12:32 pm    Post subject: [Solved] - Compiling external driver for kernel Reply with quote

Hi,

I have an TP-LINK T4U V2 wifi adapter installed successfully. I'm at the point I would like to update the kernel, using the linux-4.14.63-gentoo-r1 instead of 4.14.61-gentoo. Accodring to the driver description I should log in into the directory and run make clean, make, make install and everything is fine. It is not.

This is the output I get:

Code:

localhost ~/rtl8812AU_8821AU_linux # cd /root/rtl8812AU_8821AU_linux/
localhost ~/rtl8812AU_8821AU_linux # make clean
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.14.61-gentoo/build M=/root/rtl8812AU_8821AU_linux clean
make[1]: *** /lib/modules/4.14.61-gentoo/build: No such file or directory.  Stop.
make: *** [Makefile:1605: clean] Error 2
localhost ~/rtl8812AU_8821AU_linux # make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.14.61-gentoo/build M=/root/rtl8812AU_8821AU_linux  modules
make[1]: *** /lib/modules/4.14.61-gentoo/build: No such file or directory.  Stop.
make: *** [Makefile:1584: modules] Error 2
localhost ~/rtl8812AU_8821AU_linux #


What I did so far to workaround this issue:

  • set the kernel version to the desired version:
    Code:

    localhost ~/rtl8812AU_8821AU_linux # eselect kernel list
    Available kernel symlink targets:
      [1]   linux-4.14.63-gentoo-r1 *
    localhost ~/rtl8812AU_8821AU_linux #

  • deleted the previous kernel directory in /usr/src
    Code:

    localhost ~/rtl8812AU_8821AU_linux # ls -l /usr/src/
    total 4
    lrwxrwxrwx  1 root root   23 Aug 20 15:35 linux -> linux-4.14.63-gentoo-r1
    drwxr-xr-x 26 root root 4096 Aug 20 15:50 linux-4.14.63-gentoo-r1
    localhost ~/rtl8812AU_8821AU_linux #

  • deleted the driver directory and fetched from github again, my aim doing this was that, every modified file will be deleted. Result: the same, the source code still wants to go to the old kernel directory.
    Code:
     localhost ~/rtl8812AU_8821AU_linux # make -d clean

    Output is here.


My questions:

  • does make cache the path to the kernel values?
  • where can I find them?
  • how can I delete them if make clean does not work?

_________________
- -
-- Csanyi Andras/Sayusi Ando -- http://sayusi.hu -- http://facebook.com/andras.csanyi
-- "Trust in God and keep your gunpowder dry!!" - Cromwell


Last edited by sayusi on Mon Aug 20, 2018 1:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54295
Location: 56N 3W

PostPosted: Mon Aug 20, 2018 12:41 pm    Post subject: Reply with quote

sayusi,

Code:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.14.61-gentoo/build M=/root/rtl8812AU_8821AU_linux clean


Is it trying to build against the running kernel?
What does
Code:
uname -r
tell?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sayusi
n00b
n00b


Joined: 10 Aug 2006
Posts: 26
Location: Hungary

PostPosted: Mon Aug 20, 2018 12:43 pm    Post subject: Reply with quote

It uses still the old kernel.

Code:

localhost /home/sayusi # uname -r
4.14.61-gentoo


I'm going to reboot it.
_________________
- -
-- Csanyi Andras/Sayusi Ando -- http://sayusi.hu -- http://facebook.com/andras.csanyi
-- "Trust in God and keep your gunpowder dry!!" - Cromwell
Back to top
View user's profile Send private message
sayusi
n00b
n00b


Joined: 10 Aug 2006
Posts: 26
Location: Hungary

PostPosted: Mon Aug 20, 2018 12:52 pm    Post subject: Reply with quote

The driver source code uses the running kernel for compiling - which is not good as you need access to the machine to compile the driver for the new kernel. It will be a bug ticket for the maintainer. It works fine.
_________________
- -
-- Csanyi Andras/Sayusi Ando -- http://sayusi.hu -- http://facebook.com/andras.csanyi
-- "Trust in God and keep your gunpowder dry!!" - Cromwell
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum