Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: BCM43224, BCM43225 and BCM4313 installation guide

  1. #1
    Join Date
    Sep 2008
    Location
    Belgium
    Posts
    52

    Default BCM43224, BCM43225 and BCM4313 installation guide

    Since the BCM43224, BCM43225, BCM4313 PCIe NIC (wireless card) drivers and firmware are not yet included in opensuse 11.3. I thought I would write a guide to help with the installation.

    The 2.6.34 kernel does not yet include the necessary brcm80211 drivers. They are scheduled for inclusion in the 2.6.37 kernel (Greg Kroah-Hartman). However these drivers are currently being developed and much of the functionality has already been implemented.

    I will explain how to compile and install the drivers below.
    1. Getting the source:

      We need the driver code as well as the firmware. These are located in the following git repositories:

      • git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
      • git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git

      You can install git using Yast, if you haven't already, and clone both repositories.
      Code:
      ~> git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
      ~> git clone git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git
      This will make a local copy of the source code repository.

    2. Building the driver:

      First instal the "kernel-devel" package. This contains code required for building the driver. This can be done using Yast.
      Then go to directory linux-next/drivers/staging/brcm80211. Here you will find a Makefile. We need to alter this file so that it can build the driver module for our kernel without having to compile and install the cloned new kernel.

      Add the following code to linux-next/drivers/staging/brcm80211/Makefile:

      Code:
      KDIR    := /lib/modules/$(shell uname -r)/build
      ccflags-y += -I$(SUBDIRS)/include -I$(SUBDIRS)/sys -I$(SUBDIRS)/phy
      
      default:
              echo $(PWD)
              $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) CONFIG_BRCM80211_PCI=y V=1 modules
      Then run make:
      Code:
      ~/linux-next/drivers/staging/brcm80211> make
      If there are no errors(there shouldn't be) this will build the brcm80211.ko driver module and place it in the linux-next/drivers/staging/brcm80211/ folder.

    3. Installing the driver:

      First we should copy the driver module to the proper module directory. (Only root can do this)

      Code:
      linux-next/drivers/staging/brcm80211 # cp brcm80211.ko /lib/modules/`uname -r`/
      We also need to install the firmware files in the proper directory.
      These can be found in the other repository (linux-firmware). (More information can be found in the linux-next/drivers/staging/brcm80211/README file.)

      Code:
      linux-firmware/brcm # mkdir /lib/firmware/brcm
      linux-firmware/brcm # cp brcm/bcm43xx* /lib/firmware/brcm
      linux-firmware/brcm # cd /lib/firmware/brcm
      /lib/firmware/brcm # ln -s bcm43xx-0-610-809-0.fw bcm43xx-0.fw
      /lib/firmware/brcm # ln -s bcm43xx_hdr-0-610-809-0.fw bcm43xx_hdr-0.fw
      Now we can insert the module into the running kernel and load it
      Code:
      linux-next/drivers/staging/brcm80211 # insmod /lib/modules/`uname -r`/brcm80211.ko
      linux-next/drivers/staging/brcm80211 # modprobe brcm80211


    You should now be able to configure your wireless card using Yast.

    Notes:
    This worked for me on a Dell precision M4500 running opensuse 11.3 with kernel 2.6.34.7-0.3-desktop.

  2. #2
    Join Date
    Mar 2010
    Location
    Paris, France
    Posts
    26

    Default Re: BCM43224, BCM43225 and BCM4313 installation guide

    Tjhanls for the guide.
    I get the following error message though :

    Code:
    windsoarer@linux-z9rs:~/Downloads/linux-next/drivers/staging/brcm80211> sudo make
    echo 
    
    make -C /lib/modules/2.6.34-12-desktop/build SUBDIRS=/home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211 CONFIG_BRCM80211_PCI=y V=1 modules
    make: *** /lib/modules/2.6.34-12-desktop/build: No such file or directory.  Stop.
    make: *** [default] Error 2
    Could you help ?
    Thanks

    Andre

  3. #3
    Join Date
    Sep 2008
    Location
    Belgium
    Posts
    52

    Default Re: BCM43224, BCM43225 and BCM4313 installation guide

    Quote Originally Posted by Windsoarer View Post
    Tjhanls for the guide.
    I get the following error message though :

    Code:
    windsoarer@linux-z9rs:~/Downloads/linux-next/drivers/staging/brcm80211> sudo make
    echo 
    
    make -C /lib/modules/2.6.34-12-desktop/build SUBDIRS=/home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211 CONFIG_BRCM80211_PCI=y V=1 modules
    make: *** /lib/modules/2.6.34-12-desktop/build: No such file or directory.  Stop.
    make: *** [default] Error 2
    That is probably because you don't have the development files installed corresponding to your kernel version. If you do
    Code:
    find /lib/modules/ -name build
    there probably won't be be a /lib/modules/2.6.34-12-desktop/build. You might have installed a devel package of a different version and the find command will then find this version its folder.

    The additions to the makefile automatically select the development files based on the version number of your running kernel. If these are not installed it will not be able to find the necessary files.

    (1) You should install the kernel-devel package with the same version numbers as your running kernel (In the software manager you can select a different package version) or (2) alternatively run the kernel version of which you have the devel-package installed. (You can select between different kernel-versions in the boot-screen. You can also set the default selected using: Yast->Boot Loader)

    I can't find kernel-desktop version 2.6.34-12 in my repositories so you might not be able to find the kernel kernel-desktop-devel (2.6.34-12) either. In any case the software manager will always install the kernel version corresponding to the devel package you installed since the later depends on the former. So solution (2) should always be applicable.

    You should also know that the driver might only work for the kernel it has been built. So if you switch kernel versions (Sometimes opensuse does this automatially after updates) you might have to repeat the build/install procedure for your new kernel. However, I don't fully understand how the kernel deals with version differences.

  4. #4
    Join Date
    Mar 2010
    Location
    Paris, France
    Posts
    26

    Default Re: BCM43224, BCM43225 and BCM4313 installation guide

    Thanks again. I followed option 1 and set all kernel packages to version 2.6.34.7-03
    Unfortunately, there is another error message now

    Code:
    /home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211/util/siutils.c:17:22: fatal error: typedefs.h: No such file or directory
    compilation terminated.
    make[4]: *** [/home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211/util/siutils.o] Error 1
    make[3]: *** [_module_/home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211] Error 2
    make[2]: *** [sub-make] Error 2
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/linux-2.6.34.7-0.3-obj/x86_64/desktop'
    make: *** [default] Error 2
    Andre

  5. #5
    Join Date
    Sep 2008
    Location
    Belgium
    Posts
    52

    Default Re: BCM43224, BCM43225 and BCM4313 installation guide

    Quote Originally Posted by Windsoarer View Post
    Thanks again. I followed option 1 and set all kernel packages to version 2.6.34.7-03
    Unfortunately, there is another error message now

    Code:
    /home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211/util/siutils.c:17:22: fatal error: typedefs.h: No such file or directory
    compilation terminated.
    make[4]: *** [/home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211/util/siutils.o] Error 1
    make[3]: *** [_module_/home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211] Error 2
    make[2]: *** [sub-make] Error 2
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/linux-2.6.34.7-0.3-obj/x86_64/desktop'
    make: *** [default] Error 2
    I know what the problem is but can't say what causes it. The compiler can't find the header-files (*.h) because it is not looking in the right directories. This line tells the compiler where to look:

    Code:
    ccflags-y += -I$(SUBDIRS)/include -I$(SUBDIRS)/sys -I$(SUBDIRS)/phy
    The $(SUBDIRS) variable isn't expanding to the correct path for some reason. (I'm not a make-expert)

    I think that replacing the relative paths with your full path should fix your problem.

    Code:
    ccflags-y += -I/home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211/include -I/home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211/sys -I/home/windsoarer/Downloads/linux-next/drivers/staging/brcm80211/phy
    Could you send me your Makefile so I can figure out what the problem is?

  6. #6

    Default Re: BCM43224, BCM43225 and BCM4313 installation guide

    Hi,

    I followed your guide to install the brcm driver on the 2.6.34.7-03-desktop kernel

    However, when I insert the module, this error pops up:
    Code:
    cpf@loki:/lib/firmware/brcm> sudo insmod /lib/modules/`uname -r`/brcm80211.ko
    insmod: error inserting '/lib/modules/2.6.34.7-0.3-desktop/brcm80211.ko': -1 Unknown symbol in module
    So something must've gone wrong with the compilation or linking.

    I have no idea to fix this, and help would be very appreciated!

  7. #7

    Default Re: BCM43224, BCM43225 and BCM4313 installation guide

    Since I didn't find an edit button...

    It seems a reboot solved the issues. I'm now posting this on wireless, and networkmanager reports brcm80211 as the current driver.

    Ends well, all well

  8. #8
    Join Date
    Sep 2008
    Location
    Belgium
    Posts
    52

    Default Re: BCM43224, BCM43225 and BCM4313 installation guide

    Great! "Unknown symbol in module" means the module loader can't find some of the required datastructures or procedures the module requires. When the linker linked the different parts of the module together it also included some required references in the module to symbols representing kernel procedures or structures. This mismatch happens because the kernel the module is being loaded into does not provide the symbols the kernel the module was compiled and linked for did. I'm guessing the kernel you were running at the time did not match the one you compile the driver for.

    I'm getting fairly frequent kernel freezes by the way. Which shows the driver isn't stable yet. If a driver craches the kernel can't interrupt it like with a regular program so manual reboot is the only possibility. I suggest frequently pulling new revisions with git and recompiling.

  9. #9

    Default Re: BCM43224, BCM43225 and BCM4313 installation guide

    Currently I removed the brcm driver because it only provided me with a 1MB/s link, which is way too slow considering I use this laptop for work.

    I guess I'll wait for the open source driver to mature first, give them time to grow.

  10. #10
    Join Date
    Jun 2008
    Location
    Kansas City Area, Missouri, USA
    Posts
    7,235

    Default Re: BCM43224, BCM43225 and BCM4313 installation guide

    On 10/17/2010 03:06 AM, mteugels wrote:
    >
    > Currently I removed the brcm driver because it only provided me with a
    > 1MB/s link, which is way too slow considering I use this laptop for
    > work.
    >
    > I guess I'll wait for the open source driver to mature first, give them
    > time to grow.


    At present, there are no plans to implement the open-source driver (b43) for the
    devices handled by brcm80211. There is a fundamental difference between the
    types of cards handled by the two drivers. Your wait for b43 may be infinite.

Page 1 of 4 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •