LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-19-2006, 12:48 AM   #1
sunshine11
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Rep: Reputation: 0
downlaoding firmware


Hi,

I wanted to download firmware via the hotplug mechanism...I just wrote a simple module for the sake of testing. This is the module:

static struct device dev = {
.bus_id = "dev"
};

static void sample_probe_default(void)
{
const struct firmware *fw_entry =NULL;
int k;
printk("firmware_driver: device is inserted\n");

k = request_firmware(&fw_entry,"fw_load",&dev);
if(k!=0)
{
printk(KERN_ERR "firmware_driver: Firmware not available\n");
return;
}
}

static int sample_init(void)
{
device_initialize(&dev);
printk(KERN_DEBUG "initialized device\n");
sample_probe_default();
return 0;
}
static void __exit sample_exit(void)
{
}

module_init (sample_init);
module_exit (sample_exit);

MODULE_LICENSE("GPL");

When I insert the module, the system hangs...and I get to see the following messages on the screen.

firmware_driver: device is inserted
fw_register_class_device: class_device_register failed
firmware_driver: Firmware not available


Also...I wud like to add dat...
cat /proc/sys/kernel/hotplug shows /sbin/hotplug
I have placed the firmware file i.e. fw_load in the apporpriate directory i.e. /usr/lib/hotplug/firmware/fw_load
The firmware.agent is also at the appopriate place /etc/hotplug/firmware.agent
The module creates a directory dev but it doesnot contain the required files i.e. loading & data
If smeone cud help me out wid dis.... am using kernel version 2.6.6...any help wud be appreciated..Plz also point out anythin dat Iam missing here.

Last edited by sunshine11; 12-19-2006 at 12:50 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with firmware coronet_blue Linux - Hardware 1 05-11-2006 12:04 PM
Downlaoding Apt dreyes81 Linux - Newbie 1 07-08-2005 03:31 PM
concerning: firmware Accolon SUSE / openSUSE 1 10-30-2004 05:57 AM
messed up my ipod firmware..need new firmware.. casimir Linux - Hardware 2 09-13-2004 08:11 PM
firmware? legolas_t Linux - Networking 1 06-13-2004 12:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration