Environments
suggestion:
Windows: windows xp or windows
7
Linux : Ubuntu or Fedora
(Ubuntu10.10 recommended)
gcc version
below 4.1.3(don’t use
the lastest version gcc compiler)
Q1: how to install bochs on
your computer (windows and linux)?
A1:
(1)If you want to install the
bochs on windows
platform you can just download the latest version bochs
software on its office website and simply double click the setup
(bochs-2.4.6.exe) to completely install it in
the directory based on your choice during the installation
process.
(2)If you want to install the
bochs on linux platform
such as Ubuntu or Fedaro, you should just download a stable-version
bochs package on its office website.
Attention please that the last
version (bochs-2.4.6.tar.gz) package cannot be successfully adopted
to run linux kernel image because of some few bugs, so you had
better download bochs-2.4.5.tar.gz and install it on your
system.
Here is the way to install
bochs on linux environment according to my system type --
Ubuntu-10.10:
1)
Firstly install
some necessary packages
#sudo apt-get install
build-essential
#sudo apt-get install
xorg-dev
#sudo apt-get install
libgtk2.0-dev
2)
Secondly compile
bochs and install it
#tar vxzf
bochs-2.4.5.tar.gz
#tar vxzf
bochs-2.4.5.tar.gz
#./configure --enable-debugger
--enable-disasms
#sudo make
#sudo make install
If the process of ‘sudo make’
cannot go on successfully, it mainly lacks some pre-installed
packages. So you should install the lacked packages according to
the error tips on the console and then, again, go through making
and installing bochs.
Q2: how to run linux system on
your installed bochs environment?
A2:
(1)Windows
1)
Firstly assume you
have installed the bochs in the directory of
“D:/Bochs-2.4.6”.
2)
Download the zip
file (linux-0.11-devel-060625.zip)
from website or our tutorial ftp address. So how to use this zip
file and what files does it include? If you unzip it on your
computer(I assume you uncompressed it in the directory of
“D:/ linux-0.11-devel-060625”), you
will find some files under this directory:
Attention: As a start, you can
ignore all files except the three files in the red circle, which
will be useful in the next step. First of all, you should learn
about the functions of these files:
·
Bochsrc-hd.bxrc:
this file is a configuration file for bochs, from which bochs know
where to find the linux Image, root file system and so
on.
·
Bootimage-0.11:it
is compiled linux kernel image.
·
Had-0.11-new.img:
this is the root file system that run on linux kernel
system.
3)
Copy the above
three files to bochs installed directory(D:/Bochs-2.4.6),and modify
several statements of bochsrc-hd.bxrc as below:
·
romimage:
file=$BXSHARE/BIOS-bochs-latest, address=0xf0000
to
romimage:
file=./BIOS-bochs-latest
·
vgaromimage:
$BXSHARE/VGABIOS-lgpl-latest
to
vgaromimage:
file=./VGABIOS-elpin-2.40
·
floppyb:
1_44=diskb.img, status=inserted
to
#floppyb: 1_44=diskb.img,
status=inserted
·
floppy_command_delay:
50000
to
# floppy_command_delay:
50000
·
ips:
4000000
to
#ips: 4000000
4)
Double click
bochsrc-hd.bxrc to run linux(0.11) on bochs, if you see this
window, congratulation, it means you succeed.
(2)linux
1)
Similarly,
uncompress the zip file (linux-0.11-devel-060625.zip) to some directory in
your system(I assume you unzip under “/opt/
linux-0.11-devel-060625”)
#cd /opt
#sudo unzip
linux-0.11-devel-060625.zip
#cd
linux-0.11-devel-060625
2)
Modify
bochsrc-hd.bxrc (some different from windows environment) under the
directory of ‘linux-0.11-devel-060625’ as below:
·
romimage:
file=$BXSHARE/BIOS-bochs-latest, address=0xf0000
to
romimage:
file=$BXSHARE/BIOS-bochs-latest
·
floppyb:
1_44=diskb.img, status=inserted
to
#floppyb: 1_44=diskb.img,
status=inserted
·
floppy_command_delay:
50000
to
# floppy_command_delay:
50000
·
ips:
4000000
to
#ips: 4000000
3)
Run linux kernel on
bochs as follow:
#bochs -f
bochsrc-hd.bxrc
select ‘6’
input ‘c’
4)
if you see this
window, congratulation, you succeed!!!
Q3: how to remove bochs on your
computer? (If you have installed bochs with wrong version on your
system)
A3:
First you should know the way
of bochs you installed on your computer.
(1)if you use apt-get way
to install this software, you can just use this shell command to
remove bochs on your machine:
#sudo apt-get remove
bochs.
(2)However, if you downloaded the
bochs package on the bochs office website and installed it, you
cannot simply use the shell command before to automatically remove
bochs, on the contrary, you should remove it manually, that is, you
have to remove the directories in which the bochs is installed. The
directories can be found by the shell:#sudo
find /
-name bochs
So, get up and remove the directoris readily like this:
#sudo rm
/usr/local/share/bochs
#sudo rm
/usr/local/share/doc/bochs
#sudo rm
/usr/local/bin/bochs
After
you have removed them, you can test whether you have removed it
absolutely as follow:
Switch to any directory easily and input ‘boc’ and further more
click ‘tab’ key on your keyboard. It means that you have removed
successfully If there is no changes, otherwise, you will see
‘bochs’ shell displayed after you impress the ‘tab’
key.