Android, Beagleboard, Kernel and the DSP-Bridge

Application access to the DSP
Application access to the DSP

The Beagleboard features a Digital Signal Processor (TMS320C64x+ DSP). For our spectrum analyzer it would be a very nice feature to calculate the FFT in the DSP.

To access the DSP the Kernel needs to implement the DSP-Bridge driver. However, it is quite challenging to get the driver into the Kernel. Several attempts to patch the Embinux Kernel with the original patches failed. [Embinux Kernel Git Repository]

The good news is that the omap-kernel (linked in the Android Git repository) features the DSP-Bridge driver that we were looking for. [Android omap Kernel Git Repository]

The challenge was to get the Kernel running on the Beagleboard. We had first given up on it since the USB-Host Controller was not working. But after trying every other Kernel (Embinux, 0xdroid, mainline omap kernel, etc.) we gave it another try. Since we are booting an NFS Root File System we needed USB and Ethernet support on startup time. The key is to configure the Beagleboard’s USB-OTG as a Host Device. This can be done in the menuconfig of the Kernel. This was not the only challenge. A Kernel panic occurred when looking for the init file.
The solution was to configure the Kernel properly and including all Android driver modules (which seems kind of obvious at this point). To give you an idea of how the config of the 2.6.29 Android Omap Kernel could look like you can check our .config out here. [.config file]

Android now boots correctly.

Well, there is still one problem though. The Input Event Subsystem seems to be messed up, thus our keyboard and mouse is not working at all.
The Event Input Subsystem works now properly with the above .config file.

To break it down:

Working with the omap-Kernel of the Google Git repositories we can state the following:
Pro:

  • DSP-Bridge Driver
  • Nicely maintained by a big community

Con:

  • USB-Host Controller not working yet (USB OTG in host mode works)

Project Overview

update

During the last few weeks we have been putting together our platform. For an overview of what our platform and application looks like we have put together our Project Application site.  Also be sure to check out our guide for “Debugging Android Applications on the Beagle Board with Eclipse” on our Development Guide.

In the following weeks we are going to brush up our Development Guide and give detailed information about Kernel and Root File System as well as further application porting (i.e. libusb). We also have gathered lots of information about how to work with AIDL for Services and JNI without Androids’ NDK. So stay tuned for fully packed guides and updates.

Changing the uBoot Splash Screen

To change the uBoot Splash you need to compile your own uBoot image and move it to your SD Card or flash it to your System. We recommend to stick with the SD/MMC solution and thus have still a fallback solution on your flash.

You can get the sources for uBoot from the denx git repository.

git clone git://git.denx.de/u-boot.git u-boot-main
cd u-boot-main
git checkout --track -b omap3 origin/master

Download the following u-boot_v1_beagle_logo.patch and patch the files in the u-boot-main folder you just created. Now you may adjust your splash screen. It is stored in the logo.h header file in the beagle board folder.
Display the header file using gedit

gedit board/omap3/beagle/logo.h



edit the header file
edit the header file

To create a new Splash you can use GIMP to export the graphic as “.h” file.
You can then copy the *header_data array to the logo.h and adjust beagle_width and beagle_height to your image size.


Once saved you can now compile your u-Boot.bin with the following commands:

make CROSS_COMPILE=arm-none-linux-gnueabi- mrproper
make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_beagle_config
make CROSS_COMPILE=arm-none-linux-gnueabi-

Note: you can set the CROSS_COMPILE prefix to the path of your favorite cross compiler. We used the Codesourcery toolchain available here.

Done! Copy your u-boot.bin to your MMC/SD card. Insert your card and boot your Beagle Board; you should now see your customized Splash Screen.

Note:
Normally your uBoot is loaded from u-boot.bin on your SD/MMC-Card. Yet all arguments are taken from the NAND-Flash unless you create a boot script on your SD/MMC. More information about how to build a boot script can be found on our Developing on an Embedded System site.

Android Platform Development Kit

PDK HTML Documentation
PDK HTML Documentation

Looking for documentation and information about platform development we stumbeld across the Android PDK (Platform Development Kit) in the development directory of the Android source.

Thanks to the guide found at http://heejindev.wordpress.com/2009/06/18/how-to-build-android-pdk/ we were able to successfully build the html documentation.
To make the documentation work we needed to put the online-pdk directory (./out/target/common/docs/online-pdk/) under our Apache server root.

There is an online version of the PDK at

http://www.kandroid.org/online-pdk/guide/

http://pdk.android.com/online-pdk/guide/index.html

Let’s Roll

For the comming weeks we will post challenges and successes of our Project.
You can expect setup information for Android on the Beagle Board as well as guides of how to port custom libraries and communicate with  low level hardware such as DSP or USB-Host Controller.