WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: HP-2000 Ralink RT5390R Wireless Adapter  (Read 19412 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14798
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #60 on: June 28, 2019, 04:23:48 PM »
Search for your driver in the compiled source and make an extension out of it.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #61 on: June 29, 2019, 03:56:26 AM »
"make" = "make bzImage modules", it does more. Distro kernels have some patches, but regarding the compile speed it's that they enable so much stuff that a custom kernel won't.
The only barriers that can stop you are the ones you create yourself.

Offline mnemonic76

  • Newbie
  • *
  • Posts: 35
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #62 on: June 29, 2019, 12:04:13 PM »
Ok, so when I ran the command "make modules" what is the difference between that command and just simply "make"

Also, once I find the module are the steps the same as the above referenced post (Juanito)?

Sent from my SM-G950U using Tapatalk

Thanks,

mnemonic76

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14798
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #63 on: June 29, 2019, 12:43:39 PM »
As already stated, make will compile both the kernel and the kernel modules whereas make modules will only compile the kernel modules and thus take half as long.

Once you have your module you can either add it to your local copy of wireless-KERNEL, or make a separate extension.

Offline mnemonic76

  • Newbie
  • *
  • Posts: 35
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #64 on: June 29, 2019, 01:19:23 PM »
Sorry I am such a noob. I just haven't done this stuff before and it has been years since I was regularly using linux at the cli. I have always been strongly attracted to the idea of making old PCs (and laptops) run like new again with Linux. I am hoping to use TCL as a learning tool for bieng more solid with Linux, and I appreciate the help and patience you all have shown. I also really appreciate the sense of community with this relatively small user base (compared to Debian or Ubuntu) and really belive in the philosophy behind this project... This is what got me interested in Linux in the first place back around 1998.


Thanks,
Mnemonic76

Thanks,

mnemonic76

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14798
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #65 on: June 29, 2019, 01:39:21 PM »
No problem - have you found your kernel module?

Offline mnemonic76

  • Newbie
  • *
  • Posts: 35
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #66 on: June 29, 2019, 03:00:37 PM »
The laptop is sitting at my office. Won't be able to work on it until Monday am. I have another (older) laptop I am going to work on this weekend.

I will be sure to let you know on Monday what I run into.

Thanks,
Mnemonic76

Thanks,

mnemonic76

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14798
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #67 on: June 30, 2019, 05:23:18 AM »
Looking at this:
Code: [Select]
$ cat .config
...
CONFIG_RT2800PCI=m
CONFIG_RT2800PCI_RT33XX=y
# CONFIG_RT2800PCI_RT35XX is not set
CONFIG_RT2800PCI_RT53XX=y
..and this:
Code: [Select]
$ cat Kconfig:
...
config RT2800PCI_RT53XX
       bool "rt2800pci - Include support for rt53xx devices (EXPERIMENTAL)"
       default y
       ---help---
         This adds support for rt53xx wireless chipset family to the
         rt2800pci driver.
         Supported chips: RT5390CONFIG_WLAN_VENDOR_RALINK=y
..it looks like the rt5390 functionality is added to the rt2800pci driver rather than a separate rt5390pci driver being created.

From this:
Code: [Select]
$ modinfo rt2800pci.ko
...
depends:        rt2x00lib,rt2800lib,rt2800mmio,rt2x00mmio,rt2x00pci,eeprom_93cx6
..to be safe, it would be better to replace rt2800pci and all of the above drivers in your local copy of wireless-KERNEL.

Offline mnemonic76

  • Newbie
  • *
  • Posts: 35
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #68 on: July 01, 2019, 09:41:37 AM »
I have located:

home/tc/kernel/linux-4.19.10/drivers/net/wireless/ralink/rt2x00/rt2800pci.ko
/home/tc/kernel/linux-4.19.10/drivers/net/wireless/ralink/rt2x00/rt2800lib.ko
/home/tc/kernel/linux-4.19.10/drivers/net/wireless/ralink/rt2x00/rt2x00mmio.ko
/home/tc/kernel/linux-4.19.10/drivers/net/wireless/ralink/rt2x00/rt2800mmio.ko
/home/tc/kernel/linux-4.19.10/drivers/net/wireless/ralink/rt2x00/rt2x00pci.ko
/home/tc/kernel/linux-4.19.10/drivers/misc/eeprom/eeprom_93cx6.ko


What do I do with the .ko files?

« Last Edit: July 01, 2019, 09:49:38 AM by mnemonic76 »
Thanks,

mnemonic76

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14798
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #69 on: July 01, 2019, 11:16:31 AM »
Basically, you need to replace the files with the same name in the wireless-KERNEL extension to create your own personal extension.

First gzip and compress the files:
Code: [Select]
$ tce-load -i gzip advcomp
$ gzip /home/tc/kernel/linux-4.19.10/drivers/net/wireless/ralink/rt2x00/*.ko
$ advdef -z4 /home/tc/kernel/linux-4.19.10/drivers/net/wireless/ralink/rt2x00/*.ko.gz

Then, assuming wireless-KERNEL is already loaded, copy its contents to a temporary location:
Code: [Select]
$ mkdir /tmp/pkg
$ sudo cp -rp /tmp/tcloop/wireless-4.19.10-tinycore/usr /tmp/pkg

Then replace the files with your new ones and create a new extension:
Code: [Select]
$ tce-load -i squashfs-tools
$ sudo cp /home/tc/kernel/linux-4.19.10/drivers/net/wireless/ralink/rt2x00/*.ko.gz /tmp/pkg/usr/local/lib/modules/4.19.10-tinycore/kernel/drivers/net/wireless/ralink/rt2x00
$ cd /tmp
$ sudo mksquashfs pkg/ wireless-4.19.10-tinycore.tcz
$ sudo chown tc:staff wireless-4.19.10-tinycore.tcz
$ md5sum wireless-4.19.10-tinycore.tcz > wireless-4.19.10-tinycore.tcz.md5.txt

Finally copy the new extension to be used on the next reboot:
Code: [Select]
$ mkdir /mnt/sdb1/tce/optional/upgrade [adjust to suit your system]
$ cp /tmp/wireless-4.19.10-tinycore.tcz* /mnt/sdb1/tce/optional/upgrade

** keep eeprom_93cx6.ko in a safe place in case it is needed.

Offline mnemonic76

  • Newbie
  • *
  • Posts: 35
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #70 on: July 01, 2019, 12:35:46 PM »
Ok, did all the above.

Rebooted.

loaded the following: lspci, wireless-4.19.10-tinycore, wl-modules-4.19.10-tinycore, wifi

output of sudo wifi.sh

Code: [Select]
Found wifi device wlan0
Standby for scan of available networks...
wlan0     Interface doesn't support scanning : Network is down

Set to try a few times to obtain a lease.
Failed to connect.


Looks like progress...

Output of

Code: [Select]
tc@box:~$ sudo rfkill list
0: phy0: Wireless LAN
        Soft blocked: yes
        Hard blocked: no

Then:

Code: [Select]
tc@box:~$ sudo rfkill unblock wlan
tc@box:~$ sudo rfkill list
0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

then wifi.sh same result as above.

Then tried:

Code: [Select]
tc@box:~$ iwconfig
eth0      no wireless extensions.

ip_vti0   no wireless extensions.

lo        no wireless extensions.

tunl0     no wireless extensions.

dummy0    no wireless extensions.

wlan0     IEEE 802.11  ESSID:off/any 
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry short  long limit:2   RTS thr:off   Fragment thr:off
          Power Management:off

What is my next step?




Thanks,

mnemonic76

Offline mnemonic76

  • Newbie
  • *
  • Posts: 35
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #71 on: July 01, 2019, 12:38:12 PM »
Ok, see attachment for dmesg and lsmod below:

Code: [Select]

tc@box:~$ lsmod
Module                  Size  Used by    Not tainted
rt2800pci              12288  0
rt2800mmio             12288  1 rt2800pci
rt2800lib              73728  2 rt2800pci,rt2800mmio
rt2x00mmio             12288  2 rt2800pci,rt2800mmio
rt2x00pci              12288  1 rt2800pci
rt2x00lib              28672  5 rt2800pci,rt2800mmio,rt2800lib,rt2x00mmio,rt2x00pci
mac80211              237568  3 rt2800lib,rt2x00pci,rt2x00lib
cfg80211              167936  2 rt2x00lib,mac80211
eeprom_93cx6           12288  1 rt2800pci
cpufreq_conservative    12288  0
cpufreq_userspace      12288  0
cpufreq_powersave      12288  0
squashfs               28672 37
zstd_decompress        53248  1 squashfs
xxhash                 16384  1 zstd_decompress
loop                   20480 74
rtsx_pci_sdmmc         16384  0
mmc_core               65536  1 rtsx_pci_sdmmc
hp_wmi                 12288  0
sparse_keymap          12288  1 hp_wmi
wmi_bmof               12288  0
rtsx_pci_ms            12288  0
memstick               12288  1 rtsx_pci_ms
video                  28672  0
backlight              12288  1 video
pcspkr                 12288  0
ac                     12288  0
wmi                    16384  2 hp_wmi,wmi_bmof
battery                16384  0
serio_raw              12288  0
rtsx_pci               28672  2 rtsx_pci_sdmmc,rtsx_pci_ms
hp_wireless            12288  0
r8169                  49152  0
acpi_cpufreq           12288  0
[/code[]
Thanks,

mnemonic76

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14798
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #72 on: July 01, 2019, 12:49:45 PM »
Now we're making progress, but you need to load the firmware first and do not load wl-modules-4.19.10-tinycore as this is for broadcom hardware.

Load, in this order:

firmware-ralinkwifi
wifi

Offline mnemonic76

  • Newbie
  • *
  • Posts: 35
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #73 on: July 01, 2019, 12:52:12 PM »
Can I make those load OnBoot in that order?

Thanks,
Mnemonic76

Thanks,

mnemonic76

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11589
Re: HP-2000 Ralink RT5390R Wireless Adapter
« Reply #74 on: July 01, 2019, 12:54:51 PM »
Hi mnemonic76
Yes.