Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I don't remember exactly... can't look for it now. Try to modify the Makefile as I did. And the script/Configure file too. And maybe (if other errors persist) do a "export BASH=/bin/bash" before doing the "make config".
The error will say the path to create the missing dir.
If its not this, I will have to try and repeat it all, another day.
ohh I had misunderstood. I changed the line 117 on Makefile as you said: "/bin/bash scripts/Configure" and now sudo make config works fine. This asks for the card model.
I only selected the card that I have: 1780, and then...
make
for n in kernel lib tools; do make -C $n || exit 1; done
make[1]: Entering directory `/home/flowsensor/Downloads/advdaq-1.10.0001/kernel'
make -C /lib/modules/2.6.32-5-686/build M=/home/flowsensor/Downloads/advdaq-1.10.0001/kernel modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.32-5-686'
Building modules, stage 2.
MODPOST 0 modules
make didn't create the two .ko files needed for the card.
Last edited by orcaja; 02-06-2012 at 09:35 AM.
Reason: too much information
But, so I could compile it all without "sudoing", I extracted the kernel source code to the home folder.
EDIT: of course, there are times *you will* need to get super user powers; e.g., when installing the compiled driver, for example, by making a "make install". And watch out for wrong paths causing errors.
OK! thanks, I really appreciated your help, I think I'm very very close to make it.
I tried without sudoing, and extracted the sources at ~/daq/linux/linux-sources-2.6.32 and also copied the .config file..
make config, make dep and make, all of them fine, finally make install
for n in PCI-1780/ PCI-1784/;\
do cp $n*.ko ../modules; \
done
cp: cannot stat `PCI-1780/*.ko': No such file or directory
cp: cannot stat `PCI-1784/*.ko': No such file or directory
make[1]: *** [install] Error 1
I found the directory kernel/PCI-1780 and it only contains one Make file, files *.c and one with extension .h ... there are no ko files.
Thanks in advance.
Last edited by orcaja; 02-06-2012 at 07:56 AM.
Reason: Adding a title
while executing make, does the line:
for n in kernel lib tools; do make -C $n || exit 1; done
indicates that it will go to the directory kernel and do make, then it will go to lib and tools directories and do make too?. can I run make manually each of them?
I tried in a laptop, I followed the same steps to compile the driver and I get the same results as before:
make
for n in kernel lib tools; do make -C $n || exit 1; done
make[1]: Entering directory `/home/flowsensor/Downloads/advdaq-1.10.0001/kernel'
make -C /lib/modules/2.6.32-5-686/build M=/home/flowsensor/Downloads/advdaq-1.10.0001/kernel modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.32-5-686'
Building modules, stage 2.
MODPOST 0 modules
Can anyone give me an advice to start debbuging this file?
Thanks in advance.
I changed my advinit.c file, i added this
#define pci_module_init pci_register_driver
and also change SA_SHIRQ to IRQF_SHARED
now make gives warnings like this:
WARNING: "advdrv_unregister_driver" [/kernel/PCI-1780/pci1780.ko] undefined!;
I haven't found how to solve that, but at least, it generates the pci1780.ko file, but it still does not generate the advdrv_core.ko file...
I'm attaching the Makefile, just in case somebody could have a look. I'm runnning debian 6, kernel 2.6.32
Thanks in advance.
Joc
Last edited by orcaja; 02-08-2012 at 07:50 AM.
Reason: add attachment
I went to the directory /core/ and type make. This generates the advdrv_core.ko file, however, I got this too:
/home/flowsensor/daq/advdaq-1.10.0001/kernel/core/advk_core.c:1593: warning: passing argument 1 of ‘__constant_memcpy’ discards qualifiers from pointer target type
then I went to the directory /PCI-1780/ and typed make, and I get some messages like this:
But it generated the pci1780.ko anyway. However it seems that the two modules: advdrv_core.ko and pci1780.ko are related, and the first should provide some functions for the second. Anyway, since I have the two files, I did inserted the two of them with insmod, but for the pci1780.ko file I get this:
insmod: error inserting 'pci1780.ko': -1 Unknown symbol in module
I inserted the advdrv_core.ko before compiling the pci1780.ko file... same results
At the end of the file advdrv_core.c there are some lines like this:
./core/advdrv_core.c:EXPORT_SYMBOL_GPL(advdrv_register_driver);
./core/advdrv_core.c:EXPORT_SYMBOL_GPL(advdrv_unregister_driver);
but still when I compile the pci1780.ko I get:
WARNING: "advdrv_unregister_driver" [/path/PCI-1780/pci1780.ko] undefined!
WARNING: "advdrv_register_driver" [/path/PCI-1780/pci1780.ko] undefined!
Last edited by orcaja; 02-08-2012 at 03:19 PM.
Reason: more details
1) Copy the advdrv_core.ko file to a location beneath /lib/modules/<version>/kernel
2) Add the exported symbols to /lib/modules/<version>/build/Module.symvers
Then I compiled the pci1780.ko!!!
Then I ran make install, and that creates the major number and other things beyond my knowledge.
Now the driver is compiled, I think!!!
Now I compiled the very first program for this card, no problems reported so far. But
when I run this very first program, I got this:
err msg: System Error!
I guess, I should mark this thread as SOLVED and started a new one somewhere eh?
Thank you everyone.
Joc
Last edited by orcaja; 02-09-2012 at 10:33 AM.
Reason: more info
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.