Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Project 2 - how to compile os161?


Published on

This module shows you how to install a software development framework for OS/161.
Lecture: 30 minutes – Slides 1-20.
Demo: 20 minutes
1. Project 2 Specification.docx Preview the documentView in a new window 2. How to build tool chain: The MIPS toolchain for os161.txtPreview the documentView in a new window 3. How to build and run sys161.htmlView in a new window 4. gdb.htm View in a new window and cvs.htmView in a new window 5. Configuration file: sys161.confView in a new window Below, you can find five source code packages: 6. os161-1.10.tar.gzView in a new window 7. cs161-binutils-1.4.tarView in a new window 8. Download cs161-gcc-1.4.tar from: 9. Download cs161-gdb-1.4.tar from: 10. sys161-1.12.tar.gzView in a new window

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Project 2 - how to compile os161?

  1. 1. 1 COMP 3500 Introduction to Operating Systems Project 2 – An Introduction to OS/161 Details Dr. Xiao Qin Auburn University
  2. 2. 2 Did you carry out project 1 ?
  3. 3. Exercise 1 (Plickers)  What is the yum command ? A. A configuration software tool B. A troubleshooting software tool C. An automated uninstallation program D. An automated update program
  4. 4. Exercise 2 (Plickers)  In the gdb debugger, typing character ‘n’ means: A. ‘next’ - Step into the next function. B. ‘new’ - Set a new breakpoint C. ‘next’ - Continue to the next source line D. ‘new’ – Create a new local variable
  5. 5. Exercise 3 (Plickers)  What does the following command do? #cvs -d /cs161_cvsroot init A. Create a CVS root B. Create a CVS repository C. Delete a CVS root D. Delete an initial CVS root
  6. 6. Exercise 4 (Plickers)  What does the following command do? %tar vfcz <group_ID>_project1.tgz . A. Create a single compressed file for project 1 B. Uncompress files for project 1 C. Validate files of project 1 D. Install files of project 1
  7. 7. 7
  8. 8. 8
  9. 9. Setting up PATH • If you use bash, add the following line near the end of the ~/.bashrc file. export PATH=~/cs161/bin:$PATH • If you use tcsh, add the following line near the end of the ~/.cshrc file: setenv PATH ~/cs161/bin:$PATH $export PATH=~/cs161/bin:$PATH
  10. 10. Setting up CVSROOT • If you use bash, add the following line near the end of the ~/.bashrc file. export CVSROOT=~/cs161/cvsroot • If you use tcsh, add the following line near the end of the ~/.cshrc file: setenv CVSROOT ~/cs161/cvsroot %export CVSROOT=~/cs161/cvsroot
  11. 11. Building blocks for OS/161 Before building OS/161 from os161-1.10.tar.gz, you must first build the following items: 1. tool chain: cs161-binutils-1.4.tar 2. cross compiler: cs161-gcc-1.4.tar 3. special gdb: cs161-gdb-1.4.tar 4. sys161 MIPS emulator: sys161-1.12.tar The above sequential order is the required order for building!
  12. 12. 12 Linux: CentOS Tool chain: cs161-binutils-1.4.tar cross compiler: cs161-gcc-1.4.tar special gdb: cs161-gdb-1.4.tar sys161 MIPS emulator: sys161-1.12.tar OS/161: os161-1.10.tar.gz Build a Software Framework for OS/161
  13. 13. 13 /cs161 Source Code Tree /src /root /kern /include /sys161 (bin) /conf /compile ASST0 (file) /ASST0 (dir) makefile
  14. 14. Build the Tool Chain %cd ~/cs161 %tar vfxz cs161-binutils-1.4.tar %cd cs161-binutils-1.4 %./
  15. 15. Build the Cross Compiler %cd ~/cs161 %tar vfxz cs161-gcc-1.4.tar %cd cs161-gcc-1.4 %./
  16. 16. Build the Special gdb %cd ~/cs161 %tar vfxz cs161-gdb-1.4.tar %cd cs161-gdb-1.4 %./
  17. 17. Build the sys161 Emulator %cd ~/cs161 %tar vfxz sys161-1.14.tar.gz %cd sys161-1.14 %./configure mipseb %make %make install
  18. 18. 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
  19. 19. Exercise: Code Reading: An Example 2. What bus/busses does OS/161 support? You must search the source code using the most appropriate keywords %cd ~/cs161/src/kern/arch/mips/mips %grep ‘bus’ *.c
  20. 20. Building a Kernel You must first configure your source code tree %cd ~/cs161/src %./configure
  21. 21. Configure a Kernel for Project 2 You must first configure your source code tree % cd ~/cs161/src/kern/conf % ./config ASST0
  22. 22. Building the Kernel for Project 2 The path of your makefile for project 2 is important %cd ~/cs161/src/kern/compile/ASST0 %make depend %make %make install
  23. 23. Building the User level utilities • Remember the path of the makefile %cd ~/cs161/src %make • Now you are ready to run your kernel …
  24. 24. Running your newly built kernel • Remember where is your new kernel located %cd ~/cs161/root %./sys161 kernel • At the prompt, type p /sbin/poweroff <return>
  25. 25. 25