Alberto Embedded & Open experience

Notes on my experience on Open Source Embedded Systems

Freescale i.MX31PDK and Android notes

leave a comment »

Environment: Connection between the Workstation an the Machine.

Hardware:

Connect the board to the workstation with the Ethernet and serial cable (every two connected to the debug board)

The environment in the workstation (host machine):

H1$ means Host shell number one
T$ means target shell (after boot)
B$ means target Bootloader shell
# comments

H1$ # kernel console pointed to the android-kernel home
H2$ # android console pointed to android-src
H3$ # minicom console
H3$ minicom
H3$ # this became B$ when you turn on the machine, and T$ when the machine boot..

Building the stack

Compiling and install the kernel

H1$ make -j (n cores)
H1$ cp arch/arm/boot/zImage /tftphome/zlinux-android

Android image

H2$ make TARGET_PRODUCT=mx31_3ds -j (n cores)
H2$ installAndridImage.sh

Booting

Target configurations:

The mx31_3ds is configured to have the following ip address when booting:

IP: 192.168.64.102
MASK: 255.255.255.0
Server IP: 192.168.64.101  << You must set your network interface ip address at this.

And the script that the bootloader run automatically at the beginning (with Android) is:

load -r -b 0x100000 zlinux-android
exec -b 0x100000 -l 0x200000 -c "console=tty0 console=ttymxc0\
 video=mx3fb:Epson-VGA,bpp=16 rootfstype=nfs root=/dev/nfs \
 nfsroot=192.168.64.101:/nfsandroidroot ip=192.168.64.102:\
 192.168.64.101:192.168.64.101:255.255.255.0:mx31pdk:eth0:off init=/init debug"

(the character “\” must not be written, the exec string is a single line string that can be copied and pasted in the bootloader shell with Ctrl-Shift-V)

So, the machine loads in memory the binary kernel file “zlinux-android” located in the workstation tftp server home and execute it (exec starts from the same address we load the kernel) with kernel parameters specified by -c ” params “ where the init program is /init (for non android systems the init= parameter have to disappear)

This script (and all the configuration parameters) can be modified at the Bootloader shell with:

B$ fconfig

You will be prompted for lot of stuff.. Remember!! the last prompt is for saving the configuration in flash. if you skip this your modification will be lost.

To reset the machine press the reset button in the debug board.

Boot all

Turn on the machine..

B$ # you see debug on booting.
   # stop automatic boot with Ctrl-C
   # do nothing if you would to proceed with the boot script
T$ # you will see the android debug.
   # it enters in a minimal shell. Press return to see the prompt

Target screen: you will see (after long time) the android UI

Shutting off

T$ reboot

Then shut off the board.

Written by Alberto!

15/02/2010 at 7:16 pm

Leave a comment