Hello Everyone,
Few days back I installed Bochs from source code, I needed it start my work on Pintos (I will write about this in future posts), it was fun doing it. Bochs is free open source project hosted on sourceforge, so you can download it for free and use it and also make changes to the source and send in your patches and post questions on there mailing list, I must say its one of the active mailing list.
Bochs is a portable x86 and x86-64 IBM PC compatible emulator and a debugger mostly written in C++ and distributed as free software under GNU. So what it means is that it provides an environment similar to the pc but with in the OS (hope I am not confusing), thus providing virtualization similar to another popular open source project Qemu. These emulator's by there name emulate the physical hardware for the OS to run on, they go to an extent of providing a pseudo environment where the OS thinks that it is running on the bare metal hardware but it will be one more process in the user's process list which the user can kill, restart and do what ever he wants with it. So these emulator's are commonly used by
In this post I will be demonstrating the installation of Bocs(2.4.6) from the sourcecode on Ubuntu (if you haven't tried it yet, go grab an Installation CD, it's worth a try). Before we do that, Bochs requires few packages to be pre-installed. So, follow to steps to install Bochs(2.4.6):
Once these packages are installed, we are just few steps.
Few days back I installed Bochs from source code, I needed it start my work on Pintos (I will write about this in future posts), it was fun doing it. Bochs is free open source project hosted on sourceforge, so you can download it for free and use it and also make changes to the source and send in your patches and post questions on there mailing list, I must say its one of the active mailing list.
Bochs is a portable x86 and x86-64 IBM PC compatible emulator and a debugger mostly written in C++ and distributed as free software under GNU. So what it means is that it provides an environment similar to the pc but with in the OS (hope I am not confusing), thus providing virtualization similar to another popular open source project Qemu. These emulator's by there name emulate the physical hardware for the OS to run on, they go to an extent of providing a pseudo environment where the OS thinks that it is running on the bare metal hardware but it will be one more process in the user's process list which the user can kill, restart and do what ever he wants with it. So these emulator's are commonly used by
- OS kernel developers because they have to just start a new process when the kernel crashes rather than restarting the system.
- Most of them use it to try out new OS distributions, mainly to run apps which are not available on there base OS. So a user using a LINUX machine can run window's within his/her machine.
- Harddrives
- CD Drives
- Floppy drives
In this post I will be demonstrating the installation of Bocs(2.4.6) from the sourcecode on Ubuntu (if you haven't tried it yet, go grab an Installation CD, it's worth a try). Before we do that, Bochs requires few packages to be pre-installed. So, follow to steps to install Bochs(2.4.6):
- Since it is written in C++, it requires a c++ compiler, so run
sudo apt-get install build-essential
- The following packages are required to enable X-window's gui used by Bochs to provide a terminal when we run our OS.
sudo apt-get install libx11-dev
sudo apt-get install xserver-xorg-dev
sudo apt-get install xorg-dev
- Ncurses library, it provides API's, that allows the programmers to write text in a terminal (follow the wiki link http://en.wikipedia.org/wiki/Ncurses for more info).
sudo apt-get install libncurses5-dev
- Flex is a free software alternative to lex
sudo apt-get intall flex
- Lastly, GTK library to enable the internal debugger (use --enable-debugger option while running configure).
apt-get install libgtk2.0-dev
apt-get install libgtk2.0-0-dbg
Once these packages are installed, we are just few steps.
- Download the gipped package and unzip it using
tar xf bochs-2.4.6.tar.gz
- cd into the un-tarred directory and run configure (follow the link to see more compiling options). I used
./configure --enable-gdb-stub --with-x --with-x11 --with-term --with-nogui --prefix installation-path
to install the simple bochs and
./configure --enable-debugger --enable-disasm --with-x --with-x11 --with-term --with-nogui --prefix installation-path
to install the Bochs with internal debugger enabled. Use prefix to give different names to two different binaries.
- Now run
make && make install
Nice one...really helpful :)
ReplyDeleteHello,
ReplyDeleteThe Article on Bochs(2.4.6)which is a cross platform IA-32 Emulator is amazing.It give brief information about it ,Thanks for Sharing the information about it.Xamarin Apps Development