Skip to content
Snippets Groups Projects
Commit 3ed4ca0e authored by Kenneth R Hancock's avatar Kenneth R Hancock
Browse files

Quality of life changes, silence errors, clean_kernel command etc

parent bc74a2a4
No related branches found
No related tags found
No related merge requests found
...@@ -47,11 +47,20 @@ assignment number. You can run these commands from the shell container. These fu ...@@ -47,11 +47,20 @@ assignment number. You can run these commands from the shell container. These fu
# build_kernel ASST0 # build_kernel ASST0
# test_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. 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 # /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 ## Running GDB
* Make sure you have built the kernel using `build_kernel ASST0`. * 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: * 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. ...@@ -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. 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 There are some noted directories within the container
* `/kernel` holds YOUR assignment code * `/kernel` holds YOUR assignment code
* `/os161-1.99` holds unchanged os161 kernel code * `/os161-1.99` holds unchanged os161 kernel code
......
...@@ -8,9 +8,21 @@ unpack_kernel() { ...@@ -8,9 +8,21 @@ unpack_kernel() {
tar -xf /assignment.tgz -C /kernel --strip-components 1 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() { build_k_helper() {
cd $OS161_DIR cd $OS161_DIR
mkdir /os-compile mkdir /os-compile 2> /dev/null
cp -r /kernel/kern/* $OS161_DIR/kern/ cp -r /kernel/kern/* $OS161_DIR/kern/
set -e set -e
# Configure - step 1 # Configure - step 1
......
...@@ -13,6 +13,7 @@ fi ...@@ -13,6 +13,7 @@ fi
mkdir -p logs mkdir -p logs
chmod a+rwx logs
KERNFILE=$1 KERNFILE=$1
docker run -it --rm \ docker run -it --rm \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment