操作系统开发环境简单设置

  • 格式:pdf
  • 大小:181.48 KB
  • 文档页数:3

下载文档原格式

  / 3
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

《操作系统》实验环境简单配置

This BKM (best known method) is to provide a very simple development environment setup on Windows for THU Operating System MOOC without installing virtual box and linux VM. If you follow this BKM (8 steps in total) correctly, you should have the same simple os development environment as me without complicated environment setup issue.

1.TDM/MinGW Setup (TDM-GCC-4.8.1 32bit)

Use the installer found baidu pan: /s/1bn90RsN or

/projects/tdm-gcc/files/TDM-GCC%20Installer/

Through the install wizard:

⏹Disable "Check for updated files on the TDM-GCC server

⏹Select "Create"

⏹Install to C:\MinGW

⏹Keep default settings

2.Msys Steup

mkdir msys in C:\MinGW

Use the MSys package found at /s/1qWuhs52 or /~jb/msys/msys.7z

Un-7zip it to C:\MinGW\msys\.

Create a desktop shortcut for C:\MinGW\msys\msys.bat which is to open terminal. (right click C:\MinGW\msys\msys.bat to select Create Shortcut) 3.i386-jos-elf toolchain & qemu setup

get i386-jos-elf toolchain & qemu from /s/1hq25c36 unzip it to C:\MinGW

4.Make a change C:\MinGW\msys\etc\fstab

Change mapping as: C:\MinGW\ /usr/local

5.Create .bash_profile in ~/

Click C:\MinGW\msys\msys.bat

vim ~/.bash_profile

to add this line: export PATH=/usr/local/:$PATH

save & exit

6.git Setup [Optional]

if you have os mooc source code already, you can skip this step.

use the installer found /download/win

install with default settings.

open git-bash & get the mooc-os code using git clone.

⏹git clone https:///chyyuu/mooc_os_lab.git

7.Apply patches to enable mingw build & debug environment

Download patch to your mooc-os code directory from:

/s/1mgsn5tY

Open git bash and cd to your mooc-os code directory and use git am to apply patch

⏹git am 0001-Makefile-change-for-mingw-dev-enviroment.patch

8.To build, run and debug your lab

Click C:\MinGW\msys\msys.bat

cd to labX (X is 1~8) in your mooc-os code directory in step 7

⏹to build: make

⏹to run: make qemu-mingw

⏹to debug: make debug-mingw

Congratulations, if you are able to get here, you have the windows based os development environment without installing virtual box and linxu virtual machine. You can complete your lab freely now.

One more thing need to mention is that gdb has no tui mode, if you really want it, you can use Cygwin-based gdb which can support tui mode. I want leave this as your homework.

If you have further question or issue, freely let me know, just drop an email to xlzhang76@.