Installing and solving Bochs in Ubuntu10.10

Source: Internet
Author: User
To build an environment in Linux (Ubuntu10.10) for simple operating system writing, the following things are basically used: nasm assembly code compiler, virtual machine Bochs, editor (the system already comes with vim ), check the dependency, compile the Make (system self-carried) of the generated result code, and C-code compiler gcc (system self-carried ). Therefore, the setup of this environment is mainly due to the installation of nasm and virtual machines. Nasm can use sudoapt-getinstallnasm

To build an environment in Linux (Ubuntu 10.10) for simple operating system writing, the following things are basically used:

Nasm assembly code compiler,

Virtual Machine Bochs,

Editor (the system has built-in vim ),

Check the dependency, compile and generate the result code's Make (system self-contained ),

C-code compiler gcc (system self-contained ).

Therefore, the setup of this environment is mainly due to the installation of nasm and virtual machines.

Nasm can be easily installed using sudo apt-get install nasm. For the Virtual Machine Bochs, you can also install it using apt-get. However, the installation will follow the default configuration, the implementation of an operating system may not support debugging, so I decided to compile and install the source code on www.linuxidc.com.

If the process goes well, the process is as follows:

1. Download The bochs source code, which is 2.4.5.

2, extract the source code compressed package: tar vxzf bochs-2.4.5.tar.gz

3, enter the extract bochs directory bochs-2.4.5: cd bochs-2.3.5

4. configure and enable debugging and disassembly:./configure -- enable-debugger -- enable-disasm

5. Compile: make

6. Installation: sudo make install

If I say "if it succeeds", it means that I am not smooth, probably because the Linux packages of different versions are missing. The following are the problems and solutions:

Problem 1:./configure Error: C ++ preprocessor "/lib/cpp" fails sanity.

The problem is that the packages related to the c ++ compiler are not installed. If you try N multiple commands to download the packages, none of them can be found. The final installation of the g ++ gdb package seems to have solved the problem,

Sudo apt-get install g ++ gdb, however...

Problem 2: After you execute./configure, ERROR: X windows gui was selected, but X windows libraries were not found appears.

This is also a missing package. I found this package xorg-dev on the Internet, so sudo apt-get install xorg-dev (I have to use sudo aptitude install xorg-dev on the Internet. I am the opposite, I can't use this command. I don't need to worry about it. I just need to set up the environment to complete the work. I will study it later .). It's not over yet...

Problem 3: A New One appears after you execute./configure again.

ERROR: pkg-config was not found, or unable to access the gtk +-2.0 package. install pkg-config and the gtk + development package, or disable the gui debugger, or the wxWidgets display library (whichever is being used ).

No matter whether the configuration is missing or the package is missing, directly package sudo apt-get install libgtk2.0-dev.

Then compile and install it again./configure> make> sudo make install. It will take a long time. In this way, the installation is basically complete, and the efficiency is low.

PS: Next I encountered a very stupid problem:

Run dd if = boot. bin of =. img bs = 512 count = 1 conv = notrunc, always prompting boot. the binfile does not exist. I thought that no matter what content is needed, create a blank file first to ensure the smooth production of the virtual disc, however, it is unclear whether the system can be created using commands such as touch like other common binary files. the binfile is unknown, so I checked the boot first. bind file-related information, fruitless, and desperately check whether the configuration of which the singer is dependent on the package bochs installation, nothing, coupled with the past few days something, shelved.

......

Today, I will flip the book to the front. The boot. binfile needs to write an asm file before compilation. Wow! Blocking the road is often not a towering tree, but a little vine, and blind! In the exploration phase, we try to skip step by step. Of course, this process will also find that many of our Linux environments, such as Vim, are far from proficient in writing boot. asm (or Copy the source code to the asm file) still fails to be compiled...

Related Article

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.