-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Broadcom WLAN work (e.g., for MacBooks) #78
Comments
Added the packages: Possibly additional configuration is needed as described above. |
Maybe we can get the firmware from the existing Ubuntu package. |
https://steemit.com/freebsd/@valkyr/freebsd-on-lenovo-ideapad-s10-feat-broadcom-bcm4312 Seems to be quite involved to get this thing running! |
Also see 93218c5 |
The 4312 does work on NomadBSD with some lines added to the loader.conf. I replaced the card with an Atheros, but I have a laptop where it is easy to switch, so I could do some testing once the firmware is added. |
How would one do that in the most straightforward way? (How does it work on NomadBSD?) Looking at https://github.com/nomadbsd/NomadBSD/blob/51c823f62993b14a5e2552c319191ccd38f1bbee/build.cfg#L83-L84 they are using
There is also
Where is the firmware actually contained? |
pkg info on my nomad system shows: bwn-firmware-kmod-0.1.2 (bwi is for an older broadcom chipset). I was going to try just copying the modules over and editing the loader.conf, but it appears modifying the run from usb system is non trivial. I might be able to scrounge anpther laptop HDD to try a full install on. |
Hint: You can also install helloSystem to a >= 8 GB USB stick rather than to an internal hard drive (I am typing this from one). |
I got a laptop I could do an install to the HDD on and tested with the Broadcom 4312 card. This card is a b/g, but I also have a 4313, which is the n version. I tried fetching ports, but the bwn-firmware-kmod port requires kernel source, so I stopped there. It looks like it also requires the b43-fwcutter port. I installed from 0.5.0_OE141-FreeBSD-12.2, so I copied the .ko files from my Nomad system (also 12.2 based) into /boot/modules. I added if_bwn_load="YES" and bwn_v4_lp_ucode_load="YES" to the loader.conf and rebooted and was able to configure the card and connect to the network. I tried bwn_v4_ucode_load first, but the error messages showed it was looking for the lp firmware. I'm on that laptop now. pciconf shows: |
Thanks for testing @dotdash70. Can you please give the exact names of the files you copied? |
bwn_v4_lp_ucode.ko |
Additional Notes: I tried the 4313 card, and that one is not supported under FreeBSD. |
If one has Ports installed:
Source: https://unix.stackexchange.com/a/595474 We would probably need to build that package ourselves, so that we can include it in the ISO. But first we need to understand the Legalese involved. To build a package: In the
then run
Rinse and repeat with |
On Mac mini Mid 2010 (
FreeBSD breakage? |
https://wiki.freebsd.org/IntelMacMini suggests (for MacMini3,1):
When doing this on FreeBSD 13.0-RELEASE based helloSystem 0.7.0, the boot loader complains about FreeBSD packaging bug? |
Coming back to do some testing with 7 G160 version based on FreeBSD 13.0 |
Thanks @dotdash70 for taking the time to check this out.
By default, helloSystem does not ship compilers and other developer-related tools. To get these, you need to install the Developer Tools from
This would be very helpful. You can put them into a zip and attach them here. Thanks! Could you also create pkg packages for b43-fwcutter and bwn-firmware-kmod using |
Here are the .ko files built from a FreeBSD 13.0-Release system: |
Thanks @dotdash70. This is very helpful. With making the pkg, i meant on FreeBSD 13. (helloSystem 0.7.0 is a preconfigured FreeBSD 13 with some additions, after all.) Running |
Had to edit the makefile as detailed earlier. Here is the result |
Thank you very much @dotdash70. |
I've tried loading the Broadcom driver for the BCM4321 on my MacBook 4,1, but it doesn't work. |
@Slater91 did you install the package from @dotdash70? There is one hardware probe that lists the BCM4321 in a MacBook4,1 as "works" with |
Yes, I have. I have read multiple discussions where people specifically said that you have to enable the flag in the kernel in order for the driver to work. I'll post the links as soon as I find them again.
Here is the /var/log/messages log: |
Did you find any reason why this flag is apparently not enabled by default in the FreeBSD kernel then? In helloSystem we want to use the official kernels provided by the FreeBSD project. So my question is, why is the FreeBSD project not setting the flag in the kernel. If we can't find obvious downsides of using that kernel configuration, then possibly we should open a ticket at https://bugs.freebsd.org/ requesting a change in the default FreeBSD kernel configuration. |
Unfortunately, my test kit consists of a 4312 (works) and a 4313 (does not work). A quick search seems to indicate the 4321 may not be supported, or may require additional steps. Landon Fuller's page shows only the dual-band version being supported under bwn, with the caveat 'The optional bwn(4) PHY driver is derived from b43 GPL code, and must be explicitly enabled.' I'm not sure exactly what that entails, having never had to do it. I'm not sure what deficiencies you are finding in the FreeBSD docs, but I have always found them very helpful. Kernel configuration is right in the handbook. https://docs.freebsd.org/en/books/handbook/kernelconfig/ If helloSystem is using the GENERIC kernel, you could use that as a base, but if there are any customizations in the kernel, you would need to include those as well. |
Came across this post with detailed instructions on how to compile a kernel with BWN_GPL_PHY here: |
That is what I was fearing. What I don't understand, though: Why does the Broadcom kernel module need a special configuration (apparently with Broadcom proprietary parts?) of the kernel itself in order for it to work? Isn't the whole point of a kernel module to keep certain things out of the kernel itself? |
A bit beyond me, but from looking over Landon's page, the Broadcom chipsets seem to have a lot of variation of parts, and some currently only work with by replacing the PHY bits with those borrowed from the Linux GPL version. I guess that needs to be done at the kernel level. https://svnweb.freebsd.org/base?view=revision&revision=326841 |
I can confirm that enabling "BWN_GPL_PHY" in the kernel build options leads to a working WiFi chip.
helloSystem comes without kernel sources and finding instructions on how to download them wasn't easy, also due to the (relatively recent) change from SVN to Git. Most discussions I've found said "if you don't have the sources installed there's something wrong and you probably need to reinstall", which is not really helpful. In general, what I've seen of FreeBSD documentation is either very basic, or incomplete, or assuming that you already know most things, which is incredibly hostile towards newcomers. I don't want to start an in-depth discussion here about this, I'm just reporting my experience as a Linux system administrator with some experience. |
https://twitter.com/Ericbsd/status/1488879439731695623
Does this mean that technically it works but there is no way to distribute the working kernel in binary form legally? |
A major issue I've found is that the driver randomly stops working. It simply brings everything down and I have found no way to make it work without a reboot; it would just try to connect and fail ("4-way handshake failed, the secret provided is not correct" without any changes made to anything!), then rinse and repeat ad libitum. I've found similar issues on the FreeBSD forums with no solutions. |
@probonopd I don't think it is illegal, but to have most BWN drivers working correctly, you have to build the kernel with BWN_GPL_PHY in the GENERIC, and vanilla FreeBSD tries to avoid having GPL code installed by default. It is one of the reasons I compile my own FreeBSD source code for GhostBSD. |
As far as I know, distributing it is at the very least legally dubious. You would effectively be distributing GPL code as a fundamental part of a program that was licensed as BSD, which theoretically means that the whole code base would be relicensed to GPL. Which is, from a legal perspective, a bit of a nightmare. This is why vanilla FreeBSD tries to avoid having GPL code installed by default, because the GPL is more restrictive and it's viral. |
Maybe if the FreeBSD project would ask the authors of the Broadcom kernel module nicely and explain the situation, then possibly the authors of the Broadcom kernel module might consider to dual-license it under a BSD License? Or has it been tried before? |
If we are using the driver provided by open BSD, this is seen from the Internet. |
https://forum.nomadbsd.org/t/1-3-1-mac-on-macbook-pro-2011-17/32 |
So, does it work on NomadBSD now? |
https://unix.stackexchange.com/questions/595446/configuring-bcm4360-macbook-air-on-freebsd-to-connect-to-wifi
The text was updated successfully, but these errors were encountered: