WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Smallest possible WiFi setup (Broadcom 4352)?  (Read 2539 times)

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Smallest possible WiFi setup (Broadcom 4352)?
« on: February 03, 2020, 07:54:47 PM »
Hi folks-
I'm wondering what the best way to get my Broadcom 4352 card running with minimally-sized extensions is.

Currently, I install wl-modules (with blacklist=b43, blacklist=ssb, blacklist=bcma) and wifi.tcz, but those are fairly large (wl ~ 2.1MB and wireless ~ 3.2MB)

If I want to tailor the WiFi driver / firmware for my exact WiFi card and thus hopefully reduce the size of what I need to install, how might I go about this?

Thanks,
R


Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: Smallest possible WiFi setup (Broadcom 4352)?
« Reply #1 on: February 03, 2020, 08:30:43 PM »
EDIT: I see I can remove hardware-specific drivers from wireless-KERNEL.tcz to make it smaller, but I don't see how to do the same / similar for wl-KERNEL.

Any advice appreciated,
R

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Smallest possible WiFi setup (Broadcom 4352)?
« Reply #2 on: February 03, 2020, 09:10:54 PM »
Hi flyingfishfinger
I don't think there's much you can do about  wl-KERNEL.  If you look at the  .info  file it says the source comes from:
https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz

If you look inside that tarball under  lib  you'll find a 6 Megabyte binary blob supplied by Broadcom that appears to have the drivers
built into it. There appears to be a little glue code that gets linked in to allow the kernel to load it. I don't think you can separate the
drivers. The squash filesystem shrinks it down to about 2.6 Megabytes.

Maybe Juanito can provide some more insight.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14788
Re: Smallest possible WiFi setup (Broadcom 4352)?
« Reply #3 on: February 04, 2020, 01:48:59 PM »
As far as I'm aware that's correct

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: Smallest possible WiFi setup (Broadcom 4352)?
« Reply #4 on: February 10, 2020, 01:51:31 PM »
Hi,
Can you help me figure what I can safely remove from wireless-KERNEL.tcz please?

So far I removed all directories that aren't "broadcom" from kernel/drivers/net/wireless, but there are three modules in the root of that directory ("ray_cs.ko.gz, rndis_wlan.ko.gz, wl3501_cs.ko.gz"). Can I remove those / what do they do?

Same for the directory kernel/net/wireless (it has cfg80211, lob80211, lib80211_crypt.ccmp, lib80211_crypt_tkip and lib80211_crypt_wep) - those sound like I need them; as well as kernel/net/mac80211 (mac80211.ko.gz).

Thanks,
R

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Smallest possible WiFi setup (Broadcom 4352)?
« Reply #5 on: February 10, 2020, 03:12:02 PM »
Hi flyingfishfinger
... So far I removed all directories that aren't "broadcom" from kernel/drivers/net/wireless, but there are three modules in the root of that directory ("ray_cs.ko.gz, rndis_wlan.ko.gz, wl3501_cs.ko.gz"). Can I remove those / what do they do? ...
ray_cs.ko.gz --------- Raytheon 2.4 Ghz PCMCIA card
rndis_wlan.ko.gz ---- USB adapters containing a Broadcom 4320
wl3501_cs.ko.gz --- PCMCIA cards made by Planet

Quote
Same for the directory kernel/net/wireless (it has cfg80211, lob80211, lib80211_crypt.ccmp, lib80211_crypt_tkip and lib80211_crypt_wep) - those sound like I need them; as well as kernel/net/mac80211 (mac80211.ko.gz).
It's hard to say if those are needed without more information. Post the the result of this:
Code: [Select]
lsmod | head -n 1 > lsmod.txt
lsmod | tail -n +2 | sort >> lsmod.txt

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: Smallest possible WiFi setup (Broadcom 4352)?
« Reply #6 on: February 11, 2020, 03:31:39 PM »
Hi,
Connected to WiFi; the first lsmod command is empty. The second results in this:

Code: [Select]
ac                     12288  0
backlight              12288  1 video
battery                16384  0
cfg80211              167936  1 wl
cpufreq_conservative    12288  0
cpufreq_powersave      12288  0
cpufreq_userspace      12288  0
int340x_thermal_zone    12288  1 processor_thermal_device
intel_pch_thermal      12288  0
intel_soc_dts_iosf     12288  1 processor_thermal_device
iosf_mbi               12288  1 intel_soc_dts_iosf
loop                   20480 24
pcspkr                 12288  0
processor_thermal_device    12288  0
r8169                  49152  0
serio_raw              12288  0
squashfs               28672 12
ums_realtek            12288  0
video                  28672  0
wl                   6033408  0
xhci_hcd               86016  1 xhci_pci
xhci_pci               12288  0
xxhash                 16384  1 zstd_decompress
zstd_decompress        53248  1 squashfs

-> Looks like only the cfg80211 module is loaded. But does actually mean I can remove the rest?

Other related questions:
- In the same wireless module, can I remove the drivers/net/wireless/broadcom/b43 folder since it's being blacklisted at boot time anyway? In the same vein, what modules do "blacklist=bcma" and "blacklist=ssb" prevent from loading & where are they located (i.e can I remove them)? Which of the other two folders (b43legacy & brcm80211) are actually loaded?

- The openssl.tcz is huge at 1.1MB alone, but appears to be a dependency of the wifi. Any way to reduce that?

Thanks,
R
« Last Edit: February 11, 2020, 03:34:50 PM by flyingfishfinger »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Smallest possible WiFi setup (Broadcom 4352)?
« Reply #7 on: February 11, 2020, 05:49:42 PM »
Hi flyingfishfinger
... Connected to WiFi; the first lsmod command is empty. ...
Actually, the first command places this header from  lsmod  in the file:
Code: [Select]
Module                  Size  Used by    Tainted: PThe second command takes the output from  lsmod  without the header, then sorts it and appends it to the same file.

Quote
-> Looks like only the cfg80211 module is loaded. But does actually mean I can remove the rest?
As near as I can tell, your wireless connection is using  wl  and  cfg80211  while your wired connection is using  r8169.
In your current setup it should be safe to remove drivers that are not loaded. If you run additional programs which utilize the network
that are not currently running, that could change.

Quote
In the same vein, what modules do "blacklist=bcma" and "blacklist=ssb" prevent from loading & where are they located (i.e can I remove them)?
modinfo  and  grep  are your friends for locating modules:
Code: [Select]
tc@E310:~$ modinfo ssb | grep filename
filename:       /lib/modules/4.19.10-tinycore/kernel/drivers/ssb/ssb.ko.gz
tc@E310:~$ modinfo bcma | grep filename
filename:       /lib/modules/4.19.10-tinycore/kernel/drivers/bcma/bcma.ko.gz
tc@E310:~$

Quote
- The openssl.tcz is huge at 1.1MB alone, but appears to be a dependency of the wifi. Any way to reduce that?
Probably not.