COMP 3500 Introduction to Operating Systems Project 2

  • Slides: 11
Download presentation
COMP 3500 Introduction to Operating Systems Project 2 – An Introduction to OS/161 Details

COMP 3500 Introduction to Operating Systems Project 2 – An Introduction to OS/161 Details (cont. ) Dr. Xiao Qin Auburn University http: //www. eng. auburn. edu/~xqin@auburn. edu 1

Building blocks for OS/161 • Before building OS/161 from os 1611. 10. tar. gz,

Building blocks for OS/161 • Before building OS/161 from os 1611. 10. tar. gz, you must first build the following items: 1. 2. 3. 4. tool chain: cs 161 -binutils-1. 4. tar cross compiler: cs 161 -gcc-1. 4. tar special gdb: cs 161 -gdb-1. 4. tar sys 161 MIPS emulator: sys 161 -1. 12. tar The above sequential order is the required order for building!

Build the sys 161 Emulator %cd ~/cs 161 %tar vfxz sys 161 -1. 12.

Build the sys 161 Emulator %cd ~/cs 161 %tar vfxz sys 161 -1. 12. tar. gz %cd sys 161 -1. 12 %. /configure mipseb %make install

A Tool for Code Reading • You must learn how to use “grep” to

A Tool for Code Reading • You must learn how to use “grep” to improve your source code reading skill. %grep –r “stack”. %grep “stack” *. h

Code Reading: An Example 2. What bus/busses does OS/161 support? %cd ~/cs 161/src/kern/arch/mips %grep

Code Reading: An Example 2. What bus/busses does OS/161 support? %cd ~/cs 161/src/kern/arch/mips %grep “bus” *. h You must search the source code using the most appropriate keywords

Building a Kernel • You must first configure your source code tree %cd ~/cs

Building a Kernel • You must first configure your source code tree %cd ~/cs 161/src %. /configure

Configure a Kernel for Project 2 • You must first configure your source code

Configure a Kernel for Project 2 • You must first configure your source code tree % cd ~/cs 161/src/kern/conf %. /config ASST 0

Building the Kernel for Project 2 • The path of your makefile for project

Building the Kernel for Project 2 • The path of your makefile for project 2 is important %cd ~/cs 161/src/kern/compile/ASST 0 %make depend %make install

Building the User level utilities • Remember the path of the makefile %cd ~/cs

Building the User level utilities • Remember the path of the makefile %cd ~/cs 161/src %make • Now you are ready to run your kernel …

Running your newly built kernel • Remember where is your new kernel located %cd

Running your newly built kernel • Remember where is your new kernel located %cd ~/cs 161/root %. /sys 161 kernel • At the prompt, type p /sbin/poweroff <return>

Modifying your kernel • Create a new file ~/cs 161/src/kern/main/hello. c • Edit ~/cs

Modifying your kernel • Create a new file ~/cs 161/src/kern/main/hello. c • Edit ~/cs 161/src/kern/main. c which calls the hello function • Before reconfiguring and rebuilding your kernel, you will need to edit ~/cs 161/src/kern/conf. kern