Spanish Version


+ Introduction

+ About Us

+ Downloads

+ Source Code

+ Dev. Environment

+ SODIUM Developer Kit

+ Configuration

+ Testing & Installation


+ Try SODIUM Online




Development Environment for SODIUM


In order to compile SODIUM and then test it or install it onto a bootable device, you must first set the development environment with the right tools and programs already configured. To have that, we provide two options:

1) Download and install SODIUM Developer Kit which is a ready-to-use virtual machine with all the required tools pre-installed.

2) Build your own DevEnv using the instructions shown below:

Building your own DevEnv


Below is a list of all the program and tool versions that are known to work correctly in compiling SODIUM. In general, all these programs are retro-compatible, so there should not be problems if you have a previous version.

The exception of such case is the (gcc) compiler and the (ld) linkeditor, which add new flags for new versions that could cause problems during the compilation or execution of SODIUM. Anyway, they always leave the option to disable such flags, so that you can still compile SODIUM with the previous settings.

In order to make SODIUM's configuration easier, we provide the configurar.sh script in the root directory of SODIUM's code which already defines the gcc flags to be used. However, it is important to know that future versions of gcc may include new flags that should be disabled using this script.

The current version of SODIUM has been successfully compiled and tested using the following Linux distributions:

- Ubuntu 7.04
- Ubuntu 11.04
- Ubuntu 12.04
- Fedora Core 1, 2, 3, 4, y 5
- Slackware 10
- RedHat 7.3, 9

The necessary tools to compile SODIUM are listed below:

Tool Version
Kernel Linux 3.0.0-16-generic
nasm 2.09.08
mtools 3.9.1
hexdump Cualquier VersiĆ³n
gcc 4.6.1
dd 8.5
ld 2.9.1
cat 8.5
make 3.81
objcopy 2.9.1

A list of additional packages that may be necessary to install (depending on the Linux distribution used) is shown below:

build-essential subversion bximage hexcat vim-full
binutils elfutils glibc-doc hexedit samba
ctags doxygen console-keymaps usbutils xdotool
mktools gdb console-utils parted indent
keyutils mkisofs elf-binutils gpart mktemp


Compiling Bochs



Bochs is a virtual machine emulator that can be downloaded from the following link:  

In order to test SODIUM without the need of using a physical device and a real computer, we use Bochs instead. Bochs allows us to emulate a Intel IA-32 architecture computer, and allows simulating devices (such as diskettes, CD-ROMs, and Hard Drives) through the usage of file images. Therefore, it is possible to quickly test new versions of SODIUM without the usage of real hardware.

We used to support another emulators (such as QEMU). However, we have discontinued their use since Bochs has been the best emulator so far in working exactly as a real computer. This is especially important in the case of memory boundaries checks and exceptions managing. Using Bochs provides less uncertainty of errors happening on real architectures.

One of the advantages of using emulation (instead of virtualization) is that having all the CPU registers present in the host machine's RAM, you can easily debug, stop, and continue the execution of SODIUM. This is extremely helpful when developing an operating system.

Bochs counts with three types of debuggers:

  - Internal Debugger (Console)
  - Internal Debugger (GUI)
  - External Debugger (GNU Debugger)

Once you download Bochs's code, you must set its configuration flags prior to compilation. The commands for compiling bochs for SODIUM are shown below:

 - Using Internal Debugger (Console):

  ./configure --enable-debugger --prefix=/usr/local/bin/bochs --enable-debugger --enable-disasm --enable-all-optimizations --with-all-libs --enable-readline  --enable-alignment-check  --with-nogui --enable-show-ips --disable-plugins --enable-pci --enable-pcidev --enable-fpu --disable-docbook --enable-pcidev --enable-usb --enable-usb-ohci --enable-usb-xhci

 make  install

 - Using Internal Debugger (GUI):

  ./configure --enable-debugger --prefix=/usr/local/bin/bochs --enable-debugger-gui --enable-disasm --enable-all-optimizations --with-all-libs --enable-readline  --enable-alignment-check  --with-nogui --enable-show-ips --disable-plugins --enable-pci --enable-pcidev --enable-fpu --disable-docbook --enable-pcidev --enable-usb --enable-usb-ohci --enable-usb-xhci

 make  install

 - Using External Debugger (GNU Debugger):

  ./configure --enable-debugger --prefix=/usr/local/bin/bochs --enable-gdb-stub --enable-disasm --enable-all-optimizations --with-all-libs --enable-readline  --enable-alignment-check  --with-nogui --enable-show-ips --disable-plugins --enable-pci --enable-pcidev --enable-fpu --disable-docbook --enable-pcidev --enable-usb --enable-usb-ohci --enable-usb-xhci

 make  install