This repository contains the necessary setup, code, and script to use BareMetal as a Unikernel. The first program listed in BMFS will be loaded and executed.
The script in this repo depends on a Debian-based Linux system like Ubuntu or Elementary. macOS is also supported to build and test the OS, as well as the Assembly applications, if you are using Homebrew.
- NASM - Assembly compiler to build the loader and kernel, as well as the apps written in Assembly.
- QEMU - Computer emulator if you plan on running the OS for quick testing.
- Git - Version control software for pulling the source code from GitHub.
In Linux this can be completed with the following command:
sudo apt install nasm qemu-system-x86 git
In macOS via Homebrew this can be completed with the following command:
brew install nasm qemu git
BareMetal Unikernel consists of several different projects:
git clone https://github.com/ReturnInfinity/BareMetal-Unikernel.git
cd BareMetal-Unikernel
./baremetal.sh setup
./baremetal.sh setup
automatically runs the build and install functions. Once the setup is complete you can execute ./baremetal.sh YOURAPP.app
to load a program to the disk image and ./baremetal.sh run
to run it.
./baremetal.sh YOURAPP.app
This command installs your app to the disk image. The app file should be in sys
.
./baremetal.sh run
This command starts QEMU
to emulate a system. It uses the bmfs.img
disk image in sys
.
The bmfs.img
disk image in sys
can be uploaded to your cloud provider of choice. Otherwise you can create different disk images as follows:
./baremetal.sh vdi
- Generate VDI disk image for VirtualBox
./baremetal.sh vmdk
- Generate VMDK disk image for VMware
./baremetal.sh vpc
- Generate VPC disk image for HyperV
dd
the bmfs.img
file from sys
to a drive.
Copy BOOTX64.EFI
from sys
to you boot medium EFI system partition under /EFI/BOOT/
.
// EOF