Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
blueisaak
Posts: 2
Registered: ‎11-16-2010
0

Linux Driver for xapp1022 and xapp1052

Hi,

I am trying to run the xapp1022 to test the POI design for PCI Express.  I am running Fedora Core 13 with the kernel 2.6.34.7-61.fc13.x86_64. As far as I can tell the Problem is that the  Linux drivers use a function called pci_find_slot witch got removed from this kernel version.
Same problem occurs with xapp1052 witch has a similar driver.

I get the fallowing output for the make command:

 

 

[root@student0815 /my_code_dir/xapp1022/Linux_Driver]$make
make -C /usr/src/kernels/2.6.34.7-61.fc13.x86_64 M=/my_code_dir/xapp1022/Linux_Driver modules
make[1]: Entering directory `/usr/src/kernels/2.6.34.7-61.fc13.x86_64'
  CC [M]  /my_code_dir/xapp1022/Linux_Driver/xpcie.o
/my_code_dir/xapp1022/Linux_Driver/xpcie.c: In function ‘XPCIe_Write’:
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:161: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
/my_code_dir/xapp1022/Linux_Driver/xpcie.c: In function ‘XPCIe_Read’:
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:192: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
/my_code_dir/xapp1022/Linux_Driver/xpcie.c: In function ‘XPCIe_init’:
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:239: error: implicit declaration of function ‘pci_find_device’
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:239: warning: assignment makes pointer from integer without a cast
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:277: warning: cast from pointer to integer of different size
/my_code_dir/xapp1022/Linux_Driver/xpcie.c: In function ‘XPCIe_ReadReg’:
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:402: warning: cast from pointer to integer of different size
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:404: warning: cast to pointer from integer of different size
/my_code_dir/xapp1022/Linux_Driver/xpcie.c: In function ‘XPCIe_WriteReg’:
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:411: warning: cast from pointer to integer of different size
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:412: warning: cast to pointer from integer of different size
/my_code_dir/xapp1022/Linux_Driver/xpcie.c: In function ‘XPCIe_ReadMem’:
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:446: warning: cast from pointer to integer of different size
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:460: warning: cast to pointer from integer of different size
/my_code_dir/xapp1022/Linux_Driver/xpcie.c: In function ‘XPCIe_WriteMem’:
/my_code_dir/xapp1022/Linux_Driver/xpcie.c:500: warning: cast from pointer to integer of different size
make[2]: *** [/my_code_dir/xapp1022/Linux_Driver/xpcie.o] Error 1
make[1]: *** [_module_/my_code_dir/xapp1022/Linux_Driver] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.34.7-61.fc13.x86_64'
make: *** [all] Error 2

 

 

Has anyone an idea how to solve this? Or are there new Linux drivers available?

 

Regards Isaak

 

Super Contributor
vlavruhin
Posts: 195
Registered: ‎12-08-2010

Re: Linux Driver for xapp1022 and xapp1052

Try to replace 'pci_find_device' with 'pci_get_device' .

Best Regards,
Vitaly.
Visitor
blueisaak
Posts: 2
Registered: ‎11-16-2010
0

Re: Linux Driver for xapp1022 and xapp1052

Thanks it worked!

Newbie
wazerface
Posts: 1
Registered: ‎12-06-2011
0

Re: Linux Driver for xapp1022 and xapp1052

Hi, I had the same problem and had to make that change as well.  Now I'm getting an error trying to do the "insmod xpcie.ko" step saying "Operation not permitted" even though I am root.  Since you have the same version of Redhat as me I thought I'd ask, did you have this problem and find a way around it?

 

Thanks.

Newbie
eastyhasta
Posts: 1
Registered: ‎06-10-2012
0

Re: Linux Driver for xapp1022 and xapp1052

Hello,

 

I have the same problem when I'm trying to do the "insmod xpcie.ko" step.

It's return "Operation not permitted".

 

Do you find a solution?

Thank you.

 

Expert Contributor
sushantm
Posts: 284
Registered: ‎04-02-2011
0

Re: Linux Driver for xapp1022 and xapp1052


Hi, I had the same problem and had to make that change as well.  Now I'm getting an error trying to do the "insmod xpcie.ko" step saying "Operation not permitted" even though I am root.  Since you have the same version of Redhat as me I thought I'd ask, did you have this problem and find a way around it?


It seems you are trying to insert the driver file into your kernal.

Please give the root access to insert the driver into the kernel.

 

You should login as a root to insert the driver into the kernel.

--Sushant Mahajan
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Signature:

1.Have you ever tried typing your question into Google? If not you should before posting.
Too many results? Try adding site:www.xilinx.com
2.Read the datasheet and user guide. Have you read the user guide in detail ? Can you find the user guide?
3. Search the forums for similar topics.
4.I have neither found any similar thread in existing forum nor web-search is helpful to me.What should I do ?
Post your issue in detail comprehensive format on the relevant
forum.
5. Do not post the same question on multiple forums,please search and post it on relevant forum.
6. Do not raise a new topic or question on someone else's thread, start a new thread!
7. Students/Newbies: Copying code is not the same as learning to design.
8. "It does not work" is not a question which can be answered. Provide much details (with webaddress, datasheet links,etc..).
and make sure to be specific!
9. You are not charged extra fees for comments in your code,It will help others to understand well.
10.If someone answers your question, mark the post with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (the star on the left).
Regular Visitor
currobosch
Posts: 38
Registered: ‎07-12-2012
0

Re: Linux Driver for xapp1022 and xapp1052

Hello,

Did you guy problems with Fedora 13 to make the project?? I cannot to make the xapp1022 project. I get the following output for make command:

 

[root@localhost Linux_Driver]# make
make -C /lib/modules/2.6.33.3-85.fc13.i686/build M=/home/curro/Linux_Driver modules
make: *** /lib/modules/2.6.33.3-85.fc13.i686/build: No such file or directory.  Stop.
make: *** [all] Error 2
[root@localhost Linux_Driver]#

 

Maybe I have to configure properly my Linux?? How did you configurate Linux to complie this project??

 

Thanks!

Newbie
bg2bkk
Posts: 3
Registered: ‎11-16-2012
0

Re: Linux Driver for xapp1022 and xapp1052

it's about kernel version,you should make version as below as you can

Newbie
bg2bkk
Posts: 3
Registered: ‎11-16-2012
0

Re: Linux Driver for xapp1022 and xapp1052

oh sorry I make mistake.it's not about version. You see the notice "make: *** /lib/modules/2.6.33.3-85.fc13.i686/build: No such file or directory.  Stop." .It's about that when you complie drivers or kernel modules, "make" will go to directory"/lib/module/your-source-code-tree/build" to reference something. So you shoulde make sure your path" /lib/modules/2.6.33.3-85.fc13.i686/build" is correct