Giter VIP home page Giter VIP logo

simix's Introduction

Simix

Pierre-Yves Baccou
[email protected]


DESCRIPTION

This is an application to run Minix binaries under Linux.
The Minix process is traced with ptrace, Minix-style system calls are intercepted and replaced with Linux-style system calls on the fly.


INSTALLATION

1) Compile with "gcc -static -o ./simix ./minixtrap.c ./syscalls.c ./callnr.c linux_syscall.c" (or run ./compile.sh)

2) Test with a Minix "Hello World" program : "./simix ./hellominix-ack" should work.

3) It is useful to have Linux recognize Minix binaries as a misc binary format.
Run "modprobe binfmt_misc" if necessary, then edit binfmt_string.sh to point to the correct location of simix, and run it as root.
Running Minix binaries directly should now work under Linux: "./hellominix-ack" 

4) To run useful applications, which expect to be running in a Minix installation, the best way is to create a "chroot jail" :
 a) Create a directory eg. ~/minixroot, and copy the contents of /etc and /usr from a Minix installation to minixroot/usr and minixroot/etc.
 b) To get the initial shell working, I had to copy /bin and /lib from my Linux installation to minixroot/bin and minixroot/lib
 c) simix must be copied to minixroot, to a location that mirrors its location in your Linux filesystem.
  eg if it is  located in /home/pyb/minix/simix, it must be copied to minixroot/home/pyb/minix/simix
 d) "sudo chroot ./minixroot" should now be possible ; at least ack, gcc and vi and more simple apps should be working.


LIMITATIONS

I have yet to test simix seriously ; for instance with a Posix test suite. Just realized there is one distributed with Minix :)

Networking doesn't work at all ; Linux and Minix use different devices and ioctls. I don't know if implementing networking is possible at all.


MINIX BUILD

To build Minix 3.1.5 under Linux, copy proto.gen (or the same file from your Minix partition) from this directory to ~/minixroot/usr/src/drivers/memory/ramdisk/proto.gen
Otherwise this file will be generated during the build, incorrectly, under Linux (it reads the contents of /dev).
Apart from that, the build procedure in the same ('make image' in usr/src/tools )

simix's People

Contributors

pyb avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.