From: Niek K. <n....@tr...> - 2011-03-25 13:49:04
|
If you switch from udev to mdev, you can make mdev load the firmware by using: echo /sbin/mdev > /proc/sys/kernel/hotplug And loading the libertas_sdio manually. Greetings Niek Ps my whole mdev script: #!/bin/sh echo "Mkdir /dev/pts" mkdir /dev/pts echo "Mounting pts" mount -t devpts devpts /dev/pts echo "Echoing hotplug" echo /sbin/mdev > /proc/sys/kernel/hotplug echo "mdev -s" mdev -s -----Original Message----- From: Frank Agius [mailto:ft...@ya...] Sent: Wednesday, March 23, 2011 4:34 PM To: gum...@li... Subject: Re: [Gumstix-users] wifi without udev On 3/22/2011 10:38 PM, dtran11 wrote: > > I think I found a way ( source: http://lwn.net/Articles/242046/ ). I'll try > to write a script to load the firmware after I do a modprobe of > libertas_sdio and remove udev once and for all. > > > Firmware loading > ================ > > If the hotplug variable FIRMWARE is set, the kernel is requesting firmware > for a device (identified by $DEVPATH). To provide the firmware to the > kernel, > do the following: > > echo 1> /sys/$DEVPATH/loading > cat /path/to/$FIRMWARE> /sys/$DEVPATH/data > echo 0> /sys/$DEVPATH/loading > > In the filesystem on my overo, there is a script called /lib/udev/firmware.sh that loads the libertas firmware. It looks very much like the instructions above. However the script needs two env variables to be set: DEVPATH and FIRMWARE. They are set by the kernel when the libertas_sdio is loaded. The module also creates the files in /sys that you need to poke with the echo. So you have to sequence it correctly, loading the module, waiting for the creation of the env variables and /sys files, and then poking with the echo commands. I guess that's why loading libertas_sdio takes to long. Through a little debug I found that the env variables are as follows on my system: DEVPATH=/devices/platform/mmci-omap-hs.1/mmc_host/mmc1/mmc1:0001/mmc1:00 01:1/firmware/mmc1:0001:1 FIRMWARE=libertas/sd8686_helper.bin However I could not make it work (something in the sequencing may be wrong) so I found an alternative. You can compile the kernel with the firmware files built into the kernel, eliminating the need to do so from user space. Here are the steps to build the libertas firmware into the kernel: 1) copy the firmware files into the kernel source directory "firmware". The files needed for my version of the libertas driver is sd8686_helper.bin and sd8686.bin. 2) In the kernel configuration, go to "Device Drivers --> Generic Driver Options --> External firmware blobs to build into the kernel". Add the string value "sd8686_helper.bin sd8686.bin" (without the quotes). Modify the string value if you're using a version of libertas that requires another firmware file (could be something like sd8686_v8.bin or sd8686_v9.bin) 3) recompile the kernel 4) Run the new kernel. Run "modprobe libertas_sdio". The libertas and libertas_sdio drivers should start and load firmware automatically, bringing up wlan0. I can now start wifi without udev!! Note the warning the help for kernel option CONFIG_EXTRA_FIRMWARE: WARNING: If you include additional firmware files into your binary kernel image which are not available under the terms of the GPL, then it may be a violation of the GPL to distribute the resulting frank > > dtran11 wrote: >> >> It seems like udev is needed because it loads the libertas firmware. How >> do I load the firmware manually without udev? I do not need support for >> hotplug since all my devices load at startup and udev takes a while to >> load. >> >> Thanks. >> >> >> dtran11 wrote: >>> >>> Hi, I just got an Overo Air for on-board WIFI. I am noticing that the >>> wifi card will not start unless udev is enabled. Is there a way to have >>> the wifi work without udev? >>> >>> Thanks. >>> >> >> > ------------------------------------------------------------------------ ------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ gumstix-users mailing list gum...@li... https://lists.sourceforge.net/lists/listinfo/gumstix-users |