- 论坛徽章:
- 0
|
操作系统 ubuntu 8.04
一、编译linux0.11源码
1. 建立linux0.11编译环境,安装 gcc , g++ cpp , gas , gld , as86 , ld86
sudo apt-get install build-essential
sudo apt-get install bin862. linux0.11
2. 下载linux0.11源码 与 磁盘镜像
源码包: http://www.oldlinux.org/oldlinux/attachment.php?aid=658
linux-0.11-081030.tar.gz
硬盘镜像:http://oldlinux.org/Linux.old/bochs/linux-0.11-devel-060625.zip
linux-0.11-devel-060625.zip
3. 编译
出错时,在Makefile的 CFLAGS参数中加入-fno-stack-protector
make
如果没有出错则会在 linux-0.11 的目录下生成 Image 文件,OK!
二、编译安装 bochs-2.3.5
1. 下载 bochs-2.3.5
2. 建批处理文件 bochs-install.sh
#!/bin/bash
#一.安装bochs
#清理(如果不是第一次安装则需清理)
make clean
#解包
tar xvfz bochs-2.3.5.tar.gz
#进入bochs-2.3.5目录
cd bochs-2.3.5
#3. 配置
./configure --prefix=/opt/bochs/debug --enable-plugins --enable-debugger --enable-disasm
#4. 编译
make
#5. 安装
sudo make install
#6.加一个符号连接
sudo ln -s /opt/bochs/debug/bin/bochs /usr/bin/bochsdbg
#第二个版本为使用gdb-stub的版本
#1. 清理
make clean
#2. 配置
./configure --prefix=/opt/bochs/gdbstub --enable-plugins --enable-disasm --enable-gdb-stub
#3. 编译
make
#4. 安装
sudo make install
#5.建一个符号链接
sudo ln -s /opt/bochs/gdbstub/bin/bochs /usr/bin/bochs
3. chmod +x bochs-install.sh
./bochs-install.sh
三、运行linux0.11
1. 创建bochs运行的配置文件 bochs.bxrc
2. 内容如下
romimage: file=$BXSHARE/BIOS-bochs-latest
cpu: count=1, ips=10000000, reset_on_triple_fault=1
megs: 16
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
vga: extension=vbe
floppya: 1_44=./Image, status=inserted
ata0-master: type=disk, path="hdc-0.11-new.img",mode=flat, cylinders=410, heads=16, spt=38
boot: a
mouse: enabled=0
3. 运行
bochs -f ./bochs.bxrc
四. 调试
(未完)
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/107080/showart_2114396.html |
|