From e3f36e8d6c4cd203b99675a862838a991348e995 Mon Sep 17 00:00:00 2001 From: os_lab_user Date: Wed, 11 Feb 2015 11:21:36 +0800 Subject: [PATCH] update README --- README | 148 --------------------------------------- README-chinese.md | 185 ------------------------------------------------ README-english.md | 148 +++++++++++++++++++++++++++++++++++++++ README.md | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 353 insertions(+), 333 deletions(-) delete mode 100644 README delete mode 100644 README-chinese.md create mode 100644 README-english.md create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index ed33b4b..0000000 --- a/README +++ /dev/null @@ -1,148 +0,0 @@ -INTRODUCTION -============ -ucore labs was used as OS Experiments in OS Course Of Dept. of Computer Science & Technology, Tsinghua University. - -ucore is a teaching OS which is derived from xv6&jos in MIT, OS161 in Harvard and Linux. -ucore was developed and used in Department of Computer Science & Technology, Institute for Interdisciplinary Information Sciences, Tsinghua University. -The codes in the files that constitute xv6&jos are Copyright (2006-Current) Frans Kaashoek, Robert Morris, and Russ Cox and uses MIT License. -The codes in the files that constitute OS/161 are written by David A. Holland. -The codes in the files that constitute ucore are Copyright (2010-Current) Yu Chen, Naizheng Wang, Yong Xiang and uses GPL License. -The documents in the files that constitute ucore are Copyright (2010-Current) Yu Chen, Yong Xiang and uses Creative Commons Attribution/Share-Alike (CC-BY-SA) License. - -PEOPLES -======== - -OS course for Dept. CS. in Tsinghua Univ., and MOOC OS course ------------------------------------ -Lectures: Chen, Yu http://soft.cs.tsinghua.edu.cn/~chen -TA: Qi, Xiao qixiao0113@gmail.com -TA: Mao, Junjie eternal.n08@gmail.com - -CONTENTS -======== - -os course info ----------------- -* [newest os course summary materials](https://github.com/chyyuu/mooc_os) -* [newest chinese README for ucore_lab](https://github.com/chyyuu/ucore_lab/README-chinese.md) - -labs info ----------------- -lab0: preparing -lab1: boot/protect mode/stack/interrupt -lab2: physical memory management -lab3: virtual memory management -lab4: kernel thread management -lab5: user process management -lab6: scheduling -lab7: mutex/sync -lab8: filesystem - -WORK IN MS WINDOWS -================== -Working in Linux is encouraged. But If you like to work in MS Windows, we provide virtual machine environment (Runnint Ubuntu in VirtualBox) in -Windows to help you to finish the labs. If you don't want to install ubuntu and other softs to finish these labs in Windows, you can use -VirtualBox soft (https://www.virtualbox.org/) and a virtual disk image with all these softs. Below example is shown how to setup lab environment in Windows. -You can download this virtual disk image -- oslabs_for_student_2012.zip (576.2MB,) from http://pan.baidu.com/share/link?shareid=69868&uk=2585194235, which -is an VirtualBox disk image (contains ubuntu 12.04 and needed softs, and is zipped with zip and xz format), and can be unzipped -by haozip software (http://www.haozip.com). -After unzip oslabs_for_student_XXX.zip, you will get ---- -C:\vms\ubuntu-14.04.vbox.xz -C:\vms\ubuntu-14.04.vmdk.vmdk.xz -C:\vms\ubuntu-14.04.vmdk-flat.vmdk.xz ---- -then you will continue unzip all these files, and get ---- -C:\vms\ubuntu-14.04.vbox -C:\vms\ubuntu-14.04.vmdk.vmdk -C:\vms\ubuntu-14.04.vmdk-flat.vmdk ---- -If you installed VirtualBox soft, then the last step is: double clik file "ubuntu-12.04.vbox" and run ubuntu 12.04 in VirtualBox. -In ubuntu 12.04 login Interface: -username: chy -password: - -After you login, you will see the directory ucore_lab in HOME directory. - -TESTED ENVIRONMENT -================== -UBUNTU 14.04: GCC-4.8.2 CLANG-3.5 -FEDORA 20: GCC-4.8.2 - -EXERCISE STEPS -============== -0 Get the newest os lab src codes/docs.(Insure you can connect to github in ubuntu running on VrtualBox) -0.1 If you try to get all codes - $rm -rf ucore_lab - $git clone git://github.com/chyyuu/ucore_lab.git - $cd ucore_lab -0.2 If you gloned ucore_lab and only try to get the updated codes - $cd ucore_lab - $git pull -1 $cd labX -2 read codes (specially the modified or added files) -3 add your code -4 compile your code - $make -5 check your code - $make qemu -OR - $make grade - -6 debug your code - $make debug - -7 handin your code - $make handin - -OPTION -============== -Now, ucore suuport LLVM/Clang-3.5 + -in step4: - $ USELLVM=1 make -then you will use clang to compile ucore - -GRADE/RANK -========== -Superman: Finish all OS labs in one month by yourself -Master: Finish all OS labs in two month by yourself -Veteran: Finish all OS labs in three month by yourself -Apprentice: Finish all OS labs in one semester with other guy's help - -RESOURCE REPOSITORY -=================== -Basic OS labs (for students who learn OS course) -The newest lab codes and docs is in https://github.com/chyyuu/ucore_lab - -Advanced OS labs (for OS geeks or hackers or guys with Superman/Master Rank) -The newest lab codes and docs is in https://github.com/chyyuu/ucore_plus - -LEARNING DISSCUSS GROUPS -======================== - -os learning group based on QQ -------------------------------- -QQ id: 181873534 - -general discuss --------------------------------- -If you have any questions about ucore basic os labs, -you can subscribe to the Google Groups "os-course" group (http://groups.google.com/group/oscourse?hl=en.) -To post to this group, send email to oscourse@googlegroups.com. -To unsubscribe from this group, send email to oscourse+unsubscribe@googlegroups.com. -For more options, visit this group at http://groups.google.com/group/oscourse?hl=en. - -DEVELOPMENT DISCUSS GROUPS -========================== -If you have any questions about ucore advanced os labs, -If you want to be a developer of ucore or pay attention to the development of ucore, -you can subscribe to the Google Groups "ucore_dev" group (http://groups.google.com/group/ucore_dev?hl=en.) -To post to this group, send email to ucore_dev@googlegroups.com. -To unsubscribe from this group, send email to ucore_dev+unsubscribe@googlegroups.com. -For more options, visit this group at http://groups.google.com/group/ucore_dev?hl=en. - -UCORERS (Contributors) -====================== -Junjie Mao, Yuheng Chen, Cong Liu, Yang Yang, Zhun Qu, Shengwei Ren, Wenlei Zhu, Cao Zhang, Tong Sen, Xu Chen, -Cang Nan, Yujian Fang, Wentao Han, Kaichen Zhang, Xiaolin Guo, Tianfan Xue, Gang Hu, Cao Liu, Yu Su,Xinhao Yuan, ... diff --git a/README-chinese.md b/README-chinese.md deleted file mode 100644 index 05a40d9..0000000 --- a/README-chinese.md +++ /dev/null @@ -1,185 +0,0 @@ -# 介绍(2014) - -ucore OS是用于清华大学计算机系本科操作系统课程的OS教学试验内容。 -ucore OS起源于MIT CSAIL PDOS课题组开发的xv6&jos、哈佛大学开发的 -OS161教学操作系统、以及Linux-2.4内核。 - -ucore OS中包含的xv6&jos代码版权属于Frans Kaashoek, Robert Morris, -and Russ Cox,使用MIT License。ucore OS中包含的OS/161代码版权属于 -David A. Holland。其他代码版权属于陈渝、王乃铮、向勇,并采用GPL License. -ucore OS相关的文档版权属于陈渝、向勇,并采用 Creative Commons -Attribution/Share-Alike (CC-BY-SA) License. - -# 开发维护人员 - -- [陈渝](http://soft.cs.tsinghua.edu.cn/~chen) yuchen AT tsinghua.edu.cn -- 茅俊杰 eternal.n08 AT gmail.com - -助教 -============ -何嘉权 -徐永健 -王 欢 -陈一璋 -... - -# 课程汇总信息 - - -[课程汇总](https://github.com/chyyuu/mooc_os) - -# 实验内容 - -1. lab0 : 完成实验环境的搭建,熟悉基本的Linux命令和工具 -1. lab1 :启动操作系统 -1. lab2 :物理内存管理 -1. lab3 :虚拟内存管理 -1. lab4 :内核线程 -1. lab5 :用户进程 -1. lab6 :处理器调度 -1. lab7 : 同步互斥 -1. lab8 : 文件系统 - - -# 实验环境 -ucore OS实验主要在Linux环境下开发。如果你使用的是非Linux环境,则建议参考下面两种方法。 - -## Windows下基于MingW进行实验 -- windows下如何配置ucore实验环境:这种方式不用安装Linux,感谢“下来障”同学提供的[配置教程](http://pan.baidu.com/s/1i3JxZZR) - -## Windows下基于VirtualBox or VMWare进行实验 - -### 1. 安装VirtualBox or VMWare软件 - -VirtualBox虚拟机软件 - - https://www.virtualbox.org/ - -[NOTICE] 也可以安装vmware虚拟机软件 - -### 2.使用已经预先安装好相关实验环境所需软件的虚拟硬盘 - -并下载已经安装好ubuntu 14.04 x86-64的虚拟硬盘文件压缩包。 -[VirtualBox和虚拟硬盘文件压缩包](http://pan.baidu.com/s/1pJ4XTGZ) - --------------- -[NOTICE] 可下载直接使用[同时用于vmware和virtualbox的OVA格式的虚拟硬盘文件mooc-os.ova]( http://pan.baidu.com/s/1gdePM6J) - - - - -压缩包可以用[haozip for windows软件](http://www.haozip.com)解压。解压压缩包后,可得到如下内容(大约4GB多)。 -``` -\mooc-os\mooc-os.vbox -\mooc-os\mooc-os.vbox-prev -\mooc-os\mooc-os.vdi -``` - -如果此时你已经安装好了VirtualBox,在Windows资源管理器中双击文件“mooc-os.vbox”, -就可以在VirtualBox模拟的x86-64计算机中运行ubuntu 14.04 x86-64,并可以开始学习 -ucore OS实验了。 -``` -用户名是 moocos -口令是 <空格键> -``` - -## 手动在VirtualBox虚拟机中安装ubuntu 14.04 和实验环境相关软件 -(这里假定安装的要是ubuntu14.04 x86-64的系统) -------------------------------------- -1. 在VirtualBox上安装ubuntu -下载ubuntu 14.04 img镜像,并在VirtualBox中安装系统。 - -建议a: 设置虚拟硬盘的大小为8GB以上,虚拟内存在512MB以上。 -建议b: 如果你的机器安装的是32位的windows,则下载32位的ubuntu 14.04 img镜像。 - -2. 在ubuntu系统中安装实验环境相关软件 -在shell(比如gnome-terminal)下可执行如下命令来安装相关软件 (“$”是shell的提示符,不用输入) -``` - $ sudo apt-get update - $ sudo apt-get upgrade - $ sudo apt-get install build-essential git qemu-system-x86 vim-gnome gdb cgdb eclipse-cdt make diffutils exuberant-ctags tmux openssh-server cscope meld -``` -[NOTICE] 最小需要的安装包: build-essential git qemu-system-x86 gdb make diffutils - -# 练习步骤 - -进入VirtualBox中运行的ubuntu,点击左侧的gnome-terminal软件图标,可启动gnome-terminal -软件。在此软件中,执行如下命令: -1. 目前环境中已经有ucore lab源码,可进一步取得最新ucore lab源码 -``` - $cd moocos/ucore_lab #到ucore lab所在目录 - $git pull #取得最新的ucore lab源代码 - $cd -``` -2. 学习源码 -``` - $cd labX #X为 1--8 -``` -3. 阅读,修改源码,可以用eclipse-cdt, understand, gedit或vim软件 -``` - $eclipse -OR - $understand -``` -4. 修改完毕后,编译实验代码 -``` - $make -``` -5. 如果编译无误,则可以运行测试一下 -``` - $make qemu -``` - -6. 如果需要调试, - a. 可基于cgdb的字符方式(以lab1_ans为例) -``` - $cd labcodes_answer/lab1_ans - $make debug -``` -可以看到弹出两个窗口,一个是qemu,一个是cgdb -可以看到在bootloader的bootmain函数处停了下来。 -然后我们就可以进一步在cgdb中用gdb的命令进行调试了 -``` - (gdb)file bin/kernel #加载ucore kernel的符号信息 - (gdb)break kern_init #在函数kern_init处(即 0x100000地址处)设置断点 - (gdb)continue #继续执行 -``` -这时就可以看到在kern_init处停了下来,可进一步调试。 - - b. 基于eclipse-CDT的debug view进行调试,如果安装了zylin debug插件,则完成初步配置后, - 也可很方便地进行调试。 - -7. 可以运行如下命令,看看自己的得分 - $make grade - -# 相关资料 - - -## 希望了解OS基本概念和原理的同学 - - . [OS课程资料]( http://pan.baidu.com/s/1bncWxyv) - . [OS MOOC公开课(原理部分)](http://www.topu.com/mooc/4100) - -## 希望了解OS设计与实现细节的同学 - - . [OS实验资料](http://hejq.me/ucore_docs/) - . [OS实验代码](https://github.com/chyyuu/ucore_lab) - . [OS MOOC公开课(实验部分)](http://www.topu.com/mooc/4100) - -## 希望自己动手实践OS的同学 - - . ["操作系统简单实现与基本原理 — 基于ucore" (持续更新,变动较大) ](http://chyyuu.gitbooks.io/ucorebook/) - . ["操作系统简单实现与基本原理 — 基于ucore" 配套代码](https://github.com/chyyuu/ucorebook_code) - . [ucore plus 跨硬件平台的ucore OS](https://github.com/chyyuu/ucore_plus) - - -# UCORERS (代码贡献者) - -茅俊杰、陈宇恒、刘聪、杨扬、渠准、任胜伟、朱文雷、 -曹正、沈彤、陈旭、蓝昶、方宇剑、韩文涛、张凯成、 -S郭晓林、薛天凡、胡刚、刘超、粟裕、袁昕颢... - - -# NOTICE - -如果你发现了问题,有好的建议或意见,请给 yuchen AT tsinghua.edu.cn 发电邮; -如果你完成这8个实验,且对进一步探索、研究、研发操作系统感兴趣,请给 yuchen AT tsinghua.edu.cn 发电邮,欢迎加入我们的OS兴趣小组,共同进步! diff --git a/README-english.md b/README-english.md new file mode 100644 index 0000000..f15586d --- /dev/null +++ b/README-english.md @@ -0,0 +1,148 @@ +INTRODUCTION +============ +ucore labs was used as OS Experiments in OS Course Of Dept. of Computer Science & Technology, Tsinghua University. + +ucore is a teaching OS which is derived from xv6&jos in MIT, OS161 in Harvard and Linux. +ucore was developed and used in Department of Computer Science & Technology, Institute for Interdisciplinary Information Sciences, Tsinghua University. +The codes in the files that constitute xv6&jos are Copyright (2006-Current) Frans Kaashoek, Robert Morris, and Russ Cox and uses MIT License. +The codes in the files that constitute OS/161 are written by David A. Holland. +The codes in the files that constitute ucore are Copyright (2010-Current) Yu Chen, Naizheng Wang, Yong Xiang and uses GPL License. +The documents in the files that constitute ucore are Copyright (2010-Current) Yu Chen, Yong Xiang and uses Creative Commons Attribution/Share-Alike (CC-BY-SA) License. + +PEOPLES +======== + +OS course for Dept. CS. in Tsinghua Univ., and MOOC OS course +----------------------------------- +Lectures: Chen, Yu http://soft.cs.tsinghua.edu.cn/~chen +TA: Qi, Xiao qixiao0113@gmail.com +TA: Mao, Junjie eternal.n08@gmail.com + +CONTENTS +======== + +os course info +---------------- +* [newest os course summary materials](https://github.com/chyyuu/mooc_os) +* [newest chinese README for ucore_lab](https://github.com/chyyuu/ucore_lab/) + +labs info +---------------- +lab0: preparing +lab1: boot/protect mode/stack/interrupt +lab2: physical memory management +lab3: virtual memory management +lab4: kernel thread management +lab5: user process management +lab6: scheduling +lab7: mutex/sync +lab8: filesystem + +WORK IN MS WINDOWS +================== +Working in Linux is encouraged. But If you like to work in MS Windows, we provide virtual machine environment (Runnint Ubuntu in VirtualBox) in +Windows to help you to finish the labs. If you don't want to install ubuntu and other softs to finish these labs in Windows, you can use +VirtualBox soft (https://www.virtualbox.org/) and a virtual disk image with all these softs. Below example is shown how to setup lab environment in Windows. +You can download this virtual disk image -- oslabs_for_student_2012.zip (576.2MB,) from http://pan.baidu.com/share/link?shareid=69868&uk=2585194235, which +is an VirtualBox disk image (contains ubuntu 12.04 and needed softs, and is zipped with zip and xz format), and can be unzipped +by haozip software (http://www.haozip.com). +After unzip oslabs_for_student_XXX.zip, you will get +--- +C:\vms\ubuntu-14.04.vbox.xz +C:\vms\ubuntu-14.04.vmdk.vmdk.xz +C:\vms\ubuntu-14.04.vmdk-flat.vmdk.xz +--- +then you will continue unzip all these files, and get +--- +C:\vms\ubuntu-14.04.vbox +C:\vms\ubuntu-14.04.vmdk.vmdk +C:\vms\ubuntu-14.04.vmdk-flat.vmdk +--- +If you installed VirtualBox soft, then the last step is: double clik file "ubuntu-12.04.vbox" and run ubuntu 12.04 in VirtualBox. +In ubuntu 12.04 login Interface: +username: chy +password: + +After you login, you will see the directory ucore_lab in HOME directory. + +TESTED ENVIRONMENT +================== +UBUNTU 14.04: GCC-4.8.2 CLANG-3.5 +FEDORA 20: GCC-4.8.2 + +EXERCISE STEPS +============== +0 Get the newest os lab src codes/docs.(Insure you can connect to github in ubuntu running on VrtualBox) +0.1 If you try to get all codes + $rm -rf ucore_lab + $git clone git://github.com/chyyuu/ucore_lab.git + $cd ucore_lab +0.2 If you gloned ucore_lab and only try to get the updated codes + $cd ucore_lab + $git pull +1 $cd labX +2 read codes (specially the modified or added files) +3 add your code +4 compile your code + $make +5 check your code + $make qemu +OR + $make grade + +6 debug your code + $make debug + +7 handin your code + $make handin + +OPTION +============== +Now, ucore suuport LLVM/Clang-3.5 + +in step4: + $ USELLVM=1 make +then you will use clang to compile ucore + +GRADE/RANK +========== +Superman: Finish all OS labs in one month by yourself +Master: Finish all OS labs in two month by yourself +Veteran: Finish all OS labs in three month by yourself +Apprentice: Finish all OS labs in one semester with other guy's help + +RESOURCE REPOSITORY +=================== +Basic OS labs (for students who learn OS course) +The newest lab codes and docs is in https://github.com/chyyuu/ucore_lab + +Advanced OS labs (for OS geeks or hackers or guys with Superman/Master Rank) +The newest lab codes and docs is in https://github.com/chyyuu/ucore_plus + +LEARNING DISSCUSS GROUPS +======================== + +os learning group based on QQ +------------------------------- +QQ id: 181873534 + +general discuss +-------------------------------- +If you have any questions about ucore basic os labs, +you can subscribe to the Google Groups "os-course" group (http://groups.google.com/group/oscourse?hl=en.) +To post to this group, send email to oscourse@googlegroups.com. +To unsubscribe from this group, send email to oscourse+unsubscribe@googlegroups.com. +For more options, visit this group at http://groups.google.com/group/oscourse?hl=en. + +DEVELOPMENT DISCUSS GROUPS +========================== +If you have any questions about ucore advanced os labs, +If you want to be a developer of ucore or pay attention to the development of ucore, +you can subscribe to the Google Groups "ucore_dev" group (http://groups.google.com/group/ucore_dev?hl=en.) +To post to this group, send email to ucore_dev@googlegroups.com. +To unsubscribe from this group, send email to ucore_dev+unsubscribe@googlegroups.com. +For more options, visit this group at http://groups.google.com/group/ucore_dev?hl=en. + +UCORERS (Contributors) +====================== +Junjie Mao, Yuheng Chen, Cong Liu, Yang Yang, Zhun Qu, Shengwei Ren, Wenlei Zhu, Cao Zhang, Tong Sen, Xu Chen, +Cang Nan, Yujian Fang, Wentao Han, Kaichen Zhang, Xiaolin Guo, Tianfan Xue, Gang Hu, Cao Liu, Yu Su,Xinhao Yuan, ... diff --git a/README.md b/README.md new file mode 100644 index 0000000..8499631 --- /dev/null +++ b/README.md @@ -0,0 +1,205 @@ +# 介绍(2015) + +ucore OS是用于清华大学计算机系本科操作系统课程的OS教学试验内容。 +ucore OS起源于MIT CSAIL PDOS课题组开发的xv6&jos、哈佛大学开发的 +OS161教学操作系统、以及Linux-2.4内核。 + +ucore OS中包含的xv6&jos代码版权属于Frans Kaashoek, Robert Morris, +and Russ Cox,使用MIT License。ucore OS中包含的OS/161代码版权属于 +David A. Holland。其他代码版权属于陈渝、王乃铮、向勇,并采用GPL License. +ucore OS相关的文档版权属于陈渝、向勇,并采用 Creative Commons +Attribution/Share-Alike (CC-BY-SA) License. + +# 开发维护人员 + +- [陈渝](http://soft.cs.tsinghua.edu.cn/~chen) yuchen AT tsinghua.edu.cn +- 茅俊杰 eternal.n08 AT gmail.com + +# 主讲老师 +向勇、陈渝 + +助教 +============ +茅俊杰、何嘉权、曹睿东、武祥晋、辛云星、刘聪、常铖 + +教学平台支持 +============ +张禹、郭旭 + +WIKI +=========== +http://os.cs.tsinghua.edu.cn/oscourse/OS2015 + + +学堂在线 +========== +https://www.xuetangx.com/courses/TsinghuaX/30240243X/2015_T1/about + + +在线交流 +========= +- [piazza](https://piazza.com/tsinghua.edu.cn/spring2015/30240243x/home) +- QQ群 181873534 + +# 课程汇总信息 + + -[课程汇总](https://github.com/chyyuu/mooc_os) + +# 实验内容 + +1. lab0 : 完成实验环境的搭建,熟悉基本的Linux命令和工具 +1. lab1 :启动操作系统 +1. lab2 :物理内存管理 +1. lab3 :虚拟内存管理 +1. lab4 :内核线程 +1. lab5 :用户进程 +1. lab6 :处理器调度 +1. lab7 : 同步互斥 +1. lab8 : 文件系统 + + +# 实验环境 +ucore OS实验主要在Linux环境下开发。如果你使用的是非Linux环境,则建议参考下面两种方法。 + +## Windows下基于MingW进行实验 +- windows下如何配置ucore实验环境:这种方式不用安装Linux,感谢“下来障”同学提供的[配置教程](http://pan.baidu.com/s/1i3JxZZR) + +[NOTICE] 没有足够的技术支持,希望有感兴趣的生成一个安装软件包和中文使用说明,方便大家使用! + +## Windows下基于VirtualBox or VMWare进行实验 + +### 1. 安装VirtualBox or VMWare软件 + +VirtualBox虚拟机软件 + + https://www.virtualbox.org/ + +[NOTICE] 也可以安装vmware虚拟机软件 + +### 2.使用已经预先安装好相关实验环境所需软件的虚拟硬盘 + +并下载已经安装好ubuntu 14.04 x86-64的虚拟硬盘文件压缩包。 +[VirtualBox和虚拟硬盘文件压缩包](http://pan.baidu.com/s/1pJ4XTGZ) + +-------------- +[NOTICE] 可下载直接使用[同时用于vmware和virtualbox的OVA格式的虚拟硬盘文件mooc-os.ova]( http://pan.baidu.com/s/1gdePM6J) + + + + +压缩包可以用[haozip for windows软件](http://www.haozip.com)解压。解压压缩包后,可得到如下内容(大约4GB多)。 +``` +\mooc-os\mooc-os.vbox +\mooc-os\mooc-os.vbox-prev +\mooc-os\mooc-os.vdi +``` + +如果此时你已经安装好了VirtualBox,在Windows资源管理器中双击文件“mooc-os.vbox”, +就可以在VirtualBox模拟的x86-64计算机中运行ubuntu 14.04 x86-64,并可以开始学习 +ucore OS实验了。 +``` +用户名是 moocos +口令是 <空格键> +``` + +## 手动在VirtualBox虚拟机中安装ubuntu 14.04 和实验环境相关软件 +(这里假定安装的要是ubuntu14.04 x86-64的系统) +------------------------------------- +1. 在VirtualBox上安装ubuntu +下载ubuntu 14.04 img镜像,并在VirtualBox中安装系统。 + +建议a: 设置虚拟硬盘的大小为8GB以上,虚拟内存在512MB以上。 +建议b: 如果你的机器安装的是32位的windows,则下载32位的ubuntu 14.04 img镜像。 + +2. 在ubuntu系统中安装实验环境相关软件 +在shell(比如gnome-terminal)下可执行如下命令来安装相关软件 (“$”是shell的提示符,不用输入) +``` + $ sudo apt-get update + $ sudo apt-get upgrade + $ sudo apt-get install build-essential git qemu-system-x86 vim-gnome gdb cgdb eclipse-cdt make diffutils exuberant-ctags tmux openssh-server cscope meld +``` +[NOTICE] 最小需要的安装包: build-essential git qemu-system-x86 gdb make diffutils + +# 练习步骤 + +进入VirtualBox中运行的ubuntu,点击左侧的gnome-terminal软件图标,可启动gnome-terminal +软件。在此软件中,执行如下命令: +1. 目前环境中已经有ucore lab源码,可进一步取得最新ucore lab源码 +``` + $cd moocos/ucore_lab #到ucore lab所在目录 + $git pull #取得最新的ucore lab源代码 + $cd +``` +2. 学习源码 +``` + $cd labX #X为 1--8 +``` +3. 阅读,修改源码,可以用eclipse-cdt, understand, gedit或vim软件 +``` + $eclipse +OR + $understand +``` +4. 修改完毕后,编译实验代码 +``` + $make +``` +5. 如果编译无误,则可以运行测试一下 +``` + $make qemu +``` + +6. 如果需要调试, + a. 可基于cgdb的字符方式(以lab1_ans为例) +``` + $cd labcodes_answer/lab1_ans + $make debug +``` +可以看到弹出两个窗口,一个是qemu,一个是cgdb +可以看到在bootloader的bootmain函数处停了下来。 +然后我们就可以进一步在cgdb中用gdb的命令进行调试了 +``` + (gdb)file bin/kernel #加载ucore kernel的符号信息 + (gdb)break kern_init #在函数kern_init处(即 0x100000地址处)设置断点 + (gdb)continue #继续执行 +``` +这时就可以看到在kern_init处停了下来,可进一步调试。 + + b. 基于eclipse-CDT的debug view进行调试,如果安装了zylin debug插件,则完成初步配置后, + 也可很方便地进行调试。 + +7. 可以运行如下命令,看看自己的得分 + $make grade + +# 相关资料 + + +## 希望了解OS基本概念和原理的同学 + + . [OS课程资料]( http://pan.baidu.com/s/1bncWxyv) + . [OS MOOC公开课(原理部分)](http://www.topu.com/mooc/4100) + +## 希望了解OS设计与实现细节的同学 + + . [OS实验资料](http://hejq.me/ucore_docs/) + . [OS实验代码](https://github.com/chyyuu/ucore_lab) + . [OS MOOC公开课(实验部分)](http://www.topu.com/mooc/4100) + +## 希望自己动手实践OS的同学 + + . ["操作系统简单实现与基本原理 — 基于ucore" (持续更新,变动较大) ](http://chyyuu.gitbooks.io/ucorebook/) + . ["操作系统简单实现与基本原理 — 基于ucore" 配套代码](https://github.com/chyyuu/ucorebook_code) + . [ucore plus 跨硬件平台的ucore OS](https://github.com/chyyuu/ucore_plus) + + +# UCORERS (代码贡献者) + +茅俊杰、陈宇恒、刘聪、杨扬、渠准、任胜伟、朱文雷、 +曹正、沈彤、陈旭、蓝昶、方宇剑、韩文涛、张凯成、 +S郭晓林、薛天凡、胡刚、刘超、粟裕、袁昕颢... + + +# NOTICE + +如果你发现了问题,有好的建议或意见,请给 yuchen AT tsinghua.edu.cn 发电邮; +如果你完成这8个实验,且对进一步探索、研究、研发操作系统感兴趣,请给 yuchen AT tsinghua.edu.cn 发电邮,欢迎加入我们的OS兴趣小组,共同进步!