From ce1c6a17e753c75c3b26d9ccfc4fe7ac4648b7c2 Mon Sep 17 00:00:00 2001 From: pigeonmoelleux <pigeonmoelleux@crans.org> Date: Fri, 26 May 2023 03:50:18 +0200 Subject: [PATCH] chore: add README --- README.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main.rs | 1 - 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e922d30 --- /dev/null +++ b/README.md @@ -0,0 +1,88 @@ +# SkavOS + +## Description + +SkavOS is a minimal kernel written in Rust by Balthazar Patiachvili and Vincent Lafeychine, developed for the course "Operating Systems" at the ENS Paris. + +## Installation + +You can install it by running the following steps. You will need at least [`clang`](https://clang.llvm.org/) and [`qemu`](https://www.qemu.org/). + +On a debian-based device, you can install the following packages with `apt`: + +```bash +$ sudo apt-get install build-essential clang curl e2fsprogs git grcov lcov openssh-client rsync qemu-system-x86 +``` + + * Firstly, you need to install the good version of Rust unstable: + ```bash + $ RUST_TOOLCHAIN=nightly-2023-04-30 + + $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + + $ rustup toolchain install ${RUST_TOOLCHAIN} --component clippy llvm-tools-preview rust-src rustfmt + + $ rustup target add x86_64-unknown-none --toolchain ${RUST_TOOLCHAIN} + + $ cargo install cargo-deny + ``` + + * Then, you will need to install the wrapper of `qemu` used in this project : [`skavos-bootimage`](https://gitlab.crans.org/v-lafeychine/skavos-bootimage/): + ```bash + $ git clone https://gitlab.crans.org/v-lafeychine/skavos-bootimage.git + + $ cd skavos-bootimage && cargo install --path . && cd .. + ``` + + * Finally, you can clone [this github repository](https://gitlab.crans.org/pigeonmoelleux/skavos) then compile this project: + ```bash + $ git clone https://gitlab.crans.org/pigeonmoelleux/skavos.git + + $ cd skavos && cargo build --release + ``` + +## Run the project + +To run this project, after following the steps described in [Installation](#installation), you need to create a storage file named `storage` at the project's root: + +```bash +$ dd if=/dev/zero of=storage bs=4M count=10 + +$ mkfs.ext2 storage +``` + +Then, you can finally run the project with: + +```bash +$ cargo run +``` + +### Show the logs + +A syslogger is implemented in this project, you can show one log at time by pressing `ALT + L`, and every log at once using `ALT + P`. + +## Run the tests + +This project contains a lot of tests with a measure of the coverage. + +You can run the tests with: +```bash +$ cargo test +``` + +The result of the coverage measure can be seen in the `target/` directory. + +Moreover, the website https://perso.crans.org/v-lafeychine/skavos/coverage/ contains the results of the coverage for the head of each branch is is updated automatically on each commit on which all the pipelines succeed. + +N.B: The docker image has not been updated for the branch 8, so the coverage is not correct since a few commits. + +## Documentation + +The documentation can be built locally with: +```bash +$ cargo doc +``` +then can be opened with your navigator (e.g for [`firefox`](https://www.mozilla.org/fr/firefox/new/)): +```bash +$ firefox target/x86_64/doc/skavos/index.html +``` diff --git a/src/main.rs b/src/main.rs index 8b629f7..4cdd3b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,6 @@ clippy::separated_literal_suffix, clippy::shadow_reuse, clippy::shadow_unrelated, - clippy::todo, clippy::unreachable, clippy::unwrap_in_result, clippy::wildcard_in_or_patterns, -- GitLab