View previous topic :: View next topic |
Author |
Message |
Januszzz Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 04 Feb 2006 Posts: 367 Location: Opole, Poland
|
Posted: Sat Oct 31, 2009 1:48 am Post subject: PROBLEM loading firmware without udev (busybox only) |
|
|
Hi,
I need to load iwl3945 in tiny environment, busybox only. I did not exactly understand the moment when firmware needed for the module is being loaded, so I've narrowed the search and got to the point where module is loaded, but interface is down. When I'm turning it on using:
I get in log:
Code: | iwl3945 0000:0c:00.0: iwlwifi-3945-2.ucode firmware file req failed: -2 |
and later all the consequences of the absence, including fallback to previous version of ucode etc etc etc.
Of course, when I start udev, the above command sucessfully loads the firmware.
So the question is: howto load the firmware without udev?
Thanks!
EDIT:
I've found this about mdev: "Some kernel device drivers need to request firmware at runtime in order to
properly initialize a device. Place all such firmware files into the
/lib/firmware/ directory. At runtime, the kernel will invoke mdev with the
filename of the firmware which mdev will load out of /lib/firmware/ and into
the kernel via the sysfs interface. The exact filename is hardcoded in the
kernel, so look there if you need to know how to name the file in userspace.
"
Well. it seems that it doesn't work? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ppurka Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Sat Oct 31, 2009 5:30 am Post subject: |
|
|
iwlwifi-3945-2.ucode is to be used only with kernel 2.6.29 or newer. If you are using an older kernel then you need to get an older version of the firmware. So, if this is what is misconfigured, then your problem will probably be solved. Otherwise, I have no idea what the problem could be. _________________ emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Januszzz Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 04 Feb 2006 Posts: 367 Location: Opole, Poland
|
Posted: Sat Oct 31, 2009 2:37 pm Post subject: |
|
|
Thanks, I've solved this issue. I got hint there:
http://lwn.net/Articles/242046/
and the part was interesting:
Quote: | 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
|
it looks like udev / mdev sets default path for firmware or sets the loading enabled / disabled. Still I don't know, because this documentation (as well as in current Documentation directory) seems just outdated and I do not have these files
So because I didn't have proper hint how to do this on my system (maybe strace would help) I simply compiled the binary blob into the kernel. Now it works without udev.
Yet the question remains, what is udev doing to achieve firmware loading, how to configure its behavior and where? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Gentree Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/1364161114417d616b9645b.jpg)
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sun May 30, 2010 7:08 pm Post subject: |
|
|
That code snip is just an example of how to use the mechanism but this should not be needed if the firmware is the directory configured into the kernel and has the name indicated to the kernel by the driver that requests it.
I modprobe rt73usb for my Dlink wifi dongle and on plugin it finds and loads the firmware rt73.bin.
This is just as well since mdev does not seem to be getting called despite it's being set as hotplug :
Code: | cat /proc/sys/kernel/hotplug
/sbin/mdev |
Code: | # ls -ail `cat /proc/sys/kernel/hotplug`
244567 lrwxrwxrwx 1 root root 14 May 27 18:38 /sbin/mdev -> ../bin/busybox
# ls -ail /sbin/../bin/busybox
244487 -rwxr-xr-x 1 root root 572264 May 27 18:38 /sbin/../bin/busybox
|
Code: | mdev
BusyBox v1.17.0.git (2010-05-27 20:35:42 CEST) multi-call binary.
Usage: mdev [-s]
-s Scan /sys and populate /dev during system boot
It can be run by kernel as a hotplug helper. To activate it:
echo /sbin/mdev > /proc/sys/kernel/hotplug
It uses /etc/mdev.conf with lines
[-]DEVNAME UID:GID PERM [>|=PATH] [@|$|*PROG]
|
Code: |
cat /etc/mdev.conf
export MDC=1
.* 0:0 644 $ /etc/mdev.actions
|
Now none of that is happening , can anyone see why not?
![Confused :?](images/smiles/icon_confused.gif) _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|