Difference between revisions of "PPC-4310 Android 8 Image"

From Estone Technology Wiki
Jump to: navigation, search
(Build PPC-4310 Android 8 Image)
(Build PPC-4310 Android 8 Image)
 
(34 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
* Below are the minimum requirements for the host system to be able to compile the PPC-4310 Android 8 Image from source
 
* Below are the minimum requirements for the host system to be able to compile the PPC-4310 Android 8 Image from source
  
<B>
 
Host Minimum Requirements: <br>
 
Minimum RAM - 16GB RAM <br>
 
Minimum Hard Disk - 300GB Hard Disk <br>
 
  
 +
<B>Host Minimum Requirements:</B> <br>
 +
<B>Minimum RAM -</B> 16GB RAM <br>
 +
<B>Minimum Hard Disk -</B> 300GB Hard Disk <br>
 +
 +
 +
<B>Host Machine:</B> <br>
 +
<B>Distributor ID - </B>Ubuntu <br>
 +
<B>Description - </B>Ubuntu 16.04.6 LTS <br>
 +
<B>Release - </B>16.04 <br>
 +
<B>Codename - </B>xenial <br>
  
Host Machine: <br>
 
Distributor ID: Ubuntu <br>
 
Description: Ubuntu 16.04.6 LTS <br>
 
Release: 16.04 <br>
 
Codename: xenial <br>
 
</B>
 
  
 
== Download Dependencies ==
 
== Download Dependencies ==
  
<br>
 
 
* Download dependencies on host system before compile.
 
* Download dependencies on host system before compile.
  
Line 29: Line 28:
 
<B>$</B> sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386
 
<B>$</B> sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386
 
</code>
 
</code>
 
+
 
<code>
 
<code>
<B>$</B> lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip
+
<B>$</B> sudo apt-get install lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip
 
</code>
 
</code>
  
Line 85: Line 84:
 
<B>$</B> sudo apt-get install libz-dev
 
<B>$</B> sudo apt-get install libz-dev
 
</code>
 
</code>
 +
  
 
== Git Setup ==
 
== Git Setup ==
  
<br>
 
 
* Setup your Git for Android 8 Project
 
* Setup your Git for Android 8 Project
 
<code>
 
<code>
Line 102: Line 101:
 
</code>
 
</code>
  
== Download Android 8 Source Code ==
+
 
<br>
+
== Setting up repo ==
<B>Note:</B> Download the Android 8 source code for PPC-4310 <br>
+
 
 
<code>
 
<code>
 
<B>$</B> cd ~
 
<B>$</B> cd ~
 +
</code>
 +
 +
<code>
 +
<B>$</B> mkdir ppc4310-android8
 +
</code>
 +
 +
<code>
 +
<B>$</B> cd ppc4310-android8
 +
</code>
 +
 +
<code>
 +
<B>$</B> mkdir bin
 +
</code>
 +
 +
<code>
 +
<B>$</B> cd bin
 +
</code>
 +
 +
<code>
 +
<B>$</B> curl https://storage.googleapis.com/git-repo-downloads/repo > ~/ppc4310-android8/bin/repo
 +
</code>
 +
 +
<code>
 +
<B>$</B> chmod a+x ~/ppc4310-android8/bin/repo
 +
</code>
 +
 +
<code>
 +
<B>$</B> export PATH=${PATH}:~/ppc4310-android8/bin
 +
</code>
 +
 +
 +
== Download & Extract Android 8 Source Code ==
 +
 +
<B>Note:</B> Download the parts of the Android 8 source code for PPC-4310 <br>
 +
<code>
 +
<B>$</B> cd ~/ppc4310-android8
 
</code>
 
</code>
  
Line 132: Line 167:
  
 
<br>
 
<br>
* Extract the Android Source code
+
* Extract the Android 8 Source code
 
<code>
 
<code>
 
<B>$</B> tar -xvf filedir.tar.gz  
 
<B>$</B> tar -xvf filedir.tar.gz  
 
</code>
 
</code>
  
 +
 +
== Synchronize PPC-4310 Source Code ==
 +
 +
<br>
 +
<B>Note:</B> Steps below synchronize the original Android 8 source code with the updated PPC-4310 source code <br>
 
<code>
 
<code>
<B>$</B>
+
<B>$</B> cd other
 
</code>
 
</code>
  
 
<code>
 
<code>
<B>$</B>  
+
<B>$</B> git clone -b emb-2238 https://github.com/estonetechnology/emb-2238-android-hardware.git
 
</code>
 
</code>
  
== Setting up repo ==
+
<code>
 +
<B>$</B> git clone -b ppc-4710-<B>2g</B> https://github.com/estonetechnology/emb-2238-android-vendor.git
 +
</code>
  
 +
<code>
 +
<B>$</B> git clone -b ppc-4710-<B>2g</B> https://github.com/estonetechnology/emb-2238-android-device.git
 +
</code>
  
<br>
 
 
<code>
 
<code>
<B>$</B> cd ~
+
<B>$</B> git clone -b emb-2238 https://github.com/estonetechnology/emb-2238-android-system.git
 
</code>
 
</code>
  
 
<code>
 
<code>
<B>$</B> mkdir bin
+
<B>$</B> git clone -b emb-2238 https://github.com/estonetechnology/emb-2238-android-packages.git
 
</code>
 
</code>
  
 
<code>
 
<code>
<B>$</B> cd bin
+
<B>$</B> git clone -b emb-2238 https://github.com/estonetechnology/emb-2238-android-build.git
 
</code>
 
</code>
  
 
<code>
 
<code>
<B>$</B> curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
+
<B>$</B> rm -rv build/
 
</code>
 
</code>
  
 
<code>
 
<code>
<B>$</B> chmod a+x ~/bin/repo
+
<B>$</B> mv emb-2238-android-hardware/ hardware
 
</code>
 
</code>
  
 
<code>
 
<code>
<B>$</B> export PATH=${PATH}:~/bin
+
<B>$</B> mv emb-2238-android-vendor/ vendor
 
</code>
 
</code>
  
 
<code>
 
<code>
<B>$</B> source ~/imx-o8.1.0_1.3.0_8m/imx_android_setup.sh
+
<B>$</B> mv emb-2238-android-device/ device
 +
</code>
 +
 +
<code>
 +
<B>$</B> mv emb-2238-android-system/ system
 
</code>
 
</code>
  
 
<code>
 
<code>
<B>$</B> export MY_ANDROID=~/android_build
+
<B>$</B> mv emb-2238-android-packages/ packages
 
</code>
 
</code>
  
== Build PPC-4310 Android 8 Image ==
 
 
<br>
 
 
<code>
 
<code>
<B>Note:</B> Instructions below are to compile the PPC-4310 Android 8 Image <br>
+
<B>$</B> mv emb-2238-android-build/ build
<code>
+
<B>$</B> cd ${MY_ANDROID}
+
 
</code>
 
</code>
 +
 +
== Build PPC-4310 Android 8 Image ==
 +
 +
<!-- command below needed sometimes if image fails to compile -->
 +
<!-- # export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g" -->
  
 
<code>
 
<code>
<B>$</B> ./prebuilts/sdk/tools/jack-admin stop-server
+
<B>$</B> ./prebuilts/sdk/tools/jack-admin kill-server
 
</code>
 
</code>
  
Line 203: Line 251:
  
 
<code>
 
<code>
<B>$</B> export CROSS_COMPILE=~/android_build/prebuilts/gcc/linux-x86/aarch64/aarch64-linuxandroid-4.9/bin/aarch64-linux-android-
+
<B>$</B> export MY_ANDROID=~/ppc4310-android8/other/
 +
</code>
 +
 
 +
<code>
 +
<B>$</B> export CROSS_COMPILE=${MY-ANDROID}/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
 
</code>
 
</code>
  
Line 219: Line 271:
  
 
<code>
 
<code>
<B>$</B> make 2>&1 | tee build-log.txt
+
<B>$</B> make -j4 2>&1 | tee build-log.txt
 
</code>
 
</code>
 +
 +
== Installing Android 8 Image ==

Latest revision as of 21:43, 18 September 2019

Requirements

  • Below are the minimum requirements for the host system to be able to compile the PPC-4310 Android 8 Image from source


Host Minimum Requirements:
Minimum RAM - 16GB RAM
Minimum Hard Disk - 300GB Hard Disk


Host Machine:
Distributor ID - Ubuntu
Description - Ubuntu 16.04.6 LTS
Release - 16.04
Codename - xenial


Download Dependencies

  • Download dependencies on host system before compile.

$ sudo apt-get update

$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386

$ sudo apt-get install lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip

$ sudo apt-get install uuid uuid-dev

$ sudo apt-get install zlib1g-dev liblz-dev

$ sudo apt-get install liblzo2-2 liblzo2-dev

$ sudo apt-get install lzop

$ sudo apt-get install git-core curl

$ sudo apt-get install u-boot-tools

$ sudo apt-get install mtd-utils

$ sudo apt-get install android-tools-fsutils

$ sudo apt-get install openjdk-8-jdk

$ sudo apt-get install device-tree-compiler

$ sudo apt-get install gdisk

$ sudo apt-get install m4

$ sudo apt-get install libz-dev


Git Setup

  • Setup your Git for Android 8 Project

$ git config --global user.name "First Last"

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

$ git config --list


Setting up repo

$ cd ~

$ mkdir ppc4310-android8

$ cd ppc4310-android8

$ mkdir bin

$ cd bin

$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/ppc4310-android8/bin/repo

$ chmod a+x ~/ppc4310-android8/bin/repo

$ export PATH=${PATH}:~/ppc4310-android8/bin


Download & Extract Android 8 Source Code

Note: Download the parts of the Android 8 source code for PPC-4310
$ cd ~/ppc4310-android8

$ wget -c https://www.dropbox.com/s/5rlgrtjmq2akkab/part00?dl=0

$ wget -c https://www.dropbox.com/s/p7g7sqnm1kqty7p/part01?dl=0

$ wget -c https://www.dropbox.com/s/b9jsfo0kefy0d0e/part02?dl=0

$ wget -c https://www.dropbox.com/s/r1sargiv1zze3yv/part03?dl=0


  • Concatenate the downloaded Android 8 Source code

$ cat part0* > filedir.tar.gz


  • Extract the Android 8 Source code

$ tar -xvf filedir.tar.gz


Synchronize PPC-4310 Source Code


Note: Steps below synchronize the original Android 8 source code with the updated PPC-4310 source code
$ cd other

$ git clone -b emb-2238 https://github.com/estonetechnology/emb-2238-android-hardware.git

$ git clone -b ppc-4710-2g https://github.com/estonetechnology/emb-2238-android-vendor.git

$ git clone -b ppc-4710-2g https://github.com/estonetechnology/emb-2238-android-device.git

$ git clone -b emb-2238 https://github.com/estonetechnology/emb-2238-android-system.git

$ git clone -b emb-2238 https://github.com/estonetechnology/emb-2238-android-packages.git

$ git clone -b emb-2238 https://github.com/estonetechnology/emb-2238-android-build.git

$ rm -rv build/

$ mv emb-2238-android-hardware/ hardware

$ mv emb-2238-android-vendor/ vendor

$ mv emb-2238-android-device/ device

$ mv emb-2238-android-system/ system

$ mv emb-2238-android-packages/ packages

$ mv emb-2238-android-build/ build

Build PPC-4310 Android 8 Image

$ ./prebuilts/sdk/tools/jack-admin kill-server

$ ./prebuilts/sdk/tools/jack-admin start-server

$ export ARCH=arm64

$ export MY_ANDROID=~/ppc4310-android8/other/

$ export CROSS_COMPILE=${MY-ANDROID}/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-

$ export LC_ALL=C

$ source build/envsetup.sh

$ lunch evk_8mq-userdebug

$ make -j4 2>&1 | tee build-log.txt

Installing Android 8 Image