linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* load firmware for in-kernel driver
@ 2010-10-26 22:19 Hr. Philip Rueegsegger
  2010-10-27 12:36 ` Andrey Borzenkov
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Hr. Philip Rueegsegger @ 2010-10-26 22:19 UTC (permalink / raw)
  To: linux-hotplug

Hi list,

I hope I have chosen the right mailing list for my problem. 

I want to use a monolithic kernel (loadable module support disabled) for 
security reasons. The in-kernel-driver for the network card (bnx2) needs 
firmware to be loaded. Of course, when the kernel boots there is no filesystem 
available from where the firmware can be loaded nor a firmware loader agent. 
Thus I created a initrd containing the needed firmware in /lib/firmware and a 
firmware loader agent script in /sbin/hotplug like this:

######################
#!/bin/sh -e
#
# firmware loader agent
#
if [ ! -e /sys/$DEVPATH/loading ]; then
    mesg "/sys/$DEVPATH/ does not exist"
    exit 1
fi

if [ -e "/lib/firmware/$FIRMWARE" ] ; then
    echo 1 > /sys/$DEVPATH/loading
    cat "/lib/firmware/$FIRMWARE" > /sys/$DEVPATH/data
    echo 0 > /sys/$DEVPATH/loading
    exit 0
done

# the firmware was not found
echo -1 > /sys/$DEVPATH/loading

mesg "Cannot find the $FIRMWARE firmware"
exit 1
######################

There is also a script /init mounting /proc and /sys.

The problem is, the kernel starts BEFORE the script /init of the ram disk is 
executed. Thus I still have the problem of missing firmware support for the 
in-kernel-driver.  

Here are some additional infos:

Kernel version: 2.6.26 (Kernel source from Debian)
Distribution: Debian Lenny

The following firmware -and initrd related kernel features are enabled:
CONFIG_FW_LOADER=y
CONFIG_BLK_DEV_INITRD=y


Thanks in advance for any help or hint.


Cheers,
Phil



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-11-01 20:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-26 22:19 load firmware for in-kernel driver Hr. Philip Rueegsegger
2010-10-27 12:36 ` Andrey Borzenkov
2010-10-27 14:01 ` Hr. Philip Rueegsegger
2010-10-27 14:10 ` Kay Sievers
2010-10-27 16:23 ` Hr. Philip Rueegsegger
2010-10-27 17:02 ` Karl O. Pinc
2010-10-27 17:48 ` Hr. Philip Rueegsegger
2010-10-27 19:55 ` Karl O. Pinc
2010-10-28  1:19 ` Greg KH
2010-11-01 18:57 ` Hr. Philip Rueegsegger
2010-11-01 20:09 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).