Running and Debugging

Introduction

This page complements the main page about Configuring and Building with information on how to run and possibly debug the Codezero based system on specific devices.

The supported devices with the current release are Google Galaxy Nexus (i9250), Panda board, and Versatile Express/Qemu. Galaxy Nexus is supported only in GSM/HSPA+ configuration maguro and only if it was originally sold with a yakju or takju Android releases.

Quick start

The simplest way to try the Codezero is to build vx-single-initramfs meta-config (see Introduction to the Build System page).

To launch it in the first terminal execute:

./tools/debug-serial.sh

and in another one start:

./tools/debug.sh

The later one will start a GNU Debugger connected to virtual Versatile Express board emulated by Qemu. The system will break before execution. To start it type continue and press ENTER.

In the firts terminal you will see a text serial console output from the virtual board, and in the Qemu graphical window you will get a frame buffer output.

Trying the demos

It’s generally a good idea to try the Prebuilt Demonstrations first to get a grasp of how all the components fit together when running system using Codezero hypervisor. It can also rule-out any compatibility or hardware problems.

Preparing the filesystem

Keep in mind that the result of Codezero building process is only hypervisor and guest kernel binaries, bundled together. While hypervisor is self-contained, the guest OSes usually require some userspace to function and do anything useful.

Because of the above it’s necessary to prepare the execution environment for each particular configuration. Depending on the guests OS, hardware platform and hardware resource partitioning some adjustments may be required for the software to run correctly and smoothly. I.e. on Galaxy Nexus only one Android/Linux guest can have an access to camera. This adjustments, however, are out of scope of this instruction and require a lot of knowledge and work.

There is a Building Android (AOSP) page containing some information on how to prepare the Android filesystem to be used with Codezero-based setups.

Running on Versatile Express

The vx-single-linux meta-config is not the only config that you can use on Versatile Express platform. Check the codezero-meta/config for other configs beginning with vx- prefix, which is a convention to mark Versatile Express board targeting configurations.

After loading, the general building and running procedure is exactly the same as for vx-single-initramfs. However there are some internal differences.

Other Versatile Express targeting meta-configs will require a prepared filesystem image to be used as virtal SD card. The exact qemu argument that will be passed is stored in current/qemu.conf file, along with other configuration options for launching Qemu emulator, like memory size, cpu type, etc. You can modify this arguments to use an image of your liking.

To automate preparation of Linaro based filesystem, a tool has been prepared: ./tools/download-fs.sh. Run it without any command for an instruction how to use it.

Running on Panda or Galaxy Nexus

Running on real devices like Panda or Galaxy Nexus is generally harder, due to complexity of handling these boards.

The whole procedure for building the kernel images does not differ from the Versatile Express procedure:

  • load the appropriate meta-config with ./config-load.sh
  • making sure that the codezero-meta/linux has a compatibile branch checked-out
  • optional configure with make menuconfig
  • make

Some of the example meta-configs are:

As flashing requires steps that require precision, the safest way is to follow the instructions on:

while replacing the existing Image binary with the one created by building the Codezero source.

It’s also higly recommened to read the Android Building page for a better understanding of Android AOSP system.

Comments are closed.