diff --git a/README.md b/README.md index ba7075d600fb672b5b1406ea764e4932b9afd955..fde0341c1e83b360f3080db42c9af0f0efe90432 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,20 @@ assignment number. You can run these commands from the shell container. These fu # build_kernel ASST0 # test_kernel ASST0 ``` +If you would like to run the kernel normally (no scripts), once built, you can run the kernel +``` +# cd /os-compile +# sys161 kernel +``` + You can evaluate your assignment based on public test cases. There will be hidden test cases that are not avaiable in this repository. ``` # /evalaute /logs/test_public.log /assignments/ASST0 ``` +There also exists a `clean_kernel ASST#` command which will try and clean up old builds, this may be necessary if running into issues. If this +fails that is okay (means there was no build to begin with), just run `build_kernel ASST#` as normal. + ## Running GDB * Make sure you have built the kernel using `build_kernel ASST0`. * To run GDB, open a terminal with the cs350-container running, and enter the following commands: @@ -85,10 +94,7 @@ be given to the scripts used to run and evaluate userspace code. When mounting other directories that are not os161 note that the `build_kernel` and `test_kernel` functionality will not work. -## Running, building and testing userspace code -* - -## Layout +## [Layout](Layout) There are some noted directories within the container * `/kernel` holds YOUR assignment code * `/os161-1.99` holds unchanged os161 kernel code diff --git a/os161-container/helpers.sh b/os161-container/helpers.sh index a5174c77d199b961d61f49f8e4fef26023d8c1d3..2bf6f9e68d31f3c20b260fd86c72b321ce42c36b 100755 --- a/os161-container/helpers.sh +++ b/os161-container/helpers.sh @@ -8,9 +8,21 @@ unpack_kernel() { tar -xf /assignment.tgz -C /kernel --strip-components 1 } +_clean_kernel_h() { + set -e + cd /os161-1.99/kern/compile/$1 + bmake clean + cd - +} + +clean_kernel() { + _clean_kernel_h $1 & + wait +} + build_k_helper() { cd $OS161_DIR - mkdir /os-compile + mkdir /os-compile 2> /dev/null cp -r /kernel/kern/* $OS161_DIR/kern/ set -e # Configure - step 1 diff --git a/run.sh b/run.sh index 6960cce9daf42a211b0ead2e3e36615d70f4cefd..3c0a23a47576ba52953142b1dd0940b8b8a099b0 100755 --- a/run.sh +++ b/run.sh @@ -13,6 +13,7 @@ fi mkdir -p logs +chmod a+rwx logs KERNFILE=$1 docker run -it --rm \