Build and install Android or Ubuntu image for IMX51

Here you can find instruction to setup development environment for Android or Ubuntu source code for IMX51 and the way to install it on eMMC. With this guideline, user will be able to setup the system easily and test all the functions with the system.

Setup Build Environment

Please following command below to install the packages on Ubuntu 12.04 or 14.04

#sudo apt-get install gettext libgtk2.0-dev rpm bison m4 libfreetype6-dev
#sudo apt-get install install libdbus-glib-1-dev liborbit2-dev intltool
#sudo apt-get install install ccache libncurses-dev zlib1g zlib1g-dev gcc g++ libtool
#sudo apt-get install install uuid-dev liblzo2-dev
#sudo apt-get install tcl
#sudo apt-get install ia32-libs libc6-dev-i386 lib32z1
#sudo apt-get install gparted emacs22-nox openssh-server
#sudo apt-get install nfs-common nfs-kernel-server lintian
#sudo apt-get install git-core git-doc git-email git-gui gitk
#sudo apt-get install diffstat indent tofrodos fakeroot doxygen uboot-mkimage
#sudo apt-get install sendmail mailutils meld atftpd sharutils
#sudo apt-get install manpages-dev manpages-posix manpages-posix-dev linux-doc
#sudo apt-get install vnc4server xvnc4viewer

Please refer to hyperlink below to setup development environment
Initializing a Build Environment

Generating RSA Keys

Use command below to generate RSA Key :

#ssh-keygen -t rsa

You can find “id_rsa.pub” in path below. Please send it to us by email to get access right of Avalue GIT server.

#/home/username/.ssh/

If you had done this before for your Ubuntu development platform, there's no necessary to do it again.

Download Source code and cross compiler tool from Avalue git server

#git clone gitlab@aes.avalue.com.tw:IMX51/IMX51-Android.git -b 

Compile Android Source code

Please following instruction below to compile Android source code

#cd Android
#./run.sh -j4

Compile Ubuntu Source code

Please following instruction below to compile Ubuntu source code

#cd core
#make -j4

For Android Image files

You can find all image files in path /Android

Image File Description
uImage kernel file
recovery.img recovery image file
system.img system image file
u-boot.bin bootloader for IMX51

Please copy all of them to path ~\Mfgtools-Rel-1.6.2.042-Linux-Android-V11\Mfg-IMX51\Profiles\MX51 Android\OS Firmware\files\android of MfgTool folder.

For Ubuntu Image files

You can find all image files in path /core

Image File Description
uImage kernel file
u-boot.bin bootloader for IMX51

Please copy all of them to path ~\Mfgtools-Rel-1.6.2.042-Linux-Android-V11\Mfg-IMX51\Profiles\MX51 Linux GUI\OS Firmware\files\linux of MfgTool folder.

Install Android or Ubuntu image into eMMC

Download MfgTool for Android or Ubuntu from Hyperlink below
MfgTool for Android and Ubuntu

1. Set JBTSL1 on IMX51 as below to serial download mode

2. Use mini-USB cable to connect JMUSB1 on IMX51 to Windows 7 system.

3. Run MfgTool2.exe and click start to flash image file.

MfgTool Description
~\Mfgtools-Rel-1.6.2.042-Linux-Android-V11\Mfg-IMX51 MfgTool for IMX51


4. It will show “Done” after flashing is finish, then click “Stop” and “Exit” to close the screen.

5. Set SW1 as below to boot from eMMC

6. Restart the system then boot in Android or Ubuntu