How to apply a patch for Broadcom 5715S

Warren Block wblock at wonkity.com
Thu Dec 17 00:40:00 UTC 2009


On Wed, 16 Dec 2009, Joe S wrote:

> I have the same problem as reported in this bug:
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=122551
>
> Someone attached a patch to the bug that resolves the problem.
>
> I don't know how to apply the patch.
>
> Can someone please show me how?

Okay, but realize this is a potentially dangerous operation.  Read the 
man page for patch(1) and the Handbook section on kernel configuration. 
Also, that patch is from a user and may not be of the same quality as if 
it were officially part of the FreeBSD source tree.

That said, download the patch.  It's called patch1.diff.

The first three lines show which file will be patched: 
sys/dev/bge/if_bgereg.h

On a normal FreeBSD system, system source file paths are relative to 
/usr/src.  So, as root:

cd /usr/src
patch < patch1.diff

You should see messages about patch hunks succeeding.  If there were no 
errors, you can build from the now-patched source.  This patch is to an 
Ethernet driver, so you probably only need to rebuild the kernel.  See 
the Handbook for custom kernel building and installing:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html

If you don't have a custom kernel, you don't need the KERNCONF= entries, 
or can use KERNCONF=GENERIC.

Finally, reboot and hope it works.

-Warren Block * Rapid City, South Dakota USA


More information about the freebsd-questions mailing list