Bochs use of Open source simulator

Source: Internet
Author: User

When we study Linux, in addition to learning how to use it to build a server, the kernel is also full of curiosity, often meditate on when I can also write small and beautiful operating system. And when we write a minios, and how to test it and debug it, the hardware environment emulator Bochs can solve this problem well. Let me take the bochs2.4 and Linux0.11 root.img, boot.img as the basis, to establish a Linux0.11 kernel running debugging environment.

A tool and mirror

1.bochs2.4;

2.bochs2.4 config file;

3.minix FS (root-0.11.img)

4.kernel (Boot-0.11.imag)

Because Minix FS is used in the Linux0.11 kernel, our root file image is selected Minix file system, and the tools and images are available at the following links:

Links: http://pan.baidu.com/s/1Ew5T8

Password: e2z7;

Two install bochs2.4 and create configuration file

1. After the download is complete, Bochs can be placed in any folder, bochs2.4 configuration file bochsrc_fd.bxrc, root file system image and boot image are placed in the X-disk Linux0.11 directory.

If it is a different system, change the hardware configuration in BOCHSRC_FD.BXRC to support system operation as needed.

2.bochs2.4 always click OK to install.

Three boot bochs2.4 and load kernel image

1. Double-click the profile BOCHSRC_FD.BXRC to eject the two forms as shown:

     

     

2. Last hint, kernel to load the root filesystem and press ENTER, let's take a look at the contents of BOCHSRC_FD.BXRC.

By configuration file: 1. Kernel mirroring in the FDA, 2. The root file system image in Fdb 3.boot loads the image in the FDA. So when the kernel boot is complete and the kernel image needs to load the image of the root file system, we need to reset the emulator a disk and select the root image.

3. Click OK to load the Linux0.11 image successfully if the following conditions occur:

After that, we can see the results of the operation by typing the LS cat/a.out commands.

Similarly, we can load our own written system and perform simulations and debugs on the Bochs.

Bochs use of Open source simulator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.