emulation in the browser via [v86](https://github.com/copy/v86), and includes:
* a custom Linux 4.15 kernel, which strips out many unnecessary drivers, modules, etc. and adds [Plan 9 filesystem](https://www.kernel.org/doc/Documentation/filesystems/9p.txt) sharing
* a root filesystem and Unix commands via [BusyBox](https://busybox.net/)
* an ISO-based bootloader (i.e., we create a "DVD" that is booted by v86)
Following the [Buildroot customization docs](https://buildroot.org/downloads/manual/manual.html#customize)
we create a folder `buildroot-v86/` with all the necessary config files,
filesystem overlay, and scripts necessary to build our distribution.
NOTE: we define two [volumes](https://docs.docker.com/engine/reference/builder/#volume) to
allow the container to access the v86 config, and also to write the ISO once complete. In the
above I've used `$PWD`, but you can use any absolute path.
When the build completes, an ISO file will be places in `./dist/v86-linux.iso`
in your source tree (i.e., outside the container).
If you need to re-configure things, instead of just running the build, do the following:
```bash
$ docker run \
--rm \
--name build-v86 \
-v $PWD/dist:/build \
-v $PWD/buildroot-v86/:/buildroot-v86 \
-ti \
--entrypoint "bash" \
buildroot
```
Now in the resulting bash terminal, you can run `make menuconfig` and [other make commands](https://buildroot.org/downloads/manual/manual.html#make-tips).
## `buildroot-v86/` Layout
We define a `v86` buildroot "board" via the following files and directories:
```
+-- board/
+-- v86
+-- linux.config # our custom Linux kernel config (make linux-menuconfig)
+-- post_build.sh # script to copy ISO file out of docker container
+-- rootfs_overlay/ # overrides for files in the root filesystem
+-- etc/
+-- inittab # we setup a ttyS0 console terminal to auto-login
+-- fstab # we auto-mount the Plan 9 Filer filesystem to /mnt