Based on http://learningsolaris.com/archives/2009/03/10/opensolaris-wifi-broadcom-bcm4312-on-dell-vostro-1710/

All modifications in red


Posted on Tuesday, March 10th, 2009 at 6:52 pm.

Opensolaris & wifi Broadcom BCM4312 on Dell Vostro 1710 e


The steps of the procedure can be found in various places but I like to summarize the information my own way.

Starting point : OpenSolaris 2008.11 snv_101a_rc1b X86 The procedure seems to be valid for build 101 to 105 (Crossbow requires some small changes)
Problem : there are no native drivers available for (Open)Solaris so we need to use NDIS, essentially a way to use the Windows drivers on a Solaris box.

The procedure had been tested for OpenIndiana oi_151a5

Procedure :

  • Make sure that you are running a 32-bits OpenSolaris kernel. If you have a 64-bits capable CPU, OpenSolaris will boot a 64-bits kernel by default.

    The procedure has only been tested on a 64-bit kernel, no need to force a 32-bit one.

    # isainfo -v
    32-bit i386 applications
    sse4.1 ssse3 ahf cx16 mon sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu

    If you get the same output, go to the next point, you are already running a 32-bits kernel. If you see output that relates to “amd64″, this means that you are running a 64-bits kernel. In that case, you need to update the GRUB boot loader so that it adds a choice for you to boot a 32-bits kernel.

    If you get something like :

    64-bit amd64 applications
    ssse3 cx16 sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
    32-bit i386 applications
    ssse3 ahf cx16 sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu
    you are running a 64-bit kernel, able to run both 64-bit and 32-bit applications, so skip the section below.

  • # bootadm list-menu
    The location for the active GRUB menu is: /rpool/boot/grub/menu.lst
    default 0
    timeout 3
    0 OpenSolaris 2008.11 snv_101a_rc1b X86

    In my case, the GRUB boot menu is /rpool/boot/grub/menu.lst
    Update the menu with the following lines :


    # cat /rpool/boot/grub/menu.lst
    splashimage /boot/grub/splash.xpm.gz
    background 215ECA
    timeout 3
    default 0
    #———- ADDED BY BOOTADM - DO NOT EDIT ———-
    title OpenSolaris 2008.11 snv_101a_rc1b X86
    findroot (pool_rpool,0,a)
    bootfs rpool/ROOT/opensolaris
    splashimage /boot/solaris.xpm
    foreground d25f00
    background 115d93
    kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
    module$ /platform/i86pc/$ISADIR/boot_archive
    #———————END BOOTADM——————–
    #———- ADDED BY JC - DO NOT EDIT ———-
    title OpenSolaris 2008.11 snv_101a_rc1b X86 32 bits
    kernel$ /platform/i86pc/kernel/unix -B $ZFS-BOOTFS,console=graphics
    module$ /platform/i86pc/boot_archive
    #———————END JC——————–

    Then reboot your box & choose to boot a 32-bits kernel

  • Fetch all the required packages & files and store them in a common directory
    • Broadcom driver : From the HP support site :-)

      You have to find a 64-bit Windows driver for NDIS 5 (old Windows specification). The one I found was part of a driver collection named R174291.exe which is a zip file)

    • Last version of the NDIS driver : on the OpenSolaris NDIS page

      You had better use the ndis emulator associated to this page...

    • The flex package : ( You need to be connected to the Internet )
      # pkg install -v pkg:/SUNWflexlex
    • The onbld package : From Sun download center
      Bunzip, untar & add the pkg using # pkgadd -d .
  • Unzip the ndis archive
    • # gzip -dc ndis-1.2.1.tar.gz | tar xvf -
  • Extract the Windows driver archive, rename the relevant files & convert the .inf file to ascii instead of UTF encoding
    • # mv Bcm_wlan_drivers.exe Bcm_wlan_drivers.exe.7z
      # p7zip -d Bcm_wlan_drivers.exe.7z
      The one I found had to be extracted by unzip to get the two needed files : bcmwl5.inf and bcmwl564.sys.
      # mv bcmwl5.sys ndis-1.2.1/i386/ndis.sys
      Use bcmwl564.sys (the 64-bit variant), and store to directory amd64.
      # iconv -futf-16 -t ascii bcmwl5.inf > ndis-1.2.1/i386/ndis.inf
      The bcmwl5.inf file contains characters which cannot be translated to ascii. Use utf-8 instead of ascii, and put the result into amd64/ndis.inf
      # cd ndis-1.2.1/i386/
  • Follow the building procedure :
    • # make ndiscvt
      The new ndislink.c has been added to the Makefile in order to be compiled into ndiscvt (no change to the procedure.)

      Note : ndiscvt is an "off-line" program, it needs not be run in 64-bit mode and it can be run on any computer

      # ./ndiscvt -i ndis.inf -s ndis.sys -o ndis.h
      A new option "-a driver.s" has to be appended, to designate a second output of ndiscvt (added to the Makefile.)
      # make ndis
      The new driver.s (just created) has been added to the Makefile in order to be compiled into bcmndis.

      Note : more changes are probably needed to this part of the Makefile, for instance make sure the resulting bcmndis can execute outside the lowest 2GB of memory and it shows dependencies from misc/mac and misc/ndisapi.

      # cp bcmndis /kernel/drv/bcmndis
      bcmndis should be copied to /kernel/drv/amd64/bcmndis
      # make ndisapi
      # cp ndisapi /kernel/misc
      ndisapi should be copied to /kernel/misc/amd64/ndisapi.
  • Find the identifier of your network card : in my case “pci14e4,4315
    # scanpci -v
    pci bus 0×0006 cardnum 0×00 function 0×00: vendor 0×14e4 device 0×4315
    Broadcom Corporation BCM4312 802.11b/g
    CardVendor 0×1028 card 0×000b (Dell Wireless 1395 WLAN Mini-Card)
  • Load the driver module
    • # add_drv -i ‘”pci14e4,4315″‘ bcmndis
  • Check that OpenSolaris now shows your newly configured network card
    • # ifconfig -a
      (…)
      bcmndis0: flags=201004803 mtu 1500 index 3
      inet 0.0.0.0 netmask ff000000
      ether 0:22:5f:2e:9a:d1
  • Start configuring with Nwam, wificonfig, …