You are not logged in.

#1 2017-02-22 21:06:45

nannerpussy
Member
Registered: 2017-02-15
Posts: 96

modprode at boot, manually, or convert .deb? Driver question.

I've got an old Realtek 2880 (RT2880) wlan usb adapter that has a couple physical modifications on it for a special purpose (which is why I don't just toss it and buy one with working linux drivers). What I did was go to the Debian page (https://wiki.debian.org/rt2800usb) which was the only place I found with a build package (.deb) and full info for it, which then got me to the kernel.org page for the device (https://wireless.wiki.kernel.org/en/use … /rt2800usb). I cloned the git and before I went further, I need to try and understand the best way to go about adding this into my existing firmware in /usr/lib/firmware so it can auto load on boot. I went to our Wiki and checked out the kernel modules page (https://wiki.archlinux.org/index.php/Kernel_modules) and it seems I have a couple choices here, but before I go messing with my kernel I wanted to know if I'm going to fuck myself:

I can create a .conf with "rtl2880" (or the exact name of the binary blob) for it and put it in  /etc/modules-load.d/ so it's explicitly loaded at boot by systemd and udev - this is discouraged by the official man page though (http://man7.org/linux/man-pages/man5/mo … d.d.5.html)

I can manually load it up with modprobe, which I'm pretty sure is exactly the same as having it load at boot, only obviously it's by hand. And then I guess I could write a little bash script to modprobe it when I need it.

I could also try and convert the Debian .deb package containing just the driver with the pacman tool to do that (know I saw it in the repo), but I don't know much about .deb and compatibility with pacman when it comes to firmware drivers like this. It might not even be possible/allowed.

Right now I have the cloned repo and ran a diff on it against my current firmware directory just to see. The cloned repo has the same structure as /usr/lib/firmware/, just with the RTL drivers in there, but I know we use a custom kernel and am worried about consequences of merging the two or just throwing my directory with the driver in there and running (I think) the mkinitcpio to rebuild with that in it only to then boot into oblivion. I know it would help a ton if I understood the early boot process and kernels and how it comes together, but I'm working on that big_smile

These are probably some pretty dumb questions, but what would be the best way to go about it? If I can get it to load during boot without a problem and verify it works for the adapter I'd like to also do a PKGBUILD out of the binary and add it to the AUR for anyone else who may need it, but not sure if that would just be a terrible idea for something so critical like a driver.

Offline

#2 2017-02-22 22:16:47

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: modprode at boot, manually, or convert .deb? Driver question.

$ modinfo rt2800usb
filename:       /lib/modules/4.9.11-1-ARCH/kernel/drivers/net/wireless/ralink/rt2x00/rt2800usb.ko.gz
license:        GPL
firmware:       rt2870.bin
description:    Ralink RT2800 USB Wireless LAN driver.
version:        2.3.0
author:         http://rt2x00.serialmonkey.com
srcversion:     79C8FF0D61161719C1D2E53
...

The driver you would be building is already in the kernel as supplied by the linux package and via udev it should be loaded when relevant hardware is connected.

Online

#3 2017-02-22 22:41:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: modprode at boot, manually, or convert .deb? Driver question.

+1 for what loqs said.  Just boot to the stock kernel with the hardware removed.  Then insert the hardware.  Post the out of dmesg here.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2017-03-07 15:32:47

nannerpussy
Member
Registered: 2017-02-15
Posts: 96

Re: modprode at boot, manually, or convert .deb? Driver question.

Shit, lost track of the week and forgot, sorry about the late response here. My dmesg output is telling me the issue is not with my device or driver, but rather this Gigabyte AMD board that I've had so many other problems with regarding linux and USB and WatchDog. I could be wrong though, this is the gist of the dmesg:

[159552.109812] usb 7-3: new full-speed USB device number 10 using ohci-pci
[159552.253148] usb 7-3: device descriptor read/64, error -62
[159552.503166] usb 7-3: device descriptor read/64, error -62
[159552.749849] usb 7-3: new full-speed USB device number 11 using ohci-pci
[159552.893190] usb 7-3: device descriptor read/64, error -62
[159553.143204] usb 7-3: device descriptor read/64, error -62
[159553.389902] usb 7-3: new full-speed USB device number 12 using ohci-pci
[159553.803235] usb 7-3: device not accepting address 12, error -62
[159553.943233] usb 7-3: new full-speed USB device number 13 using ohci-pci
[159554.356626] usb 7-3: device not accepting address 13, error -62
[159554.356670] usb usb7-port3: unable to enumerate USB device
[159555.776703] usb 7-3: new full-speed USB device number 14 using ohci-pci
[159555.920059] usb 7-3: device descriptor read/64, error -62
[159556.170063] usb 7-3: device descriptor read/64, error -62
[159556.416765] usb 7-3: new full-speed USB device number 15 using ohci-pci
[159556.560012] usb 7-3: device descriptor read/64, error -62
[159556.810106] usb 7-3: device descriptor read/64, error -62
[159557.056711] usb 7-3: new full-speed USB device number 16 using ohci-pci
[159557.470147] usb 7-3: device not accepting address 16, error -62
[159557.610169] usb 7-3: new full-speed USB device number 17 using ohci-pci
[159558.023529] usb 7-3: device not accepting address 17, error -62
[159558.023572] usb usb7-port3: unable to enumerate USB device
[159558.246798] usb 7-3: new full-speed USB device number 18 using ohci-pci
[159558.390221] usb 7-3: device descriptor read/64, error -62
[159558.640238] usb 7-3: device descriptor read/64, error -62
[159558.886922] usb 7-3: new full-speed USB device number 19 using ohci-pci
[159559.030246] usb 7-3: device descriptor read/64, error -62
[159559.280203] usb 7-3: device descriptor read/64, error -62
[159559.526882] usb 7-3: new full-speed USB device number 20 using ohci-pci
[159559.940323] usb 7-3: device not accepting address 20, error -62
[159560.083637] usb 7-3: new full-speed USB device number 21 using ohci-pci
[159560.497028] usb 7-3: device not accepting address 21, error -62
[159560.497074] usb usb7-port3: unable to enumerate USB device
[159560.717041] usb 7-3: new full-speed USB device number 22 using ohci-pci

plus about 100 more lines of the same. I know I have OHCI and XHCI passthrough enabled right now and have made some BIOS changes when diagnosing other USB issues I had with VirtualBox/QEMU. I am going to flash it back to the most recent non-beta version and leave the settings alone and see if it changes. This board has been a problem since moving to Linux last year, not an Arch-specific issue though.

Offline

Board footer

Powered by FluxBB