Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-12-2013, 03:37 PM   #1
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:
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, 04:06 PM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,209

Rep: Reputation: 871Reputation: 871Reputation: 871Reputation: 871Reputation: 871Reputation: 871Reputation: 871
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, 09:27 PM   #3
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.


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 12:28 AM
insmod forcedeth failed Spasmolytic Slackware 3 05-01-2004 11:59 PM
What is the meaning of insmod i810_rng failed bugsbunny Linux - Newbie 4 04-07-2004 09:08 AM
insmod snd-emu10k1 failed huntz Red Hat 3 09-22-2003 12:41 PM
ALSA insmod failed! gentlemani Linux - Newbie 3 08-01-2003 01:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:52 PM.

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