Creating Android Image for ppc-4210

From Estone Technology Wiki
Jump to: navigation, search

Android

Note: The Android Marshmallow 6.0 was mostly tested in the 14.04 x64 Ubuntu.

Requirements

CPU - 2 Core Processors
Memory Size - 4GB
Disk Space - 150GB
Operating System - Ubuntu 14.04 LTS

Preparation

Install required packages. Open Terminal and type commands below:

$ sudo apt-get update
$ sudo apt-get install uuid uuid-dev zlib1g-dev liblz-dev liblzo2-2 liblzo2-dev lzop
$ sudo apt-get install git-core curl u-boot-tools mtd-utils android-tools-fsutils
$ sudo apt-get install openjdk-7-jdk gnupg flex bison gperf libsdl1.2-dev libesd0-dev
$ sudo apt-get install libwxgtk3.0 squashfs-tools build-essential zip libncurses5-dev
$ sudo apt-get install libncurses5-dev schedtool libxml2 libxml2-utils xsltproc libc6-dev
$ sudo apt-get install schedtool g++-multilib lib32z1-dev lib32readline-gplv2-dev gcc-multilib 
$ sudo apt-get install libswitch-perl gcc-arm-linux-gnueabihf libssl1.0.0 libssl-dev

Configure git account:

$ git config --global user.name "First Last"
$ git config --global user.email "first.last@company.com"

Create repo:

$ cd ~
$ mkdir ppc4210-android
$ cd ppc4210-android
$ mkdir bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/ppc4210-android/bin/repo
$ chmod a+x ~/ppc4210-android/bin/repo
$ export PATH=${PATH}:~/ppc4210-android/bin

Getting Android source code:

Download Android 6.0.1 source code:

$ wget https://www.dropbox.com/s/wtb9y9c3dnxsglz/android-source-imx6-6.0.1-part1.tar.bz2?dl=0
$ wget https://www.dropbox.com/s/1lidgac6svw8qeh/android-source-imx6-6.0.1-part2.tar.bz2?dl=0
$ wget https://www.dropbox.com/s/5ukyd0s8ggrl3xu/android-source-imx6-6.0.1-part3.tar.bz2?dl=0
$ cat android-source-imx6-6.0.1-part* > filedir.tar.gz
$ tar -xf filedir.tar.gz

Important:

Update all source codes from us for the unit:

$ cd android/
$ repo init -u https://github.com/estonetechnology/ppc-4210-android-bsp-platform
$ repo sync

Compiling images

Setting up build environment:

$ source build/envsetup.sh

Selecting product to build:

$ lunch sabresd_6dq-user

Compiling image:

$ make

Note: If "Make completed successful" appears the compilation is successful

Adding images into MfgTool to flash the unit:

$ ./build/hb-tools/make.sh MFG

After completion, the file as PPC-2230-MNC-HABEY-*.zip is used.

Unzip the *.zip file to get the mfgtools

How to build partial images:

Building kernel image:

$ ./build/hb-tools/make.sh k

Building uboot image:

$ ./build/hb-tools/make.sh u

Building boot image:

$ ./build/hb-tools/make.sh b

Building system image:

$ ./build/hb-tools/make.sh a

Building recovery image:

$ ./build/hb-tools/make.sh OTA

Flashing Image

  • Preparation:

Set the boot switch to "2"

Emb2230-sw2.png

Connect the board to a Windows OS host using OTG cable.

Emb2230-otg.png

Using mfgtools that has been extracted above to flash. Execute the ppc-2230-android.vbs:

Mfgtool-2.png
Click Start to flash the image.
Mfgtool-3.png
The flashing process is done once two processing bars turned to green.
Mfgtool-4.png
Now, click Stop and Exit the tool.

  • Starting up:

Set the boot switch to "1"

Emb2230-sw1.png

Plug in the PoE-Ethernet cable and power on

Emb2230-rj45.png

  • Now, it's running android