Thursday, March 26, 2009

Getting started with LINX on Android

Initial LINX tests on Android were made using a beagle board running Android with patches from Embinux. To get started with LINX the following steps are needed:
Download the LINX source from SourceForge. To get an initial cross compiled build we need a matchning kernel. Currently just pointing out the kernel in the Android distro will not work since LINX will produce some build errors. This should be checked and maybe fixed later on.
The way we worked around was to compile LINX against a standard kernel with Android patches. In this case a 2.6.27 OMAP kernel. I.e the build command will look something like:
cd <path>make ARCH=arm CROSS_COMPILE=<path>/arm-none-linux-gnu-eabi- KERNEL=<path>

At this point we took the generated kernel modules and copied them to a suitable place in the Android file system. The rest of LINX currently needs to be statically linked by adding -static to the makefile gcc options. This is because it is not built as part of the android build system and c library. Then copy the binaries to the /system/bin library of Android.
An ownership change is also needed to make the commands run on android
sudo chown root.root <file>
sudo chmod 777 <file>

After this it is just a matter of starting up android and doing insmods using the shell. Links can be created with mklink.

/Mattias

No comments:

Post a Comment