Skip to content

Running native amd64 Plan 9 binaries through Syscall User Dispatch (Linux 5.11+)

Notifications You must be signed in to change notification settings

forked-from-1kasper/9aout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this

9aout runs unmodified Plan 9 binaries in Linux userspace using Syscall User Dispatch to translate Plan 9 syscalls into Linux syscalls (just as WSL 1 does).

Requirements

Linux 5.11+ on amd64, because SUD seems (correct me if I’m wrong) to be unsupported on everything else & GNU Make & GCC

Installation

$ make
$ ./9aout example/hello
Hello, World!

or

$ make DEBUG=1
$ ./9aout example/hello
hello 10000: pwrite(fd = 1, buf = 0x7ffc00000000, len = 14, offset = -1)
Hello, World!
hello 10000: exits(buf = main)

scripts/install-binfmt.sh installs 9aout binary in binfmt_misc, so Plan 9 binaries can be run directly (i.e. ./example/hello instead of ./9aout example/hello).

scripts/uninstall-binfmt.sh reverts everything.

Status

Nothing works except helloworld’s, echo, cat, time, syscall, sam -d, standard assemblers/linkers/compilers (6a/6l/6c for amd64), rc (devdup and devenv not yet supported, so mkdir /fd && mkdir /env).

See also

  • Plan 9 binary format description from 9front manuals.

  • Glendix (GitHub): (very) outdated project doing the same thing but using kernel driver instead. Still can be built in, for example, (probably chroot’ed) Debian Trusty.

  • 9vx: lightweight Plan 9 VM (i386 only).

  • plan9port: port of Plan 9 libraries and utilities to Unix (more like Cygwin).

  • Limbo: abandoned (?) XNU emulator using SUD.

About

Running native amd64 Plan 9 binaries through Syscall User Dispatch (Linux 5.11+)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published