Page 1 of 1

Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Thu Aug 27, 2020 2:23 pm
by bigpup

New WIFI hardware is constantly released and keeping up with the needed drivers, is always needing updated.
If the Puppy version does not have the driver. It will need to be compiled and installed.

There are two things needed for support of WIFI adapter devices.
Firmware
Driver

First find out what the WIFI hardware is.
Most Puppy versions have the program Pup-Sysinfo.
Pup-Sysinfo->Devices
In subsection PCI Devices or USB Devices there should be info about the WIFI hardware.

adapter detection.
In terminal

Code: Select all

lspci -nn | grep etwork

(then google for adapter source by code near end of output, i.e. [8086:3165])

This will tell you what specific kernel driver is needed to drive the hardware.

Kernel drivers are located in /lib/modules/(number name of kernel)/kernel/drivers/net/wireless
Example:
driver for a realtek rtl8192cu WIFI adapter for kernel 5.4.42-v7
/lib/modules/5.4.42-v7l/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192cu

The hardware driver may be in the kernel, but the firmware may be missing.

Check for missing firmware:

Code: Select all

dmesg | grep irmware

If any missing, google it or go to:
http://anduin.linuxfromscratch.org/BLFS/linux-firmware/
Then add to /lib/firmware (maybe put in subfolder?)

WIFI drivers have to be compiled for the specific kernel being used.

This is how to compile a WIFI driver.

Originally written by ozsouth with some editing by me, to hopefully make it easier to understand.
FULL CREDIT GOES TO ozsouth!!

With a non working internet connection. Needed files will have to be gotten from a working connection and copied into the none working Puppy.
Compiling has to be done in the nonworking Puppy.

Driver compiling:

Need 3-4GB ram or 2GB ram & a 2GB swap file/partition.

Need recent driver source file
Driver source files can be found here:
https://github.com/search?q=&type=
Search for driver needed.
The search may find, several of them, by different people. Read any info about each one. Some are specially made for specific hardware make/model. Others are for generally anything using that chip set.
.
.
Example:
rtl8192eu-master.zip for the Realtek rtl8192eu chip set.

Need devx sfs and kernel sources sfs for the puppy version needing the driver.

Boot into puppy requiring driver.
Load the devx sfs and kernel sources sfs.
unzip source code ( rtl8192eu-master.zip )
In ROX file manager, navigate to the produced directory.
Right click on open area of this directory.
Select window->terminal here.
Enter in terminal:

Code: Select all

make clean
& then run
make

If no errors, should produce .ko driver file i.e. 8192eu.ko
copy to a safe place.

Copy driver into appropriate folder
Example for Puppy with kernel being used 4.19.23
/lib/modules/4.19.23/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192eu
(need to create rtl8192eu directory and put 8192.ko file in it)
run depmod (& maybe modprobe).
If you save when quitting, driver also available next boot.
.
.
Example:
8192eu.ko for kernel 4.19.23 goes in
/lib/modules/4.19.23/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192eu
(need to create rtl8192eu directory and put 8192.ko file in it)
Then in terminal must run:

Code: Select all

depmod

to make driver available.
If usb WIFI adapter, plug it in (should detect) or if onboard adapter, run
In terminal:

Code: Select all

modprobe 8192eu

Re: Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Fri Oct 01, 2021 6:08 am
by williwaw
bigpup wrote: Thu Aug 27, 2020 2:23 pm

Originally written by ozsouth with some editing by me, to hopefully make it easier to understand.
FULL CREDIT GOES TO ozsouth!!

Can you link to the original?
tx


Re: Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Fri Oct 01, 2021 6:25 am
by ozsouth

@williwaw - I gave @bigpup some scatchy notes & answered a few questions, then he wrote up this most useful post.


Re: Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Fri Oct 08, 2021 7:33 am
by April

Code: Select all

root# lspci -nn | grep etwork
root# dmesg | grep irmware
ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
usb 2-5: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
root#

I'm not really understanding whats going on here . Should that ( lspci -nn | grep etwork) be "network" ? "irmware" be "Firmware?

I got the above mentioned .fw file and put it in /lib/firmware/ath9k_htc/
So do I still have to compile it ? There was no change on reboot and the adapter was and is working fine , slow but fine.? The "root# dmesg | grep -i firmware" still gives the same message.
Its a pretty old adapter.


Re: Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Fri Oct 08, 2021 8:00 am
by ozsouth

@April - those commands are my shorthand for grep -i network and grep -i firmware. With your missing firmware, just goes in /lib/firmware under appropriate subfolder (ath9k_htc ?), as is.


Re: Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Fri Oct 08, 2021 8:05 am
by April

Man it needs to be clear for anyone to follow this otherwise its just chatting and patting between each other

Code: Select all

root# lspci -nn | grep -i network
root# dmesg | grep -i firmware
ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
usb 2-5: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
root# 

It is in a subfolder--but I just noticed it had not been updated ,Ill try again

Ath9kDriver.jpg
Ath9kDriver.jpg (183.55 KiB) Viewed 3760 times

Re: Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Fri Oct 08, 2021 8:28 am
by April

It had not updated the file but I fixed that and tried again . Same result.

Would I not have to upload that firmware to the device itself?


Re: Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Fri Oct 08, 2021 9:59 am
by ozsouth

@April - no, the kernel accesses both the driver & firmware from the disk. So lets look at kernel & driver. Some devices need a specific range of kernels. What kernel are you using (run uname -r in a terminal)? As for driver, what does: lsmod | grep ath reveal?


Re: Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Sat Oct 09, 2021 1:50 am
by April

Code: Select all

root#  uname -r 
4.9.58
root# lsmod | grep ath
ath9k_htc              51942  0
ath9k                  99512  0
ath9k_common           21683  2 ath9k_htc,ath9k
ath9k_hw              406348  3 ath9k_htc,ath9k,ath9k_common
ath                    18386  4 ath9k_htc,ath9k_hw,ath9k,ath9k_common
mac80211              389569  3 ath9k_htc,ath9k_hw,ath9k
cfg80211              235925  5 ath9k_htc,mac80211,ath9k,ath,ath9k_common
root# 


Re: Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Sat Oct 09, 2021 5:28 am
by ozsouth

@April - not sure where to go from here. Driver has loaded fine & is working, albeit slowly. Firmware apparently not a major issue, if at all. The original post was targetting non-working adaptors.


Re: Compiling needed WIFI driver (if not already a topic for specific Puppy version)

Posted: Sat Oct 09, 2021 8:47 am
by April

Thats OK thanks . My interest was triggered because an error message appeared and I wondered what caused it.