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)
 
(7 intermediate revisions by 2 users not shown)
Line 186: Line 186:
  
 
<code>
 
<code>
<B>$</B> git clone -b ppc-4710-2g https://github.com/estonetechnology/emb-2238-android-vendor.git
+
<B>$</B> git clone -b ppc-4710-<B>2g</B> https://github.com/estonetechnology/emb-2238-android-vendor.git
 
</code>
 
</code>
  
 
<code>
 
<code>
<B>$</B> git clone -b ppc-4710-2g https://github.com/estonetechnology/emb-2238-android-device.git
+
<B>$</B> git clone -b ppc-4710-<B>2g</B> https://github.com/estonetechnology/emb-2238-android-device.git
 
</code>
 
</code>
  
Line 206: Line 206:
  
 
<code>
 
<code>
<B>$</B> rm -r build/
+
<B>$</B> rm -rv build/
 
</code>
 
</code>
  
Line 234: Line 234:
  
 
== Build PPC-4310 Android 8 Image ==
 
== 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 248: Line 251:
  
 
<code>
 
<code>
<B>$</B> export CROSS_COMPILE=~/ppc4310-android8/other/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 264: 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 ==
 
== 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