LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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


Reply
  Search this Thread
Old 09-12-2013, 04:37 PM   #1
creedlinux
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Rep: Reputation: Disabled
insmod failed


I am trying to load a driver on a Centos6.3 box to use a Xilinx development board. I complied the driver on the box
and after running a script I can see the module in /dev

crw-r--r--. 1 root root 240, 1 Sep 12 15:41 xpcie

When I run insmod xpcie.ko I get the following message:

insmode: error inserting 'xpcie.ko': -1 Operation not permitted

dmesg returns:
xpcie: Init: Hardware not found.

tail /var/log/messages returns the same thing.

modprobe xpcie returns:
FATAL: Module xpcie not found

I don't see it when a do an lsmod, nor do I see it as available when I do a modprobe -l

I thought that seeing it show up in /dev meant that it was built (or installed) but not loaded. Certainly something has been added at some level to the system.

The script that creates the device on the system is:
#!/bin/bash
rm -rf /dev/xpcie
mknod /dev/xpcie c 240 1
chown root /dev/xpcie
chmod 0644 /dev/xpcie

I am running everything as root

Any thoughts on what I'm doing wrong would be appreciated.
 
Old 09-12-2013, 05:06 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,614

Rep: Reputation: 703Reputation: 703Reputation: 703Reputation: 703Reputation: 703Reputation: 703Reputation: 703
Root can make any node it wants in /dev. This has no meaning to the system. Normally your driver would do this when it finds the device by calling device_create().

The fact that it has this script suggests that the driver was written for some other Unix system and ported to some version of Linux. It probably needs to be updated to match recent Linux driver requirements.
 
Old 09-12-2013, 10:27 PM   #3
creedlinux
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
So it turns out that the O/S was telling the truth. In my Fpga build, I had a vendor id, device id and sub-device id. In my driver, I had the wrong number for the device id so the device was never found. When I corrected the device id, I was able to install the module and run a test to access the on board memory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
insmod USB at 2.4.21-4 FAILED. murugesan Linux - Enterprise 7 07-29-2008 01:28 AM
insmod forcedeth failed Spasmolytic Slackware 3 05-02-2004 12:59 AM
What is the meaning of insmod i810_rng failed bugsbunny Linux - Newbie 4 04-07-2004 10:08 AM
insmod snd-emu10k1 failed huntz Red Hat 3 09-22-2003 01:41 PM
ALSA insmod failed! gentlemani Linux - Newbie 3 08-01-2003 02:31 PM


All times are GMT -5. The time now is 06:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration