Articles
Contact
Patrick Fox
Torrance, CA     90503
fox@patrickfox.org

How to Install WiFi Support on Solaris 11.4.42 (CBE)

371 views | 4 comments
Photo of laptop showing Solaris login screen and active WiFi connection. My faithful HP ZBook 17, running Solaris 11.4.42, with an active WiFi connection

Contents

Summary

In this article I explain how to install WiFi support on Solaris 11.4.42, the Common Build Environment (CBE) release.

I'm not going to waste your time with a bunch of elementary tutorial about what Solaris is and what WiFi is. I assume you are a developer, a sys admin, or otherwise an enthusiast who already knows what a computer is, what UNIX is, and what a device driver is.

Background

Nothing in this Background section will provide any information necessary for you to enable WiFi support on Solaris 11.4.42. It's just here to provide some context. If you already know what's going on and you just need the steps to enable WiFi support, you can skip forward to the "Preparation / What You'll Need" section.

In version 11.4.36 of Solaris, Oracle removed support for wireless networking. All versions from 11.4.36 and later require a wired connection to the network.

Oracle subsequently released Solaris 11.4.42, making it publicly available for personal, educational, and development use (the so-called "Common Build Environment" (or "CBE") release). 11.4.42 included updated versions of many of the bundled software packages, making it very appealing for developers and sys admins to upgrade from 11.4 (the prior, freely available, public release). But unfortunately, the lack of WiFi support made it very unappealing for use on laptops.

That was the general delimma I faced when contemplating upgrading from 11.4 to 11.4.42. Get the benefits of the updated FOSS software, but not be able to access the internet from outside the office; or continue using the painfully outdated software anywhere I wanted to go.

First, I tried staying on 11.4 and upgrading just the packages I required to do my work. That led me down a rabbit hole of endless dependencies and modifying package manifests. After a week and a half of tedious trial and error, I gave up - not because I'm too stupid to figure it out, but because time is a finite resource and I had been spending too much time on it.

Then I thought, maybe I can upgrade to 11.4.42 and figure out some way to downgrade or hack the packages I would need to get the WiFi drivers from 11.4 to install and work on 11.4.42. The fact that I'm now writing this article means I must have succeeded in that endearvor.

Preparation / What You'll Need

Let's start with what we'll need to get this done.

  • A bit of knowledge of the Solaris Image Packaging System (IPS), the UNIX/Solaris command line, and maybe some basic understanding of loadable kernel modules. Although, even without any of this knowledge, the steps explained herein should be sufficient to get you through the process.
  • A running installation of Solaris 11.4. We only require this because there are a couple of files we'll need to manually copy from it.
  • Access to a Solaris 11.4 package repository.
  • A host with a WiFi adapter which was previously supported on Solaris 11.4, and which currently runs Solaris 11.4.42. This is the machine we'll be installing the WiFi support on. We'll refer to this as the target machine.

The steps performed in this article have only been tested on my HP ZBook 17, with an Intel Centrino Advanced-N 6235 AGN wireless network adapter. So, it is possible other wireless NIC drivers may have dependencies on other drivers or kernel modules not mentioned herein. If you encounter that, please let me know.

So let's proceed, shall we.

How To Do It

