# Define the contents of a base system the hypervisor can boot
#
# This base system contains welcome banner(s), system services,
# and guests OSes that are bundled with the hypervisor binary
# and unpacked at run-time
#
# See src/mkdmfs/src/main.rs for the file format
#
# Directory paths are relative to this manifest.toml file
#
# See the notes below on booting more than one guest
#

# these settings can be overridden by whatever's parsing this file, usually mkdmfs
[defaults]
arch = "riscv64gc-unknown-none-elf"
quality = "debug"
outfile = "src/mkdmfs/target/dmfs.img"

# define where to find the welcome banners
[banners]
path = "boot/banners"
welcome = "boot/banners/welcome.txt"

# define system services to include
[services]
include = [ "gooey" ]

# define each individual service

# this is the console usre-interface. it is granted permission to access the system console and
# also other capsules' console buffers to route input and output text between the user and guests
[service.gooey]
path = "src/services"
description = "console interface"
properties = [ "auto_crash_restart", "service_console", "console_write", "console_read", "hv_log_read" ]
ram = 64
cpus = 2

# define guests that may join us during boot

# a mildly useful Linux with busybox, micropython, zsh, and less
[guest.riscv64-linux-busybox-asciiinvaders]
path = "boot/guests"
url = "https://github.com/diodesign/diosix/raw/binaries/buildroot-guests/riscv64-linux-busybox-asciiinvaders"
description = "64-bit RISC-V Linux with asciiinvaders and more"
ram = 256
cpus = 2

# a mildly useful Linux with busybox, micropython, zsh, and less
[guest.riscv64-linux-busybox-micropython]
path = "boot/guests"
url = "https://github.com/diodesign/diosix/raw/binaries/buildroot-guests/riscv64-linux-busybox-micropython"
description = "64-bit RISC-V Linux with Busybox, Micropython, zsh, less"
ram = 128
cpus = 2

# a bare-bones Linux and Busybox
[guest.riscv64-linux-busybox]
path = "boot/guests"
url = "https://github.com/diodesign/diosix/raw/binaries/buildroot-guests/riscv64-linux-busybox"
description = "64-bit RISC-V Linux with Busybox"
ram = 128
cpus = 2

# select the guests to include for a given target

# To include and boot more than one guest, add more than one entry to the guests array
# for the architecture you wish to target. For example, to run three guests,
# a Linux OS with Micropython installed, and two smaller Linux OSes, populate the guests array
# for the default target as follows:
#
# [target.riscv64gc-unknown-none-elf]
# guests = [ "riscv64-linux-busybox-micropython", "riscv64-linux-busybox", "riscv64-linux-busybox-asciiinvaders" ]
#

# RV64GC: this is the default target, loading one guest only by default
[target.riscv64gc-unknown-none-elf]
guests = [ "riscv64-linux-busybox-micropython" ]

# RV64IMAC: alternative target, loading one guest only by default
[target.riscv64imac-unknown-none-elf]
guests = [ "riscv64-linux-busybox-micropython" ]
