A project to get a Linux shell running on iOS. Currently, a usermode x86 emulator for Linux.
Roadmap:
- Hello world in assembler
- Hello world with statically linked C library
- Hello world with dynamically linked C library
- Busybox shell
- Busybox vi (VIM MASTER RACE)
- Busybox login
- Busybox getty
- Busybox wget
- Alpine package manager
- Port the thing to Darwin/iOS
- QEMU cpu test program
You'll need these things to build the project:
- Python 3
- Ninja
- Meson
- Docker (required to build the VDSO)
To set up your environment, cd to the project and run meson build
. Then run ninja
in the build directory to build.
Run programs with ./ish program
. If you're not sure what to run, there are some test programs in (you guessed it) tests
. Run ninja busybox
to download and build busybox.
To set up a self-contained Alpine linux filesystem, download the Alpine minirootfs tarball for i386 from the alpine website and run the tools/fakefsify.py
script. Specify the minirootfs tarball as the first argument and the name of the output directory as the second argument. Then you can run things inside the Alpine filesystem with ./ish -r alpine/data /bin/login
, assuming the output directory is called alpine
.
You can replace ish
with tools/ptraceomatic
to run the program in a real process and single step and compare the registers at each step. I use it for debugging. Requires 64-bit Linux 4.11 or later.
To compile the iOS app, just open the Xcode project and click run. There are scripts that should download and set up the alpine filesystem and create build directories for cross compilation and so on automatically.