I'm going to assume you already have Solaris 11.4.42 installed and running on the machine that you want to use WiFi on. And, I'm going to assume you installed the solaris-desktop package collection (though the GUI desktop isn't a requirement for adding the WiFi support). If you don't already have 11.4.42 installed and running on the target host, then why don't you put this aside for the moment and go do that first.

Access to a Solaris 11.4 IPS Repository

Next, make sure you have access to a Solaris 11.4 (not 11.4.42) IPS package repository from the target machine. But since you don't currently have WiFi support on that machine then how the hell are you supposed to access a repository, right?

You can either install a local repository on the target machine, or you can copy a repository to a USB drive and plug that into the target machine. If you're not sure how to create a local repository, see "Create a Local Repository" on Oracle's site, or the excellent article "Setting Up Local Repository - Solaris 11.4 " on JetPatch's site.

If the target host was already configured with access to an 11.4.42 repository, you do not need to remove that. It's perfectly fine to have the machine configured with both an 11.4 and an 11.4.42 repository at the same time.

Disable the Package Version Locks

The IPS packaging system uses a version locking scheme to prevent users from installing potentially incompatible versions of packages. I nice feature to prevent sys admins and users from inadvertently breaking their system, but a real pain in the ass for someone who knows what he's doing and is willing to accept the responsibility of blowing up his machine.

So what we need to do now is disable the version locks for the 11.4 drivers. That's done as such:

root# pkg change-facet facet.version-lock.[package_fmri]=false

Where [package_fmri] is the FMRI of the driver you want to install. For example, in the case of the iwp driver, the FMRI is driver/network/wlan/iwp. So, for example, in the case of the iwp driver, you would execute:

root# pkg change-facet facet.version-lock.driver/network/wlan/iwp=false

If you're not sure what driver your WiFi adapter uses, that could be a bit of a pickle. One way to find out would be to boot the machine using the 11.4 installation media then, when prompted, select option '3' to run a shell and use the usual Solaris procedures for finding which driver is binding to the adapter. If you're not sure how to do that, see, for example the prtconf man page.

Alternatively, you can choose to install all of the WiFi adapter drivers and let Solaris determine which one to bind to when it boots. That's a perfectly acceptable approach and it's generally what the Solaris installation does anyway. The FMRIs of all of the WiFi adapter drivers included in Solaris 11.4 are as follows:

  • driver/network/wlan/arn (Atheros AR928X)
  • driver/network/wlan/atu (Atmel AT76C50x USB)
  • driver/network/wlan/iwh (Intel(R) WiFi Link 5100/5300)
  • driver/network/wlan/iwk (Intel(R) WiFi Link 4965AGN)
  • driver/network/wlan/iwp (Intel(R) WiFi Link 1000/2000/6000/7260 series)
  • driver/network/wlan/rum (Ralink RT2501/RT2601/RT73USB)
  • driver/network/wlan/uath (Atheros AR5523 USB)
  • driver/network/wlan/ural (Ralink RT2500USB USB)
  • driver/network/wlan/urtw (Realtek RTL8187L/B USB)
  • driver/network/wlan/zyd (ZyDAS ZD1211/B USB)

In addition to the WiFi adapter drivers, you will also need to disable the version lock on the service/network/wpa package. That is, if you want to be able to connect to WPA secured networks, which I assume you would. That can be done as follows:

root# pkg change-facet facet.version-lock.service/network/wpa=false

Install the 11.4 Drivers

Now you're ready to install the WiFi drivers from the 11.4 repository.

This should just be a matter of running something like:

root# pkg install driver/network/wlan/[driver_name]@11.4-11.4.0.0.1.15.0

Where [driver_name] is the name of the driver you want to install. All of the wireless NIC drivers in the 11.4 repository have the same version number (11.4-11.4.0.0.1.15.0), so you don't need to worry about looking that up.

If you choose to install multiple, or all of the WiFi drivers, then you'd run this command for each one.

And of course, let's not forget to also install the service/network/wpa package, so we can connect to secured networks:

root# pkg install service/network/wpa@11.4-11.4.0.0.1.15.0

We're almost done, but not quite yet. There are a couple of files that need to be copied from an 11.4 deployment.

Copy a Couple More Drivers From 11.4

Now, this next part might seem a little strange, and you might be thinking "Why don't we just do like we did above: disable the version locking, and install the corresponding packages from the 11.4 repository?"

The reason is because these two other drivers did not come in their own packages. They were included in the package "system/kernel" which also contains about 2,300 other files, about 200 of which are other drivers. And, many other packages depend on "system/kernel", so if we were to downgrade that to the 11.4 version then we'd have to downgrade many, many other packages which would most certainly break the whole system.

In the case of the WiFi adapter driver packages, Oracle removed those packages from the repository. But in the case of "system/kernel", that package is still part of the repository in 11.4.42, but Oracle removed specific files from that package.

So, what we need to do is extract or copy the required files from the 11.4 package. The easiest way I know of to do that is to copy them from a machine running 11.4. It doesn't need to be an actual, physical machine. It can be an instance of 11.4 running in a VM (like VirtualBox).

The files we need to copy are:

  • /kernel/misc/amd64/net80211
  • /kernel/mac/adm64/mac_wifi

How you copy them from the 11.4 installation to the 11.4.42 installation is entirely up to you. You can put them onto a USB drive; or, if 11.4 is running in VirtualBox on the machine you're adding WiFi support to, then you can copy them to a shared folder between the VM and the host. But I'm sure you know how to copy files.

And that's it. You should now be able to load the WiFi driver (e.g. using modload) and it should bind to your NIC.

You can then use the usual network administration commands, i.e. dladm, ipadm, to enable and configure your WiFi connection. Even though Oracle removed the WiFi related drivers from 11.4.42 (or more technically, from 11.4.36 and later), they did not remove the WiFi functionality from dladm. Not yet, anyway.

If you have any questions or comments I'd love to hear your feedback, below.

Comments

4 Responses to: How to Install WiFi Support on Solaris 11.4.42 (CBE)
  1. Marshall says:

    Thanks for this.

  2. bobnewell says:

    Awesome

  3. John says:

    Brilliant, thank you for adding this to my Solaris question/rant.

  4. John says:

    Apparently Solaris compatible wireless drivers are available from OpenBSD. Only necessary if access to the Solaris 11.4 GA repository is not available. I’ve not investigated whether drivers from Openindiana would work.

Leave a Comment

Your email address will not be published. Required fields are marked *