DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 21st January 2009
fbsduser fbsduser is offline
Shell Scout
 
Join Date: Aug 2008
Posts: 110
Default linux compat and linux-only drivers

Hi. I had been recently running into some hardware that runs fine under linux using drivers that come with the kernel, but aren't supported nativelly by BSD. And I had the curiosity to ask. Can the linux-compat package act as a sort of wrapper to allow the user to use unsupported devices via linux drivers "wrapper" in the linux-compat package?
Reply With Quote
  #2   (View Single Post)  
Old 21st January 2009
DrJ DrJ is offline
ISO Quartermaster
 
Join Date: Apr 2008
Location: Gold Country, CA
Posts: 507
Default

No, unless they are something like printer drivers for CUPS. The linux emulation is user-land only, and not for the kernel space.
Reply With Quote
  #3   (View Single Post)  
Old 21st January 2009
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

With the exception of some USB device drives, using the devel/linux-kmod-compat port, Linux drivers will not work in FreeBSD. Just as Windows drivers will not work in MacOS X.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #4   (View Single Post)  
Old 21st January 2009
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Quote:
Originally Posted by DrJ View Post
No, unless they are something like printer drivers for CUPS. The linux emulation is user-land only, and not for the kernel space.
No period. PPD files are not drivers. Those are description files for printer. If your printer doesn't speak Post Script programing language the drivers are provided by packages Ghostscript, Gutenprint, HPLIP, Splix, and foo2zjs. Those are natively compiled on BSDs from the source. Try to use Linux version of Ghostscript and you will see if it works. By the same taken that is why it is so important that above programs are written in portable fashion not just for Linux.
You can ask the porter of HPLIP and Splix driver of your version of BSD how difficult is to compile those programs on BSDs since they written only for Linux. HPLIP is semi functional on all BSDs because it makes false assumption about USB stuck and Splix is not even compiling on OpenBSD.

Last edited by Oko; 22nd January 2009 at 02:06 AM.
Reply With Quote
  #5   (View Single Post)  
Old 21st January 2009
DrJ DrJ is offline
ISO Quartermaster
 
Join Date: Apr 2008
Location: Gold Country, CA
Posts: 507
Default

Thanks for the correction. I still use a Postscript printer (an HP 4M+, FWIW), so I've intentionally avoided the issue.
Reply With Quote
  #6   (View Single Post)  
Old 21st January 2009
fbsduser fbsduser is offline
Shell Scout
 
Join Date: Aug 2008
Posts: 110
Default

Will a USB-based wifi card work with the linux-compat stuff (the driver comes as part of the linux kernel)?
Reply With Quote
  #7   (View Single Post)  
Old 21st January 2009
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

You can't just drop a driver source package in the kernel source tree and hope it compiles and works. Nor can you drop a binary driver on the filesystem and expect it to load into the kernel (the modules framework is very different between Linux and FreeBSD).

If it's not listed in the ports tree, then probably not. Check the output of:
Code:
# cd /usr/ports
# make quicksearch name=kmod
to see which drivers and other Linux "modules" are known to work. Most of them, though, as for USB web cameras.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #8   (View Single Post)  
Old 22nd January 2009
fbsduser fbsduser is offline
Shell Scout
 
Join Date: Aug 2008
Posts: 110
Default

Quote:
Originally Posted by phoenix View Post
You can't just drop a driver source package in the kernel source tree and hope it compiles and works. Nor can you drop a binary driver on the filesystem and expect it to load into the kernel (the modules framework is very different between Linux and FreeBSD).

If it's not listed in the ports tree, then probably not. Check the output of:
Code:
# cd /usr/ports
# make quicksearch name=kmod
to see which drivers and other Linux "modules" are known to work. Most of them, though, as for USB web cameras.
The driver I'm talking about is the rtl8187b one which is included in the 2.6.27 kernel, which means that I'm not "dropping" it into the linux kernel, it's already in it (that driver was put in mainline linux kernel by the time of the 2.6.27 release). But if it exist in the BSD kernel (unlikelly) or if ndisgen can handle vista drivers (also unlikelly) then I might be able to use it native or via ndisgen.
Reply With Quote
  #9   (View Single Post)  
Old 22nd January 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Weongyo Jeong wrote a driver called urtw(4) for 8187L which is a member of the 8187x, in his initial email he said.
Quote:
Originally Posted by Weongyo Jeong
With lack of H/W I can't add codes for 8187/8187B devices that AFAIK they can share a lot of codes and can be supported without modifying many part of codes.
I'm not sure if this driver was committed to FreeBSD, but it was recently ported to OpenBSD by Kevin Lo, still no 8187B support yet though.

Perhaps you should contact Weongyo, depending on your situation.. perhaps you can help him support your card natively?

I hope it helps..

http://lists.freebsd.org/pipermail/f...er/000217.html
Reply With Quote
Old 22nd January 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Just a small comment about your question; driver compatibility layers are never a good idea in the long run.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NOT another Linux vs BSD thread DNAeon FreeBSD General 21 27th July 2009 03:10 PM
linux-compat questions. fbsduser NetBSD General 7 26th March 2009 06:35 AM
Linux compat status?? DrJ FreeBSD Ports and Packages 7 10th March 2009 11:14 AM
run linux's program johnzlly OpenBSD General 38 8th November 2008 12:10 PM
Linux Kernel map TerryP Other BSD and UNIX/UNIX-like 2 1st July 2008 05:33 AM


All times are GMT. The time now is 04:16 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick