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 know there are some threads like this one. I have an old driver for a DAQ. This is a package for Debian 4. I have been asked to install it on Debian 6. I asked to the manufacturer about a newer driver, but they answered me that they don't have the resources to do the code changes . I have seen similar posts out there and it seems that the solution is to recompile again, but I don't have a clue about how to do that. I guess the first step is to ask the manufacturer for the source code right?, and then what would be the next step?
Any advice, comment, solution, etc. is very welcome.
Maybe Debian 6 can install the package you have and make it work. Maybe not.
But, is "DAQ" for a data aquisition machine? In this case, the company might not have much interest in keeping the source code as a secret, wich is good for your interest.
If you can get the source code for the driver, I think you will be fine.
There are no general compiling steps. You need the source files before you can know how exactly to compile or recompile them.
I installed the package in debian 6. After that, I tried to load the module and I got the error:
insmode: error inserting ‘advdrv_core.ko’: -1 Invalid module format
It seems this error is due to the different versions of libraries. Here are the libraries needed:
Debian 4____________Debian 6
kernel:________ 2.6.18___________currently: 2.6. 32
gcc version:____4.1.1-15 ________currently: 4.4.5
Glibc _________ glibc-2.7 _______currently: glibc2.11-1
binutils________2.18.1 _________currently 2.20.1-16
I downloaded the source, a tar.bz2 file, and run "alien", this created the new package which I installed too.
But the module were supposed to be in /usr/src/Advantech/daq/modules/ , but the package created from the source does not generate those directories and I couldn't find the modules in any other directory either (I used find / -name "module name" ). I was expecting that the source file and deb package created the same directory tree, but they don't.
Any other ideas are very welcome.
Thanks in advance everyone!
Orcaja. The "alien" program is to convert between different package formats. For example, Debian and its derivatives use ".deb" packages. Redhat, ".rpm". Slackware ".tgz". So it is expected it would not work. The source code is used to generate packages and binaries. We do not install them directly. Loosely speaking, "compiled binaries" or just "binaries" are synonims for "packages".
You might uninstall the "source code package" from your system.
Now, you need to extract the source code to some folder. Then try to compile it. And then (maybe) install it. Or (maybe) generate a package from the compiled thing and install it.
The steps for compiling vary. See if you can find it by looking at the source package contents you extract.
Is the whole source code public, somewhat? Do you have permission to show it to the world? If it is small, try to attach it here. If it is bigger, put it into something like 4shared (or equivalents) and give the address.
I extracted the package, but now I have more questions: I have the linux-headers in a directory, but I ran make configure and it looks for the sources. I installed the sources in another directory, and now it says that the sources are not configured... it's more complicated than I thought.
Any help is really appreciated.
Joc
P.S. Then, the files in the tar.bz2 package...are they sources or binaries?
Yes, it might look as a bit too complicated. But its not that much... be persistent.
I think you are on the right path.
Let's see if you are doing the same as I am:
- extract the contents of advdaq-1.10.0001-1.tar.bz2 to some folder (e.g., ~/daq/)
- this creates the directory: "~/daq/advdaq-1.10.0001/" with source code in it
- README file says some steps
- trying command "make config" on "~/daq/advdaq-1.10.0001/" gives
Code:
scripts/Configure
Enter location of Linux source tree [/usr/src/linux]:
Kernel source tree at /usr/src/linux is not configured
Fix before continuing
make: ** [config] Erro 1
Quote:
headers vs sources?
Header files are files that hold information that may be used by a compiler (like gcc) for compilation of programs. Thus, the linux header files hold information that programs might need when they are compiled.
The linux source tree is not the same. It is the linux source code (wich usually refers to the the kernel source code, alone).
So you need to get the linux source code and unpack it to "/usr/src/linux", or another directory if you so prefer.
I am using Ubuntu. I guess yours steps will be similar.
I tried searching on Synaptic (package manager) and I found a package that might fit. Look for packages with names like "linux-source" or "linux-source-2.6.38". Get the one(s) you find more appropriate.
I installed these 2 packages. Among others, it installed the file "/usr/src/linux-source-2.6.38/linux-source-2.6.38.tar.bz2". This file should contain the source code of your kernel.
Now I created "~/daq/linux/" and extracted the "/usr/src/linux-source-2.6.38/linux-source-2.6.38.tar.bz2" inside it.
After this, I tried to compile your driver (giving it /home/YOU/daq/linux/linux-source-2.6.38/" as the path to the linux source tree. But I am getting errors I can't understand much.
I am not sure if the kernel needs to be built now, and this is causing the errors. If so, you would do: Inside "/home/YOU/daq/linux/linux-source-2.6.38", configure the kernel build with "make menuconfig". And after that a simpler "make", that will take some time...
Its better that someone else continues to help you from here.
I extracted the sources at /usr/src/linux/linux-source-2.6.32 and I did something like:
cd ~/daq/linux/linux-sources-2.6.32/
cp /boot/config-2.6.32-5-686/config-2.6.32-5-686 ./.config (as I saw in http://frank.harvard.edu/~coldwell/at6n00/INSTALL )
then I tried again ~/advdaq/sudo make config:
scripts/Configure
Enter location of Linux source tree [/usr/src/linux]: /usr/src/linux/linux-source-2.6.32
and I got this:
using LINUXDIR=/usr/src/linux/linux-source-2.6.32
Kernel source version is
***
*** WARNING!!!
***
*** The kernel that is currently running (2.6.32-5-686)
*** appears to be a different version than the source in
*** /usr/src/linux/linux-source-2.6.32 ().
*** If so, the current compile will create a module that is
*** INCOMPATIBLE with the running kernel. (This could be
*** what you want, however.)
***
Configure requires bash
make: *** [config] Error 1
I typed bash (nothing happened) and tried again, with the same result
I typed
env and in the first lines I got something like:
TERM=xterm
SHELL=/bin/bash
so, I think I am running bash, am I right?
then I started to look at the scripts, for example, in the script dep.linux I found:
if [ ! -f "$LINUXDIR/.config" ];then
echo Kernel source tree at $LINUXDIR is not configured
echo Fix before continuing
exit 1
fi
I think that's why just by having the .config file, makes the things keep going. Then, in the script named Configure, I found these lines:
. scripts/preconfigure
#
# Make sure we're really running bash.
#
# I would really have preferred to write this script in a language with
# better string handling, but alas, bash is the only scripting language
# that I can be reasonable sure everybody has on their linux machine.
#
[ -z "$BASH" ] && { echo "Configure requires bash" 1>&2; exit 1; }
# Disable filename globbing once and for all.
# Enable function cacheing.
set -f -h
...mmm I was wondering how does this script check if I'm running bash, but I don't understand it, and I haven't found anything on google yet.
just in case I tried chsh and selected /bin/bash, and I tried again sudo make config
with the same result.
anyway, any help is really appreciated.
I did the same, I wrote a # in front of the
[ -z "$BASH" ] && { echo "Configure requires bash" 1>&2; exit 1; } and in front of the -h, but as you said, more errors appear... mmm...
... I still wonder how did they create the deb package ...
Your terminal has a history, there are 2 definate ways to check it
1 way is to open terminal& press the up arrow button
The other way is to check .bash_history file.
But looking at your post you have an extra "." in your command maybe that's the problem.
cp /boot/config-2.4.18-3 ./.config
& the command suggested was
cp /boot/config-2.4.18-3 /usr/src/linux-2.4/.config but you have to change the kernel version to that of your own kernelversion.
Did you cd to the directory copied to & do "make oldconfig"?
If I open a terminal and type bash, apparently nothing happens only a linefeed, and If I do that again, nothing happens, apparently. But, if I type "exit", the output is "exit" too, the same number of exits as the number of bash'es I typed before, If I write exit one more time, the terminal closes. It seems to me that the bash is "nested" if it is called several times.
When I copied the file, I did was already in /usr/src/linux/linux-source-2.6.32 then I typed
cp /boot/conf(tab to complete the name) and "./" for making the destination place the same directory where I was already, and finally ".config" as the name of the file (In the previous post I just copied from the other page sorry for that)... is that right?
and after that I typed ls -htl .config and I see the .config file and the creation time, and I thought that it was fine.
Finally I did the make oldconfig.
Am I missing something?, any more ideas? I'm willing to try anything
and I don't know what to do.
I see grep -r "tmpconfig.h" and I found that the script Configure has a line
CONFIG_H=.tmpconfig.h
and I created the two directories: /include/linux and include/modbuild
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.