07-02-2015 01:50 AM
Hi,
I would like to install the driver for a USB device on the myRIO. The driver file is attached.
I have no prior experience in Linux. Would greatly appreciate if anyone can advise on how to install the driver onto the myRIO.
I have tried the steps listed in https://decibel.ni.com/content/docs/DOC-34827 and it appears that the device is not listed, so a driver installation may be necessary.
Thank you.
07-02-2015 10:37 AM
It looks as if your best bet is to compile the module on the target itself. It's going to take a bit of work since the headers and tools are not exactly at standard locations on the targets, but we've written up a guide to get experienced kernel folks what they need. And really, this sort of thing should have someone who's at least a bit experienced working with kernel builds looking at this.
07-02-2015 09:02 PM
Thanks. I'll do some read up.
I noticed the driver packages comes with 4 "makefile" file. Do we need to create a makefile according to the tutorial, or can we make use of the packaged makefile?
If we're writing the makefile, do we need to write a makefile for each ".c" file in the folders?
Much thanks for any advice.
07-03-2015 01:24 PM
I would recommend taking the existing makefile for the driver module (the one under the driver folder) and adjust it for your needs.
When you first posted this question, I quickly got something building but, without hardware, I had no way to test it. I basically made sure that the environment was configured as described in the document I linked and adjusted the makefile to match where things were located on disk (and the version of the kernel).
I'm on holiday right now, but if you're still stuck next week I can check back in
07-06-2015 08:38 AM
mxconf does not have the correct permissions. Additionally, do as the error message states, and check the build.log file for more information.
07-07-2015 09:59 AM
You must update the makefiles to point to the correct location for the kernel build directory. Note that the build directory is a squashfs filesystem, only available after you've run setup_versioning_env (which depends on sourcing the versioning_utils.sh script). This is covered in the documentation I directed you to.
So, to be completely clear:
Note that I have not actually run through these steps, and if you want to be working with the kernel, you're going to need to learn stuff and investigate why things are failing. NI makes no promises that some random hardware that claims to have a linux driver will be supported, and certainly no promises on the impact on the performance or reliability of a system with such a driver loaded. This is even moreso the case for drivers that are not included in the kernel source itself.
All of that is a thorough way to tell you that I'm not going to continue spoon-feeding you, I'm not here to give gratis contract work. Please, do a little work and have a reasonable question and not just an open-ended "It's not working, why?"
07-07-2015 09:02 PM
Alright.
It is precisely because NI doesn't support this aspect of "making use of NI hardware" that's why I ask for assistance from the forum instead of contacting support, in the hope that someone with linux background could provide valuable insight.
I appreciate the advices given so far.
Probably there will not be anymore input, so nothing more for me to add.
07-08-2015 09:37 AM
I suppose my response was a bit harsh, but basically I don't want to be in the business of hand-holding everyone who wants to add a driver to their LVRT target. This is a place of collaboration, not one-sided assistance.
07-09-2015 03:09 AM
ok.. there is 2 module.ko file.
insmod mxusbserial.ko runs ok. So the module was copied into the kernel as stated in the tutorial.
But
insmod mxuport.ko failed.
"Unknown symbol in module" means there's issue with the source code?
All the modules were complied in the RT target as described in the tutorial.
07-09-2015 07:27 AM
Check the kernel log to see if there is any additional information:
dmesg | tail