Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Mar 2003 13:37:00 -0500
From:      taxman <taxman@acd.net>
To:        Lars Eighner <eighner@io.com>, freebsd-questions@freebsd.org
Subject:   Re: How to make a linux binary run on FreeBSD
Message-ID:  <200303161337.00677.taxman@acd.net>
In-Reply-To: <20030316082949.Y572@pearl.io.com>
References:  <20030316082949.Y572@pearl.io.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 16 March 2003 09:31 am, Lars Eighner wrote:
>          I have a Savage/IX agp card.  Savage/IX was developed for
>          laptops so of its three possible output devices (LCD, CRT,
>          and several flavors of TV), by default it assumes that is
>          attached to a 640x480 LCD.  Naturally this produces
>          undesirable results when a CRT is attached instead.
>
>          S3 provided a utility (s3switch) which allows choose which
>          output device or combination of output devices are attached.
>          This utility works fine with RedHat 8.0.  It runs from the
>          command line or within X.
>
>          When I run it from the command line in FreeBSD 4.8-RC with
>          linux-compatibility in my kernel, the S3 utility fails
>          thusly:
>
> vm86() failed
> return = 0xffffffda
> eax = 0x00004f14
> ebx = 0x00000003
> ecx = 0x00000001
> edx = 0x00000000
> esi = 0x00000000
> edi = 0x00000000
> ebp = 0x00000000
> eip = 0x00004898
> cs  = 0xc000
> esp = 0x00000ffa
> ss  = 0x1000
> ds  = 0x0000
> es  = 0x0000
> fs  = 0x0000
> gs  = 0x0000
> eflags  = 0x00003200
> cs:ip = [ fb fc 80 fc 0e 74 48 80 fc 0c 74 46 80 fc 0d 74 ]
> Can't change device (vm86 failure)
>
>          And this message is broadcast:  "linux: syscall vm86old is
>          obsoleted or not implemented.

This seems pretty clear.  The linuix syscall that this program uses is not 
supported on FreeBSD.  The linux binary compatibility is pretty good for 
userland binaries and so forth.  But any time you get into hardware, you're 
stepping closer into that 10% of linux code that will not run on FreeBSD.

It seems your only option would be to port that source code to FreeBSD, and 
use the right syscalls.  Try an email to -hackers to see if anybody has any 
ideas on that.

Personally given how cheap a simple working videocard can be, ($10 used) I 
don't know if I would beat my head against a wall to try to get it working.  
But if you want to experiment for fun, then by all means don't let me 
discourage.

>
>          Naturally, the source code will not compile on FreeBSD as it
>          includes a number of headers which don't exist in FreeBSD,
>          and according to Roberts' web page the utility depends on
>          vm86, from which I surmise there is no simple way to make it
>          compile and run on FreeBSD, with or without linux
>          compatibility.

Well I think porting the code would be more likely than getting the binary to 
work.

Tim


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303161337.00677.taxman>