Table of Contents

Getting Started Manual Installation Guide (Optional)

This is not a full getting started guide but it rather contains instructions for manually installing certain packages.

1.) Manually Installing Git

a. Create a directory for git.

% mkdir /opt/archives/git

b. Download git tarball(for example git-1.6.3.tar.gz) from http://kernel.org/pub/software/scm/git.

c. Save it to /opt/archives/git.

d. Give the following shell commands to untar the tarball:

% cd /opt/archives/git
% tar -xvf git-1.6.3.tar.gz

This will generate git-1.6.3 directory under /opt/archives/git.

e. Give the following shell commands to configure and install git:

% cd /opt/archives/git/git-1.6.3
% ./configure --prefix=/opt/tools/git

This configures git and marks /opt/tools/git directory for installation of binaries.

% make all

Build git binaries.

% make install

Install git binaries in system at prefixed directory given while configuring.

Add the following lines in the end of .bashrc file present in home directory of current user(for example /home/amit for user named amit):

% PATH=$PATH:/opt/tools/git/bin
% export PATH

This will add path of installed git binaries to PATH environment variable. Please note for new .bashrc to be effective new console should be started, for making changes in .bashrc to be effective in currently running console, give the following command in console:

% source /home/amit/.bashrc

Here, amit is the current user, replace it appropriately.

To test if git is installed properly and paths are updated correctly, give following command on shell:

% git

This should show git usage message.

2.) Manually Installing SCons

a. Create a directory for scons.

% mkdir /opt/archives/scons

b. Download sconstruct tarball(for example scons-1.2.0.tar.gz) from http://www.scons.org/download.php.

c. Save it to /opt/archives/scons.

d. Give the following shell commands to untar the tarball:

% cd /opt/archives/scons
% tar -xvf scons-1.2.0.tar.gz

This will generate scons-1.2.0 directory under /opt/archives/scons.

e. Give the following shell commands to configure and install scons:

% cd /opt/archives/scons/scons-1.2.0
% python setup.py install --prefix=/opt/tools/scons

This will install sconstruct on the system in /opt/tools/scons directory. This command has dependency on Python, so system must have Python installed before issuing this command, most systems have it in default configuration of operating system packages only. See http://www.python.org/download for installing Python if its not installed already.

Add the following lines in the end of .bashrc file present in the home directory of current user(for example /home/amit for user named amit):

% PATH=$PATH:/opt/tools/scons/bin
% export PATH

This will add path of installed SCons binaries to PATH environment variable. Please note for new .bashrc to be effective new console should be started, for making changes in .bashrc to be effective in currently running console, give the following command in consle:

% source /home/amit/.bashrc

Here amit is the fictional current user, replace it appropriately.

To test if SCons is installed properly and paths are updated appropriately, give following command on shell:

% scons -h

This should show SCons help section.

3.) Manually Installing QEMU

For running Codezero, processor emulator QEMU is required.

a. Create a directory for qemu.

% mkdir /opt/archives/qemu

b. Download latest qemu tarball(for example qemu-0.12.1.tar.gz) from http://git.savannah.gnu.org/cgit/qemu.git.

c. Save it to /opt/archives/qemu.

d. Give the following shell commands to untar the tarball:

% cd /opt/archives/qemu
% tar -xjvf qemu-0.12.1.tar.gz

This will generate qemu-0.12.1 directory under /opt/archives/qemu.

e. Remove the “nowait” option from line number 2399 in file gdbstub.c as below (present in /opt/archives/qemu/qemu-0.12.1 directory).

This patch removes the default "nowait" option from gdb stubs tcp connection
 
The tcp connection in gdb stubs has "nowait" option set by default,
which causes QEMU to continue without waiting for a gdb connection as opposed
to the documented: "-s  Wait gdb connection to port 1234." behavior.
---
 
 gdbstub.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
 
diff --git a/gdbstub.c b/gdbstub.c
index 9bd4375..7d9a2f5 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2396,7 +2396,7 @@ int gdbserver_start(const char *device)
         if (strstart(device, "tcp:", NULL)) {
             /* enforce required TCP attributes */
             snprintf(gdbstub_device_name, sizeof(gdbstub_device_name),
-                     "%s,nowait,nodelay,server", device);
+                     "%s,nodelay,server", device);
             device = gdbstub_device_name;
         }
 #ifndef _WIN32

This is a small patch to make ”-s” option work correctly with newer versions of Qemu(version later than 0.8.2).

f. Give the following shell commands to configure and install qemu:

% cd /opt/archives/qemu/qemu-0.12.1
% mkdir /opt/archives/qemu-build
% cd /opt/archives/qemu-build
% ../qemu-0.12.1/configure --prefix=/opt/tools/qemu --target-list=arm-softmmu --disable-werror

This will configure qemu and mark /opt/tools/qemu directory for installation of binaries. Only arm-softmmu target is needed here.

% sudo aptitude install zlib1g zlib1g-dev

% make

To build the qemu binaries.

% make install

To install the qemu binaries in system at prefixed directory given during configure stage.

% PATH=$PATH:/opt/tools/qemu/bin
% export PATH

This will add path of installed qemu binaries to PATH environment variable. Please note for new .bashrc to be effective new console should be started, for making changes in .bashrc to be effective in currently running console, give the following command in console:

% source /home/amit/.bashrc

To test if qemu is installed properly and paths are updated appropriately, give following command on shell:

% qemu-system-arm -h

This should display help section of qemu.

For more options on installing qemu, please use the command:

% ./configure --help