The software required for the geekos experiment in Linux mainly includes NASM and bochs ).
1. Version 0.98 is recommended for NASM. If you use a newer version of bochs to boot the system image, an error occurs. Download the executable files in Linux directly, copy them to the/usr/bin/directory, and enter sudo chmod + x/usr/bin/NASM in the terminal.
2. The latest bochs version is 2.5.1. Download the bochs-2.5.1.tar.gz file and copy it to the main directory (usually/home/XXX ). Enter the tar xzvf bochs-2.5.1.tar.gz in the terminal to decompress the package. Then CD bochs-2.5.1, execute./configure in the bochs-2.5.1 directory, then execute make and finally execute sudo make install so that the bochs is installed to the/usr/local/bin directory .. /Configure can be followed by the parameter -- prefix =/OPT -- enable-Debugger
The two parameters mean to specify the installation directory/OPT and enable the debugging function. After the debugging function is enabled, it is troublesome to enter the debugging command every time you start the system. You can compile the command twice, enable the debugging function once, and disable the debugging function once. Rename the executable file compiled by the debug function to bochsdbg and copy it to/usr/bin.
3. After bochs is installed, modify the bochs configuration file. For geekos, A. bochsrc file is under the build directory under each project.
Use this configuration file for project0:
romimage:file=$BXSHARE/BIOS-bochs-latestmegs: 8boot: afloppya:1_44=fd.img, status=insertedlog: ./bochs.out
Use this configuration file for project1:
romimage:file=$BXSHARE/BIOS-bochs-latestmegs: 8boot: afloppya: 1_44=fd.img, status=insertedata0-master:type=disk, mode=flat, path="diskc.img", cylinders=0log: ./bochs.out