6.828 of the tools have been installed, before the formal start of the experiment, you need to familiarize yourself with the use of each tool. For me this small white user, need to be familiar with more.
1, x86 assembly language
Sure enough, the course first made me familiar with assembly language, and provided two references. Although I am familiar with assembly language is still 108,000 miles, but at least it is used. I feel that if I want to keep my interest in learning, it is very important to take the attitude of "no need to delve into it". So the assembly language is the first. I downloaded the references locally and then jumped to the next step.
2, Analog x86
The course gives the role of QEMU, features, and auxiliary debugging tools (GDB), but I'm not interested in these details right now. The program can run up is my most concern at present.
The result was tragic. The compilation environment used in the course is not the same as the one I built myself, and the operation is basically useless. Since the easy way doesn't work, you have to turn on hard mode. Look directly at QEMU's documentation.
(1) Partial content of the QEMU document
A. What is QEMU?
Qmeu is the processor simulator, its biggest feature is fast. Maybe that's why the course chooses it as the target simulator.
The Qmeu has two modes of operation: full-system simulation and user-mode simulation.
B. What QEMU can emulate
From the list given, there are quite a few devices that can be emulated. Because I have limited knowledge of computer system hardware, these devices are just names.
C. Start the system image
The point is that there are only three lines to boot the system image in the document.
First line: Download and unzip the Linux image (LINUX.IMG);
Second line: Execute qemu-system-i386 linux.img;
The third line: Linux will start and give the prompt.
See here, my heart is broken. So simple, and so difficult. Because I didn't find a way to download the Linux image, and I didn't know how to execute the command.
I can not, Baidu Bar. So, I found fatsheep9146 's blog. It's amazing, he taught himself 6.828. Since the predecessors have already been crossing the road, why must we go?
(2) The fatsheep9146 scheme
Read his blog post, found that the development environment and mine are not the same. He runs Ubuntu with VMware and uses it as a compilation environment. And then download the QEMU in Ubuntu to use. This is not the same as I think Ah, originally can run virtual system in the virtual system!
If so, the entire development environment is much better. Follow the steps to download and install Qmeu in the Linux environment given in the course documentation
A. Clone repository git clone http://web.mit.edu/ccutler/www/qemu.git-b 6.828-2.3.0;
B. Installing the SDL Development Library sudo apt-get install Libsdl1.2-dev
C. Configure QEMU./configure--DISABLE-KVM--target-list= "I386-softmmu X86_64-softmmu"
Only two questions were reported:
C + + Compliler:sudo Apt-get Install g++
Pixman:sudo Apt-get Install Libpixman-1-dev
D. Perform a make compilation and then execute the sudo make install installation.
(3) Running the image in the experiment
First CD to work folder, then clone source code
git clone https://pdos.csail.mit.edu/6.828/2014/jos.git lab
The above command will get a lab folder, go into this folder, perform make compile, get kernel.img.
To run the kernel image on QEMU, you need to continue to perform make QEMU within the lab folder.
6.828 Learning Notes 2-qemu and x86 assembly language