In this article, I am going to talk about how to port Dalvik Virtual Machine on TS-7800 embedded board. Also in the article, you may find basic procedures to build Android OS from scratch.

Basic setup of the SBC can be seen from Figure.1. In brief, if we need to talk about the SBC, we can say the board has 88F5182 XScale ARM processor, 128 MB SDRAM and GPIOs, you may find more on the official web site of the product. Incidentally, I was about to forget, I used kernel 2.6.34 on this embedded board. Unfortunately the firmware image which is shipped with the product provides kernel 2.6.21-ts, and it is not convenient to port ashmem device (which is specific to Android Kernel) on this kernel version. You should download the latest firmware.

Figure.1: TS-7800 Single Board Computer with XScale ARM proccessor.

Dalvik Virtual Machine is the main component of Google Android OS, so if we want to port Android OS on a new platform, first we need to port Dalvik Virtual Machine on it.

So, let’s build Android Operating System, by the way I am not going to talk about detailed build procedures, you may find these steps from official Google Android web site.

Last operation will take an hour or more depending on your CPU processing speed. After the compilation we need to copy Android Binaries into target root file system.

$ cp -a ~/android/out/debug/target/product/generic/system /dev/rfs

In this setup, I used the SD flash memory as the root file system drive, and it is mounted on /dev/rfs on my PC in order to copy Android Binaries.

Until here, operations are simple procedures, and easy to find from Google Android web site. But the problem is, there are not clear procedures to make Dalvik Virtual Machine up and running on a new platform. This is too important, android operating system does not use SysV shared memory methods in order to achieve IPC, therefore, you have to implement Android Shared Memory –/dev/ashmem– device on your system.

Figure.2: Dalvik Virtual Machine Kernel Dependencies.

These are the steps to port ashmem device on kernel 2.6.34,

1- $ cp ashmem.clinux-2.6.34/mm
$ cp ashmem.hlinux-2.6.34/include/linux/
2- Open linux-2.6.34/mm/Kconfig file, and add these lines on the bottom of the file,
config ASHMEM_MODULE
tristate "asmem module"
depends on ARM
default m if ARM
help
Android ashmem module. Provides specific shared memeory interface
to DalvikVM.
3- Open linux-2.6.34/mm/Makefile, and add this line on the bottom of the file,
obj-$(CONFIG_ASHMEM_MODULE) += ashmem.o