Skip to content

ReturnInfinity/BareMetal-Unikernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BareMetal Unikernel

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.

Table of Contents

Prerequisites

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

Components

BareMetal Unikernel consists of several different projects:

  • Pure64 - The software loader.
  • BareMetal - The kernel.
  • BMFS - The BareMetal File System utility.

Initial configuration

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.

Installing the app

./baremetal.sh YOURAPP.app

This command installs your app to the disk image. The app file should be in sys.

Running the unikernel

./baremetal.sh run

This command starts QEMU to emulate a system. It uses the bmfs.img disk image in sys.

Virtual systems

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

Physical systems

BIOS (legacy systems)

dd the bmfs.img file from sys to a drive.

UEFI (modern systems)

Copy BOOTX64.EFI from sys to you boot medium EFI system partition under /EFI/BOOT/.

// EOF

About

BareMetal as a Unikernel

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •