diff --git a/README.md b/README.md index 78d0439..eede875 100644 --- a/README.md +++ b/README.md @@ -50,21 +50,43 @@ For compiling the main system: To run and try: - * qemu-system-x86 + * qemu-system-i386 For debugging: * ccmake - * gdb or cgdb + * cgdb * xterm -For MacOS users only, you have additional dependencies: +For MacOS, you have additional dependencies: + * i386-elf-binutils * i386-elf-gcc +Prerequisites installation commands +----------------- + +For Ubuntu: + +``` +sudo apt-get update && sudo apt-get upgrade -y +sudo apt-get install -y build-essential git cmake qemu-system-i386 +sudo apt-get install -y cgdb xterm #<- for debug only +``` + +For MacOS: + +You need to install additionally the i386-elf cross-compiler. The simplest installation method is through Homebrew package manager. Install [Homebrew](https://brew.sh/index_it) if you don't already have and exec the following commands: + +``` +brew update && brew upgrade +brew install i386-elf-binutils i386-elf-gcc git cmake qemu nasm +brew install cgdb xterm #<- for debug only +``` + Compiling MentOS ----------------- -Compile and boot MentOS with qemu in Linux systems : +Compile and boot MentOS with qemu in Unix systems: ``` cd @@ -77,7 +99,8 @@ make qemu If you want to access to the shell, use one of the usernames listed in files/passwd. -**Only for Mac** user, instead of `cmake ..` only, you have to put an additional argument: +**For MacOS**, the steps are the same but instead of `cmake ..`, you have to put an additional argument in order to use the i386-elf cross-compiler: + ``` cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake .. ``` @@ -92,6 +115,23 @@ MentOS provides three different scheduling algorithms: * Completely Fair Scheduling If you want to change the scheduling algorithm: + +``` +cd build + +# Round Robin scheduling algorithm +cmake -DSCHEDULER_TYPE=SCHEDULER_RR .. +# Priority scheduling algorithm +cmake -DSCHEDULER_TYPE=SCHEDULER_PRIORITY .. +# Completely Fair Scheduling algorithm +cmake -DSCHEDULER_TYPE=SCHEDULER_CFS .. + +make +make qemu +``` + +Otherwise you can use `ccmake`: + ``` cd build cmake .. @@ -126,6 +166,16 @@ MentOS provides a Buddy System to manage the allocation and deallocation of page frames in the physical memory. If you want to enable the MentOS's Buddy System: + +``` +cd build +cmake -DENABLE_BUDDY_SYSTEM=ON .. +make +make qemu +``` + +Otherwise you can use `ccmake`: + ``` cd build cmake ..