You are not logged in.

#1 2015-10-30 12:53:26

vlast777
Member
Registered: 2015-02-10
Posts: 57

Building and Loading Module

Hey there,

unfortunately my Acer Notebooks WIFI Card ist not working very well with the drivers from the official repos, so I am using one from an unofficial user repository.

I added it to my pacman.conf (the repo) and if I need to (re)install the driver, I use yaourt.

Now the problem is, everytime the Linux Kernel gets updatet, the driver stops working (obviously) and I need to reinstall it.
At the moment I pick my ethernet cabel and reinstall the driver via LAN, using yaourt.

Now during university this way is kind of complicated since there are no ethernet ports around. I thought of downloading the manually (without yaourt) before updating the kernel, then make the update and then build and load the module I downloaded before afterwards.

I am not quite sure how this works. Inside the pkg.tar.gz file there are 2 folders and 3 hidden files:

usr
etc
.INSTALL
.PKGINFO
.MTREE

inside the usr folder, there is a src folder with a MAKEFILE.

Now what is the easiest way, to build and load the module? Change to the src directory, execute "make" and load the *.mod file?
Where do I need to store it?
I read that kernel moduls are stored in /usr/lib/module/kernel_release but I can't find where it is stored at the moment, since there are other folders like that:

[martin@Saturn 4.2.4-1-ARCH]$ ls
build          modules.alias.bin    modules.dep.bin  modules.symbols
extramodules   modules.builtin      modules.devname  modules.symbols.bin
kernel         modules.builtin.bin  modules.order
modules.alias  modules.dep          modules.softdep

I don't know where to put the file and if it is only the .mod file which needs to be put there or others as well. sad

I am a bit messed up...

Last edited by vlast777 (2015-10-30 12:56:10)

Offline

#2 2015-10-30 13:20:53

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: Building and Loading Module

vlast777 wrote:

I am not quite sure how this works. Inside the pkg.tar.gz file there are 2 folders and 3 hidden files:

usr
etc
.INSTALL
.PKGINFO
.MTREE

Are you sure that's not a .pkg.tar.xz file? Because according to those files, it seems like an Arch Linux package file, and should be installable with

pacman -U nameofthepackage.pkg.tar.xz

so there is no need to build anything.

Kernel modules are indeed in /lib/modules/4.2.4-1-ARCH/kernel/drivers, but they usually have the extension .ko (kernel object). You should able to load them using the `modprobe` command.

Last edited by ayekat (2015-10-30 13:22:07)


pkgs │ hacks │ cfg │ blag

Offline

#3 2015-10-30 13:40:26

vlast777
Member
Registered: 2015-02-10
Posts: 57

Re: Building and Loading Module

ayekat wrote:
vlast777 wrote:

I am not quite sure how this works. Inside the pkg.tar.gz file there are 2 folders and 3 hidden files:

usr
etc
.INSTALL
.PKGINFO
.MTREE

Are you sure that's not a .pkg.tar.xz file? Because according to those files, it seems like an Arch Linux package file, and should be installable with

pacman -U nameofthepackage.pkg.tar.xz

so there is no need to build anything.

Kernel modules are indeed in /lib/modules/4.2.4-1-ARCH/kernel/drivers, but they usually have the extension .ko (kernel object). You should able to load them using the `modprobe` command.

You are right!

It IS a .pkg.tar.xz file.

If I installed it using the pacman -U command, is the module loaded automatically? Or do I need to load it manually? Because I want it to be loaded at boot, not load it manually after every restart.

Last edited by vlast777 (2015-10-30 13:41:05)

Offline

#4 2015-10-30 13:42:35

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: Building and Loading Module


pkgs │ hacks │ cfg │ blag

Offline

#5 2015-10-30 13:50:09

vlast777
Member
Registered: 2015-02-10
Posts: 57

Re: Building and Loading Module

ayekat wrote:

Okay, that seems simple.

But how do I get to know the exact name of the module, to put it in the /etc/modules-load.d/myModule.conf file?

Offline

#6 2015-10-30 13:57:04

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: Building and Loading Module

Well... I don't know what module you need. How did you determine that you need that particular package to get your WiFi working in the first place?

You could check the output of

pacman -Ql nameofthepackage

to see what modules it installs to /lib/modules/...


pkgs │ hacks │ cfg │ blag

Offline

#7 2015-10-30 13:59:44

vlast777
Member
Registered: 2015-02-10
Posts: 57

Re: Building and Loading Module

ayekat wrote:

Well... I don't know what module you need. How did you determine that you need that particular package to get your WiFi working in the first place?

You could check the output of

pacman -Ql nameofthepackage

to see what modules it installs to /lib/modules/...

because someone on the forums had the exact same problem with the same hardware device and suggested to use that package, which indeed solved the problem.

Okay, I am going to check this.

Offline

#8 2015-10-30 14:04:58

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: Building and Loading Module

OK, out of curiosity, what's the name of the network card, the name of the package we're talking about, and the link to the forum post that tells you to do this?


pkgs │ hacks │ cfg │ blag

Offline

#9 2015-10-30 14:07:36

vlast777
Member
Registered: 2015-02-10
Posts: 57

Re: Building and Loading Module

ayekat wrote:

OK, out of curiosity, what's the name of the network card, the name of the package we're talking about, and the link to the forum post that tells you to do this?

Thread: https://bbs.archlinux.org/viewtopic.php?id=193129

WiFi Card: Broadcom BCM43142

Package Name: broadcom-wl-dkms-6.30.223.141-13-x86_64.pkg.tar.xz

Repository: http://archlinuxgr.tiven.org/archlinux/$arch

Offline

#10 2015-10-30 15:11:39

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: Building and Loading Module

Alright, it's a DKMS package. I'm haven't got any experience with those. hmm


pkgs │ hacks │ cfg │ blag

Offline

Board footer

Powered by FluxBB