[Nix-dev] Wireless firmware for NixOS Live CD

Tony White tonywhite100 at googlemail.com
Thu Oct 15 12:26:05 CEST 2009


2009/10/14 Tony White <tonywhite100 at googlemail.com>:
> 2009/10/14 Eelco Dolstra <e.dolstra at tudelft.nl>:
>> Hi,
>>
>> Tony White wrote:
>>
>>> I've just found out that this is no more. So it's been removed and
>>> replaced with stuff like :
>>> rt73.nix but how is it possible to download the firmware when I have
>>> to use rt73usb to do it???
>>> Or, use /etc/nixos/nixos/modules/services/hardware/udev.nix to load
>>> the firmware, but wait hardware.firmware = [   ]; so add a path to it
>>> and then nixos-rebuild switch the live cd. No that's not a good idea.
>>
>> I couldn't quite parse that last paragraph ;-) but if you can't do a
>> nixos-rebuild, then here is a very hacky way to add a path to the firmware
>> search path:
>>
>> $ find $(nix-store -qR /var/run/current-system/ | grep udev-rules) \
>>  | grep 00-path
>> /nix/store/08n14c4v8nnz4zi0jwl763r840p4kszj-udev-rules/00-path.rules
>>
>> and edit the line ENV{FIRMWARE_DIRS}=... in that file.
>>
>> --
>> Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/
>>
>
> Hi all,
> Yes! Thanks guys. I think I'll go and get mucky with Eelco's suggestion. :)
>
> Have a good one,
> Tony
>

Yeah!
That worked. Thanks guys!
I feel a bit silly for not thinking about it logically like;
lib/firmware could be in the kernel's store path but hey I know now.
:)

Procedure went as follows :
(Did the usual stuff : swapon & mount the new rootfs as /mnt)
Mounted my usb stick with the firmware on it :
mkdir -p /media/sdd1
mount /dev/sdd1 /media/sdd1
(After using Eelco's grep one liner to workout where the firmware is
looked for; it was basically in the kernel's store path under
/lib/firmware)
uname -a
(Told me the name of the running kernel 2.6.28.10)
cp /media/sdd1/rt73fw/rt73.bin /nix/store/*linux-2.6.28.10*/lib/firmware
(Copy the firmware using the * to avoid typing the exact store path.
There is only one kernel on the live cd.)
modprobe rt73usb
(Reload the module for the adapter so that it picks up the firmware cleanly)
iwconfig
(Find out the wireless adapter's dev name - wlan0)
ifconfig wlan0 up
(At this point there wasn't an error message so I knew the firmware
had loaded. Big grin on face.)
iwlist wlan0 scan
(Searched for wireless routers to connect to)
iwconfig wlan0 essid "Air Station"
(Found the Air Station I had plugged into the main router we have here
and I'd turned off encryption so I didn't need wpa_supplicant for now
and hey, my neighbours had 24 hours worth of free wireless)
dhclient wlan0
(Resolve the address for the adapter)

At this point I was online, pulled the latest nixpkgs and got
nixos-install to do it's thing. Sweet.

Thanks guys,
Tony



More information about the nix-dev mailing list