Porting Android to a big-endian platform is a process
divided into three stages. Used Micronas platform comes with
Linux kernel version 2.6.21.7 which is pretty old for a kernel
today. In spite of this, frameworks used by the platform drivers
make it much harder to port them into the Android 2.6.27 or
later kernel version (amount of work exceeds the purpose of
this project) than to do the opposite. Consequently, in the first
stage, Linux kernel drivers used by Android software stack
need to be back-ported to the platform supplied kernel. The
second stage of the porting process demands extension of
Android build environment [5] to support big-endian MIPS
platforms; the settings from the environment have to be
properly interpreted in the compilation process. Final stage of
porting Android software stack consists of audio driver
integration and DirectFB video frame-buffer support.
A. Linux Kernel Back-porting
Few new drivers are introduced to the Linux kernel tree to
support Android software stack. Some of the drivers are:
• ASHMEM (Anonymous SHared MEMory) – shared
memory manager similar to POSIX SHM but with
different behavior; it supports a simpler file-based API,
• Binder for Android – a CORBA like IPC (Inter Process
Communication),
• Android event logger – Linux kernel driver for
cataloguing debug messages directly in kernel.
Linux kernel 2.6.21.7 tree configuration that came with the
used platform had to be modified in number of ways to support
Android software stack and mentioned new drivers had to be
integrated.
B. Android Environment Modification
Android software stack had been successfully ported to
little-endian MIPS platform [9]. Due to the different endianes
of the used platform (big-endian) modifications to Android
software stack are numerous.
• The first kind of modifications involves platform
native software binaries, mainly open-source libraries
and programs written in C/C++ (endianes support is
typically maintained through internal build systems
(primarily “autoconf”)). Android build system
makefiles (Android.mk) were changed to support
missing big-endian variables and defines.
• The second kind of modifications was the build tools
in-code endian unawareness. These bugs are rare and
hard to find as they generally cause Android build to
fail or prevent the platform from eventually starting.
Programs that were affected are Android pre-linker
Apriori, stripping application Soslim, resource
manager aapt (Android Asset Packaging Tool), etc.
• The third and final kind of modifications includes
addition of support for in-code endian awareness for
libraries and programs running on Android. Central
example is the Dalvik VM (that explicitly supports bigendian
platforms). Uses of pointer assigning for
variable data types works correctly for little-endian
architectures, but makes the code not portable to bigendian
platforms. Culprit was the use of a structure
JValue throughout the VM code as a one structure for
many value types container. Classical misuse of correct
little-endian variable data types pointer assigning. Bug
of same sort was found in the logger library. Few more
modifications included fixing of color issues, mainly
endian sort, in SKIA engine, Pixel and Surface Flinger.
C. Android DirectFB Support
DirectFB (Direct Frame Buffer) framework is a
GNU/Linux/UNIX based software library with a small memory