LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-06-2008, 03:20 PM   #1
mahdif
Member
 
Registered: Sep 2006
Distribution: Slackware
Posts: 75

Rep: Reputation: 15
How to make binary drivers


I have a creative modem. the driver is a source tarball. On some systems it works well and installs very easily using ./configure && make && make install.
However on some systems (linux distros) it simply doesn't compile. Can i make a binary or rpm package from the source that works on all systems? Thank u
 
Old 06-06-2008, 07:50 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
I am assuming that this driver is a kernel module, in which case it is building against the kernel the machine is running at compile time. This means that once compiled, it cannot be used on any other kernel build. In other words, the driver is mated to that particular build environment.

Now, if the driver isn't a module, then you should be able to use it on another system as long as it is a relatively similar environment (same versions of core libraries, for example).
 
Old 06-06-2008, 08:25 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
It's a module unless this is Martian technology.

There's no other way that a program can access the hardware directly but to be on the kernel land, and that implies being a kernel module (well, there's the option of FUSE, but that's mainly used for filesystems and the like).

So, no, you can't make a magic rpm. For a kernel module to be able to load its magic info needs to be *exactly* the same than this of the kernel. This means same kernel version, but also same gcc version.

If it doesn't build in a concrete distro it might be because:

1.- you don't have the kernel sources installed
2.- you did not configure them adequately or did not build them
3.- you installed the sources for a kernel that's not the same kernel you are running
4.- others that I can't recall right now

If you want to solve the actual problem (that's compiling the driver on the distros that it doesn't compile) you need to supply the error messages so we can figure out why it fails to compile.

EDIT. Also if there's no legal problem, supply a link to this module or whatever it is. Just to check that it's actually a module and not some other strange thing.

Last edited by i92guboj; 06-06-2008 at 08:26 PM.
 
Old 06-06-2008, 08:33 PM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Not all drivers need to be kernel modules. If the modem is USB, for example, the driver would simply interface with it through libusb; there is no need to go to the kernel level.
 
Old 06-06-2008, 10:36 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by MS3FGX View Post
Not all drivers need to be kernel modules. If the modem is USB, for example, the driver would simply interface with it through libusb; there is no need to go to the kernel level.
Well, to a certain extent. It's a similar case to the FUSE stuff. At a given point, it needs to reach kernel level. With sane it's done via libusb, with ntfs or sshfs is done using fuse, but nonetheless it need support on the kernel side.

It's true that I did not think of libusb, though. But it's just an high level api which directly interacts with the usb kernel modules, so, the important work is still done in kernel land.

But yes, you are right. Whatever he's trying to compile can or cannot be a kernel module. That's why I insisted on seeing it, because there's no way to give accurate help until then.

Cheers.
 
Old 06-07-2008, 01:41 AM   #6
mahdif
Member
 
Registered: Sep 2006
Distribution: Slackware
Posts: 75

Original Poster
Rep: Reputation: 15
Yes it IS a kernel module. My modem uses an ESS chipset, and this is the only driver. On slackware and zenwalk, it installs flawlessly, however on some distros (which have kernel source installed) like pclinux 2008, vector linux and kubuntu 8.04 it doesn't compile. Sometimes it complains about not finding "a proper UTS_RELEASE file", sometimes it can't find "the version.h" file, etc. The driver is here: http://tx.technion.ac.il/~raindel/ess_2.6-v0.4.tar.gz
 
Old 06-08-2008, 12:50 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by mahdif View Post
Yes it IS a kernel module. My modem uses an ESS chipset, and this is the only driver. On slackware and zenwalk, it installs flawlessly, however on some distros (which have kernel source installed) like pclinux 2008, vector linux and kubuntu 8.04 it doesn't compile. Sometimes it complains about not finding "a proper UTS_RELEASE file", sometimes it can't find "the version.h" file, etc. The driver is here: http://tx.technion.ac.il/~raindel/ess_2.6-v0.4.tar.gz
The first thing I would check is that the kernel version is the same kernel version of those distro that DO work. External drivers are usually picky about kernel versions because the kernel changes quickly.

Another thing I'd check is that the kernel you are trying to compile against is not massively patched. Some binary distros seems like they enjoy crapping out the kernel sources. Some of them offer a vanilla-kernel or something similar which you could try.
 
Old 06-08-2008, 01:00 AM   #8
mahdif
Member
 
Registered: Sep 2006
Distribution: Slackware
Posts: 75

Original Poster
Rep: Reputation: 15
Luckily the developer just released a new version that luckily works with all new kernels. Thanks everybody. I learned useful points from you. But my question is how built-in kernel device drivers work. How can the mentioned driver be built into the kernel so that the modem works out of the box?

Last edited by mahdif; 06-08-2008 at 01:05 AM.
 
Old 06-08-2008, 07:00 AM   #9
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
You mean so that it is added to the mainline kernel? The driver would have to be approved for inclusion into the main kernel, which may or may not happen depending on the license the driver is released under.
 
Old 06-09-2008, 07:10 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
According to the notes on the header of the .c file, it's gnu gpl 2, so it should be fine. But I doubt that you are the first to think about this. I would check the linux kernel mailing list archives. More than probably, some discussion about this has already taken place.

If you can't find anything conclusive, you can always try asking there.
 
  


Reply



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
make link to binary file mfran2002 Linux - Newbie 3 07-24-2007 02:24 PM
Anaconda question concerning NVIDIA binary drivers. windoze_hater Fedora 1 06-04-2007 10:01 AM
choseing between binary and open Nvidia drivers Tortanick Debian 9 01-19-2007 04:48 AM
LXer: Pragmatic Questions about Binary-Only Drivers LXer Syndicated Linux News 1 12-25-2006 01:30 PM
LXer: The Role of Binary Drivers in a Free OS LXer Syndicated Linux News 0 08-05-2006 07:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:55 PM.

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