[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-sparc
Subject:    Re: SI_MACHINE
From:       "DrXyzzy" <drxyzzy () mediaone ! net>
Date:       1999-07-12 19:14:07
[Download RAW message or body]

Theo-

Of course I don't want to break anything in OpenBSD. And I
don't want to turn OpenBSD into Solaris - I'm just interested in
giving users the ability to run binaries on OpenBSD that previously
ran on Solaris, if that's feasible.

There are two issues:

1. Every Solaris binary I have looked at, both OS commands and
homebrew programs built with the Sun compiler, starts by calling
systeminfo(SI_PLATFORM,...) to get the machine type, then looks
in /usr/platform/<machine name>. Solaris returns "sun4m" or such
for this call. With the patch I submitted to svr4_stat.c, OpenBSD
returns "sparc" instead of cpu_model[] which had spaces and
slashes - not good in a file path. We could leave it that way and
tell people doing Solaris emulation to ln -s /usr/platform/sun4x
to /usr/platform/sparc, I guess.

2. The svr4 emulated system call uname() fills in "sparc" for
machine name on OpenBSD where Solaris puts in sun4x. Are you
saying that changing the *emulated* uname() call, not the native
OpenBSD call, will break things? If so, then I hereby cease and
desist proposing any change to uname() in svr4_stat.c.

Hal
----- Original Message ----- 
From: Theo de Raadt <deraadt@cvs.openbsd.org>
To: Hal Snyder <drxyzzy@mediaone.net>
Cc: <sparc@openbsd.org>
Sent: Monday, July 12, 1999 12:57 PM
Subject: Re: SI_MACHINE 


> > Does anyone have a quick way of getting the machine type, e.g.
> > sun4c/sun4m/sun4u from the OpenBSD kernel, short of parsing
> > the verbose cpu_model string? I'm asking before I write an ugly
> > patch and mail it to Theo...
> 
> No.  Sorry.  And I am not changing the uname output.
> 
> > In OpenBSD-2.5 and -current svr4 emulation, I think uname() and
> > systeminfo(SI_MACHINE,...) are returning the wrong information.
> 
> No it isn't.  It should return sparc.  Shitloads of things in the
> system depend on it.  Even gcc.
> 
> > Under Solaris 2.5.1 and later, "uname -m" returns "sun4m" or such.
> > Running the same binary (not the BSD uname command) on
> 
> Well, this isn't Solaris.
> 
> 
> > OpenBSD should do the same thing, so that going into /platform
> > and /usr/platform directories makes sense.
> 
> No way.  It returns the general machine architecture.
> 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic