diff --git a/ARCHITECTURE.md b/DESIGN.md similarity index 96% rename from ARCHITECTURE.md rename to DESIGN.md index b756497..fd4ac97 100644 --- a/ARCHITECTURE.md +++ b/DESIGN.md @@ -1,4 +1,4 @@ -# Architecture Outline +# Design Outline Gila is a microkernel, and almost all functionality of the OS is relegated to "server" processes. A server is a process that provides a specific @@ -53,4 +53,5 @@ Device driver assignment is performed like so: kernel about the device. The kernel maps relevant regions of physical memory into the process's memory space, and returns information on the new mappings to the process. -- The driver then makes its functions available via IPC and shared memory. \ No newline at end of file +- The driver then makes its functions available via IPC and shared memory. +- The kernel stores information about the driver to avoid spawning duplicates. \ No newline at end of file diff --git a/Makefile.toml b/Makefile.toml index 4c6d8a6..8942a4b 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -27,13 +27,13 @@ BINS = [] [env.development] PROFILE = "dev" -TARGETDIR = "debug" -ARTIFACTDIR = "target/${TARGET}/${TARGETDIR}" +PROFILEDIR = "debug" +ARTIFACTDIR = "target/${TARGET}/${PROFILEDIR}" [env.release] PROFILE = "release" -TARGETDIR = "release" -ARTIFACTDIR = "target/${TARGET}/${TARGETDIR}" +PROFILEDIR = "release" +ARTIFACTDIR = "target/${TARGET}/${PROFILEDIR}" [tasks.default] alias = "run" @@ -77,9 +77,14 @@ args = ["build", "--profile", "${PROFILE}", "--bin", "kernel"] [tasks.bins] dependencies = [] + + + + [tasks.initramfs] condition = { files_modified = { input = [ - + # This will not depend on *every* binary we build. + # If we mount a disk later in boot we can store other binaries there. ], output = ["build/initramfs.tar.lzma"] }, fail_message = "(inputs unchanged)" } dependencies = ["bins"] script = ''' @@ -97,24 +102,24 @@ script = ''' [tasks.iso] condition = { files_modified = { input = [ - "./target/${TARGET}/${TARGETDIR}/kernel", - "./limine.conf", + "${ARTIFACTDIR}/kernel", + "limine.conf", "${LIMINEDIR}/limine-bios.sys", "${LIMINEDIR}/limine-bios-cd.bin", "${LIMINEDIR}/limine-uefi-cd.bin", "${LIMINEDIR}/${LIMINEBIN}" -], output = ["./build/gila.iso"] }, fail_message = "(inputs unchanged)" } +], output = ["build/gila.iso"] }, fail_message = "(inputs unchanged)" } dependencies = ["kernel", "initramfs"] script = ''' mkdir -p build/iso/boot/limine mkdir -p build/iso/EFI/BOOT - cp -f ./limine.conf build/iso/ + cp -f limine.conf build/iso/ cp -f ${LIMINEDIR}/limine-bios.sys build/iso/boot/limine/ cp -f ${LIMINEDIR}/limine-bios-cd.bin build/iso/boot/limine/ cp -f ${LIMINEDIR}/limine-uefi-cd.bin build/iso/boot/limine/ cp -f ${LIMINEDIR}/${LIMINEBIN} build/iso/EFI/BOOT - cp -f ./build/initramfs.tar.lzma build/iso/boot/ + cp -f build/initramfs.tar.lzma build/iso/boot/ cp -f ${ARTIFACTDIR}/kernel build/iso/boot/ diff --git a/README.md b/README.md index fa9b43e..c3cdcbc 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,9 @@ Gila is a Rust microkernel OS, inspired by the Xinu embedded OS, as well as Linu - Valid Limine kernel - Boots on `x86_64` - Kernel command line parameters +- initramfs loading - Logging + - Serial output ### In-Progress @@ -70,10 +72,13 @@ This project uses [cargo-make](https://github.com/sagiegurari/cargo-make) to han Then run `cargo make` to invoke the [Makefile.toml](Makefile.toml). - `cargo make prepare`: Installs needed Rust toolchain. -- `cargo make clean`: Cleans all built binaries, libraries, and ISOs. -- `cargo make cleaniso`: Clean only files involved in building the ISO, leave the kernel and library. +- `cargo make clean`: Cleans all built binaries, libraries, initramfs files, and ISOs. +- `cargo make clean_iso`: Clean only files involved in building the ISO. +- `cargo make clean_initramfs`: Clean only files involved in building the initramfs. - `cargo make lib`: Builds `libgila`, the library that the kernel and user code are linked against. - `cargo make kernel`: Builds the kernel ELF file. +- `cargo make bins`: Builds all binaries included in the system. +- `cargo make initramfs`: Build the init archive. - `cargo make iso`: Builds the bootable ISO with Limine installed. - `cargo make run`: Builds the ISO and boots it in QEMU.