LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


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

Rep: Reputation: 0
downloading 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..sme imp things...
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.
 
Old 12-19-2006, 02:28 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

http://www.linuxquestions.org/questi...d.php?t=511819
 
  


Closed Thread



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 Off
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
Linksys WPC54G ACX 111 Firmware Downloading Problems cheetahman SUSE / openSUSE 3 03-15-2006 03:26 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 help! radha Programming 1 05-06-2003 04:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:13 PM.

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