Jun 10 2010

1. “Hello world” ── 引导程序(Boot loader)

Category: OSDevwuxicn @ 9:23 AM
« Previous TOP » Next

======

1. “Hello world” ── 引导程序(Boot loader)

做好了准备工作,现在可以开始写操作系统了。一般学习编程的第一个程序都是“hello world”,因此我们的操作系统也不例外。下面看看用10分钟的时间如何写一个可以在裸机(虚拟机)上直接运行的“操作系统”。

我们的 “Hello world” 操作系统

Continue reading “1. “Hello world” ── 引导程序(Boot loader)”

Tags: ,


May 10 2010

做一个操作系统的准备工作

Category: OSDevwuxicn @ 1:10 PM
« Previous TOP » Next

======

工欲善其事,必先利其器!

想要做一个操作系统,好用的工具必不可少,下面介绍所需要工具。
Continue reading “做一个操作系统的准备工作”

Tags:


May 05 2010

Install GDB cross debugger for i386 ELF on Mac OS X

Category: Uncategorizedwuxicn @ 9:31 AM

1. Download and install gettext: http://www.gnu.org/software/gettext/

2. Install i386-elf-gcc from MacPorts:

sudo port install i386-elf-gcc
sudo port -f activate i386-elf-gcc

You may need to create some symbolic links:

cd /opt/local/bin
sudo ln -s i386-elf-gcc-4.3.2 i386-elf-gcc
sudo ln -s i386-elf-g++-4.3.2 i386-elf-g++

3. Download GDB: http://www.gnu.org/software/gdb/download/

4. Configure and install GDB for i386-ELF:

./configure --prefix=/opt/local \
            --program-prefix=i386-elf- \
            --target=i386-elf \
            --with-gmp=/opt/local \
            --with-libelf=/opt/local \
            --with-build-libsubdir=/opt/local
make
sudo make install

Then the i386-ELF GDB will be installed in /opt/local with program name i386-elf-gdb.

Note: option ‘–target=i386-elf’ specifies guest(target) type ‘i386 ELF’.

Tags: , , , , ,