load firmware for in-kernel driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux