Building
Acquire source code
git clone https://github.com/au-ts/lionsos.git
cd lionsosDependencies
Run the following commands depending on your machine:
sudo apt update && sudo apt install make cmake clang lld llvm device-tree-compiler unzip git qemu-system-arm python3 python3-pip
# If you see 'error: externally-managed-environment', add --break-system-packages
pip3 install sdfgen==0.35.0# Make sure that you add the LLVM bin directory to your path.
# For example:
# echo export PATH="/opt/homebrew/Cellar/llvm/bin:$PATH" >> ~/.zshrc
# Homebrew will print out the correct path to add
brew install make dtc llvm qemu
# If you see 'error: externally-managed-environment', add --break-system-packages
pip3 install sdfgen==0.35.0sudo pacman -Sy make clang lld dtc python3 python-pip
# If you see 'error: externally-managed-environment', add --break-system-packages
pip3 install sdfgen==0.35.0nix developAcquire the Microkit SDK
Run the following commands depending on your machine:
wget https://github.com/seL4/microkit/releases/download/2.3.0/microkit-sdk-2.3.0-linux-x86-64.tar.gz
tar xf microkit-sdk-2.3.0-linux-x86-64.tar.gzwget https://github.com/seL4/microkit/releases/download/2.3.0/microkit-sdk-2.3.0-macos-aarch64.tar.gz
tar xf microkit-sdk-2.3.0-macos-aarch64.tar.gzwget https://github.com/seL4/microkit/releases/download/2.3.0/microkit-sdk-2.3.0-macos-x86-64.tar.gz
tar xf microkit-sdk-2.3.0-macos-x86-64.tar.gzCompiling the webserver system
For the web server to load the website’s files, it expected to be connected to an NFSv3 server. As part of the build process, you will need to supply the IP address of this server.
cd examples/webserver
export MICROKIT_SDK=/path/to/sdk
# Platform to target
export MICROKIT_BOARD=qemu_virt_aarch64
# IP adddress of NFS server to connect to
export NFS_SERVER=<ip address of NFS server>
# NFS export to mount
export NFS_DIRECTORY=/path/to/dir
# Location of website's static files on NFS export
export WEBSITE_DIR=/path/to/website
# Compile the system
makecd examples/webserver
export MICROKIT_SDK=/path/to/sdk
# Platform to target
export MICROKIT_BOARD=odroidc4
# IP adddress of NFS server to connect to
export NFS_SERVER=<ip address of NFS server>
# NFS export to mount
export NFS_DIRECTORY=/path/to/dir
# Location of website's static files on NFS export
export WEBSITE_DIR=/path/to/website
# Compile the system
makeIf you need to build a release version of the system:
make MICROKIT_CONFIG=releaseNext steps
If you have successfully compiled the system, there should be a file
build/webserver.img.
You can now move to running the system on QEMU or running the system on hardware.