Printable Version

Android Porting Guide to OMAP-L 138 HawkBoard

From labs.embinux.org

Jump to: navigation, search

This is an initial Android port to HawkBoard. Very few peripheral (keyboard & network) are currently working. A stable fully functional build will be released shortly.

Contents

Download, build and compilation of Android Root File System (RFS)

$ mkdir ~/Android_build
$ cd ~/Android_build
$ repo init -u git://labs.embinux.org/embinux-android-build/android-omap3/repo/android/platform/manifest.git -b hawk-donut
$ repo sync
$ make

Kernel Compilation

Download the toolchain from Embinux Site and put it in /opt folder

$cd /opt/
$tar xvf arm-none-linux-gnueabi-cortex-core-v2.tar.bz2
$cd ~/Android_build/kernel/
$export PATH=$PATH:/opt/arm-none-linux-gnueabi/bin
$make ARCH=arm omapl138_hawkboard_defconfig
$make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage

Copying Android Root File System (RFS)

$cd ~/Android_build/out/target/product/generic
$mkdir ~/Android_RFS
$cp -a root/* ~/Android_RFS
$cp -a data/* ~/Android_RFS/data/
$cp -a system/* ~/ Android_RFS/system/
$cd ~/Android_RFS
$sudo chown -R root.root *
$sudo chmod -R 777 *
$cp -r ~/Android_RFS /data/target/

Boot Arguments

  • setenv bootargs mem=128M console=ttyS2,115200n8 noinitrd root=/dev/nfs rw init=/init nfsroot=<server ip>:/data/target ip=dhcp androidboot.console=ttyS2
  • setenv serverip <tftp server ip>
  • setenv gatewayip <gateway ip>


Booting Android

At server side install tftp

Setting up tftp on host machine(ubuntu)

  • Install the atftpd using the following command
sudo aptitude install atftpd 
  • Change USE_INETD=true to USE_INETD=false in the atftpd file which is present in /etc/default/
  • After save and exit the file run the following command
sudo invoke-rc.d atftpd start 
  • To transfer the files between two machines using tftp setup the following commands to create directory
sudo mkdir ~/tftpboot 
sudo chmod -R 777 ~/tftpboot 
sudo chown -R nobody ~/tftpboot 
sudo /etc/init.d/atftpd restart
  • Install tftp-hpa using the following command
sudo apt-get install tftpd-hpa
  • Change RUN_DAEMON="no" with RUN_DAEMON="yes" in the /etc/default/tftpd-hpa file
  • Change OPTIONS="-l -s /var/lib/tftpboot" to OPTIONS="-l -s ~/tftpboot"
  • Now start the tftp service with the following command
sudo /etc/init.d/tftpd-hpa start


  • Install nfs on server and edit the /etc/exports file by giving the /data/target path
Ex : /data/target 192.168.128.0/24(rw,no_root_squash,no_all_squash,async)
  • Copy the kernel uImage in tftpboot folder.
cp  ~/Android_build/kernel/arch/arm/boot/uImage ~/tftpboot
  • Start the tftp and nfs on server
sudo /etc/init.d/tftpd-hpa start
sudo /etc/init.d/nfs-kernel-server start

In minicom

  • Take the kernel uImage by tftpboot
tftpboot 0xc0900000 uImage
  • Boot the kernel uImage by bootm
bootm 0xc0900000