《Orange’s 一个操作系统的实现》1.搭建操作系统开发环境

书中给出了两种环境:windows和linux,平台选择根据自己喜好.本人这里选择ubuntu10.04+virtualbox作为开发平台.

    1.下载、安装VirtualBox      

       http://download.virtualbox.org/virtualbox/4.0.0/VirtualBox-4.0.0-69151-Win.exe

    2.下载ubuntu安装文件

       http://www.ubuntu.com/desktop/get-ubuntu/download

    3.在VirtualBox中虚拟安装ubuntu10.04

       安装方式比较简单,可以选择自动分区或者手动分区,google一下很多,以下论坛很多很详细

      http://forum.ubuntu.org.cn/

    4.安装ok后,安装中文语言包(根据自己喜好)和更新

gcc等开发环境必备的组件更新必须安装

    5.下载、编译安装Bochs

       这个可是会有好多问题,网上已经有人给出了具体步骤,可以搜索ubuntu 10.04编译安装bochs,

网友给出的步骤如下

下载bochs后http://downloads.sourceforge.net/project/bochs/bochs/2.4.5/bochs-2.4.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fbochs%2Ffiles%2Fbochs%2F2.4.5%2F&ts=1294142990&use_mirror=nchc

1. sudo apt-get install build-essential

2. sudo aptitude install xorg-dev

3. sudo aptitude install libgtk2.0-dev

4. tar vxzf bochs-2.4.5.tar.gz

5. cd bochs-2.4.5/

6. ./configure --enable-debugger --enable-disasm

7. make

8. make install

     6.安装汇编编译器nasm

           sudo apt-get install nasm即可

       7.安装VirtualBox 附加组件

          安装附加组件使用共享及无缝窗口(很赞的一个功能)

           a.设备->安装增强功能

           b.在虚拟ubuntu中,进入/midia/VBOXADDITIONS_4.0.0_69151

              <VirtualBox版本不同,目录名也不同>

           c.执行sudo sh ./VBoxLinuxAdditions.run

           d.重启Ubuntu即可

           e.在VirtualBox菜单添加需要共享的文件夹的数据空间

           f.在Ubuntu中挂在共

             sudo mount -t vboxsf 共享名 /mnt/share

        8.编辑器选择VIM或EMACS

至此,我们的操作系统开发环境已经搭建好了.

尝试过,在windows中编辑代码,在linux下编译代码.再在windows中运行调试代码,太费事了.最后还是搭建了linux的环境.

原文地址:https://www.cnblogs.com/xumaojun/p/8544079.html