9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Ugly Q, I admit
@ 2002-11-25 21:34 Joel Salomon
  0 siblings, 0 replies; 11+ messages in thread
From: Joel Salomon @ 2002-11-25 21:34 UTC (permalink / raw)
  To: 9fans

I actually meant to run Bochs (or something similar) *under* plan9, and
run Linux as a guest. Petr Cejchan wanted a linux emulator so ...

Some ancient papers from http://cm.bell-labs.com/cm/cs/who/dmr/cray.html
talk about running Unix as a guest OS. There is also a user-mode-linux
project on http://user-mode-linux.sourceforge.net/ as well as a plethora
of Bochs-like project (usually in uder-finished form). Might be a fun
project..

--Joel
______________________________________________________
Due to economic circumstances, the light at the end of
the tunnel has been turned off.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [9fans] Ugly Q, I admit
@ 2002-11-26 21:00 Russ Cox
  2002-11-27  6:14 ` Bruce Ellis
  0 siblings, 1 reply; 11+ messages in thread
From: Russ Cox @ 2002-11-26 21:00 UTC (permalink / raw)
  To: 9fans

> Does this imply that it would not be difficult to implement dynamic linking natively in Plan 9?

the difficult part of dynamic linking is more in the compiler
and linker than in the kernel proper.  since i'm just running
already-created linux binaries, there's hardly any trouble.

the linuxemu i posted has an "mmap" function that allocates
memory and reads the whole file into it.  not quite the most
efficient way to do it.  i wrote a real mmap for the kernel at the
time, but it didn't seem worth keeping.  the user-side interface
for the kernel mmap is commented out.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [9fans] Ugly Q, I admit
@ 2002-11-26 20:41 Keith Nash
  0 siblings, 0 replies; 11+ messages in thread
From: Keith Nash @ 2002-11-26 20:41 UTC (permalink / raw)
  To: 9fans

> I made linuxemu compile again, and it seems that
> it doesn't support dynamically linked binaries.  I don't
> think it's hard, but apparently never did it.

Does this imply that it would not be difficult to implement dynamic linking natively in Plan 9?



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [9fans] Ugly Q, I admit
@ 2002-11-26 15:14 Russ Cox
  0 siblings, 0 replies; 11+ messages in thread
From: Russ Cox @ 2002-11-26 15:14 UTC (permalink / raw)
  To: 9fans

> Tru "black" commandline ones (perhaps with interaction like 1, 2, Y, N...),
> no X11 or .so

If they're statically linked, then you might be in luck.

I made linuxemu compile again, and it seems that
it doesn't support dynamically linked binaries.  I don't
think it's hard, but apparently never did it.

http://pdos.lcs.mit.edu/~rsc/linuxemu.tar.gz

g% 8.out bin/a.hello
segattach(8000080,10b94)...
hello world
g%

Russ



^ permalink raw reply	[flat|nested] 11+ messages in thread
* [9fans] Ugly Q, I admit
@ 2002-11-25 19:34 Joel Salomon
  2002-11-25 20:45 ` Phil White
  0 siblings, 1 reply; 11+ messages in thread
From: Joel Salomon @ 2002-11-25 19:34 UTC (permalink / raw)
  To: 9fans

Would the Bochs pc emulator be hard to port to plan9? The web page says it
can run linux, etc as guest OSs.

--Joel
______________________________________________________
Due to economic circumstances, the light at the end of
the tunnel has been turned off.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [9fans] Ugly Q, I admit
@ 2002-11-25 14:27 Russ Cox
  2002-11-26  9:50 ` peter a. cejchan
  0 siblings, 1 reply; 11+ messages in thread
From: Russ Cox @ 2002-11-25 14:27 UTC (permalink / raw)
  To: 9fans

> would it be easy/hard/impossible to write a linux emulator for
> Plan9? (however I don't like to spoil plan9 with such things, I
> still have a plethora of linux prgs whose authors don't like to
> release sources... sigh. (windoze deleted 4+ yrs ago, my linux disk
> sleeps silently in my bookshelf... don't like to bring it into life
> more frequently than absolutely necessary))

Writing a program that runs the binaries but
intercepts the system calls and handles them itself
is easy.  I did this a few years ago.  The only wart
in my emulator is that Plan 9's lack of mmap makes
loading programs a little clumsier than it might be.
But I can run hello world, both statically and dynamically
linked.

The real problem is what to do at that point.
Any substantial program depends on other context,
like having an X11 server, or a cursor-addressed
terminal.  Running things like Wine require kernel
support that we just don't have.

In the end, it's not clear to me that it would be much
easier or more convenient than just running a Linux
system.

What kind of programs did you have in mind?

Russ



^ permalink raw reply	[flat|nested] 11+ messages in thread
* [9fans] Ugly Q, I admit
@ 2002-11-25  9:39 Petr Cejchan
  0 siblings, 0 replies; 11+ messages in thread
From: Petr Cejchan @ 2002-11-25  9:39 UTC (permalink / raw)
  To: 9fans

Hi,
would it be easy/hard/impossible to write a linux emulator for
Plan9? (however I don't like to spoil plan9 with such things, I
still have a plethora of linux prgs whose authors don't like to
release sources... sigh. (windoze deleted 4+ yrs ago, my linux disk
sleeps silently in my bookshelf... don't like to bring it into life
more frequently than absolutely necessary))


Sorry,
thanks,
++pac.





=================================================
Icons were abandoned 4000+ years ago with advent of alphabet...
until their zombies plagued a few OSes ;-)
=================================================_

-- 
---
Zajímavé reklamní produkty, výhodná cena, cílení na uživatele
...http://reklama.volny.cz


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-11-27 13:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-25 21:34 [9fans] Ugly Q, I admit Joel Salomon
  -- strict thread matches above, loose matches on Subject: below --
2002-11-26 21:00 Russ Cox
2002-11-27  6:14 ` Bruce Ellis
2002-11-27 13:31   ` Lucio De Re
2002-11-26 20:41 Keith Nash
2002-11-26 15:14 Russ Cox
2002-11-25 19:34 Joel Salomon
2002-11-25 20:45 ` Phil White
2002-11-25 14:27 Russ Cox
2002-11-26  9:50 ` peter a. cejchan
2002-11-25  9:39 Petr Cejchan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).