Difference between revisions of "IoTGateway/BSP/Android/Android BSP User Guide 6.0.1 2.1.0"
Billy.soong (talk | contribs) |
Billy.soong (talk | contribs) |
||
Line 1: | Line 1: | ||
− | == | + | == Android BSP Version == |
− | + | Android 6.0.1_2.1.0 | |
− | + | == Introduction == | |
+ | |||
+ | This document describes how to work with the ELAA Android 6.0.1 Board Support Package (BSP) release for ROM-7421/3420. The BSP includes bootloaders; the Android Linux kernel and root file system; and tools and documentation to ease development, deployment, and execution of Android-based systems. | ||
+ | |||
+ | == Setup Ubuntu Host Computer == | ||
+ | |||
+ | === Required equipment and software === | ||
+ | |||
+ | *Ubuntu 14.04 LTS 64bit for Android build host OS | ||
+ | *80G bytes free disk spaces for build image | ||
+ | |||
+ | === Install Ubuntu === | ||
+ | |||
+ | *IMPORTANT! You must be able to log in as root or use sudo to have root permissions during the installation. | ||
<span style="font-size:small;"><span style="font-family:times new roman,times,serif;">Go to [http://releases.ubuntu.com/14.04/ http://releases.ubuntu.com/14.04/] and download 64-bit PC (AMD64) desktop image: [http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso] for the installation.</span></span> | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;">Go to [http://releases.ubuntu.com/14.04/ http://releases.ubuntu.com/14.04/] and download 64-bit PC (AMD64) desktop image: [http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso] for the installation.</span></span> | ||
− | === | + | === Install docker and Use docker === |
<span style="font-size:small;"><span style="font-family:times new roman,times,serif;">Please use docker environment to compiler Android 6.0.1_2.1.0</span></span> | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;">Please use docker environment to compiler Android 6.0.1_2.1.0</span></span> | ||
Line 19: | Line 32: | ||
<span style="font-size:small;"><span style="font-family:times new roman,times,serif;">Reference: [http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker]</span></span> | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;">Reference: [http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker]</span></span> | ||
− | === | + | == Getting Android Source Code == |
+ | |||
+ | Related version information: | ||
+ | |||
+ | *Android 6.0.1_2.1.0 | ||
+ | *kernel Yocto-2.0 | ||
+ | *U-Boot Yocto-2.0 | ||
− | + | To pull down the Android source tree to your working directory from the repositories as specified in the default manifest, run | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <syntaxhighlight lang="bash">$ mkdir myandroid | |
+ | $ mkdir bin | ||
+ | $ cd myandroid/ | ||
+ | $ curl https://storage.googleapis.com/git-repo-downloads/repo > ../bin/repo | ||
+ | $ chmod a+x ../bin/repo | ||
+ | $ ../bin/repo init -u https://github.com/ADVANTECH-Corp/android-manifest.git -b m6.0.1_2.1.0-ga | ||
+ | $ ../bin/repo sync</syntaxhighlight><span style="font-family:times new roman,times,serif;"><span style="font-size:small;">Remove the .repo and .git file</span></span> | ||
− | + | <syntaxhighlight lang="bash">$ find . -name .repo | xargs rm -rf | |
+ | </syntaxhighlight> | ||
− | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;">Patch to Android M6.0.1_2.1.0</span></span> | + | <syntaxhighlight lang="bash">$ find . -name .git | xargs rm -rf |
+ | </syntaxhighlight> <span style="font-size:small;"><span style="font-family:times new roman,times,serif;">Patch to Android M6.0.1_2.1.0</span></span> | ||
− | + | <syntaxhighlight lang="bash">$ cd myandroid/bootable/bootloader/uboot-imx/ | |
+ | $ patch -p1 <../../../patches_android_6.0.1/6001-Uboot_Yocto_4.1.15_1.2.0-to-Android_M6.0.1_2.1.0.patch | ||
+ | $ cd myandroid/kernel_imx/ | ||
+ | $ patch -p1 <../patches_android_6.0.1/6001-Linux_Yocto_4.1.15_1.2.0-to-Android_M6.0.1_2.1.0.patch | ||
+ | $ cd myandroid/ | ||
+ | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
=== === | === === | ||
− | == | + | == Building Android 6.0.1_2.1.0 image for SD card == |
− | <span style="font-family:times new roman,times,serif;">[ For reference ]</span> | + | <span style="font-family: times new roman,times,serif;">[ For reference ]</span> |
− | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;">If your product is | + | <span style="font-size: small;"><span style="font-family: times new roman,times,serif;">If your product is ROM-3420A1, the product name is rom_3420_a1</span></span> |
− | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;"><span style="color: | + | <span style="font-size: small;"><span style="font-family: times new roman,times,serif;"><span style="color: rgb(255, 0, 0);">$PRODUCT = rom_3420_a1</span></span></span> |
− | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;">If your product is | + | <span style="font-size: small;"><span style="font-family: times new roman,times,serif;">If your product is ROM-7421A1, the product name is rom_7421_a1</span></span> |
− | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;"><span style="color: | + | <span style="font-size: small;"><span style="font-family: times new roman,times,serif;"><span style="color: rgb(255, 0, 0);">$PRODUCT = rom_7421_a1</span></span></span> |
− | |||
− | |||
− | === <span style="font-family:times new roman,times,serif;">Build Instructions</span> === | + | === <span style="font-family: times new roman,times,serif;">Build Instructions</span> === |
− | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;">Set the $JAVA_HOME environment variable</span></span> | + | <span style="font-size: small;"><span style="font-family: times new roman,times,serif;">Set the $JAVA_HOME environment variable</span></span> |
<small>$ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/</small> | <small>$ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/</small> | ||
+ | '''<span style="font-size: small;"><span style="font-family: times new roman,times,serif;">To build boot loader</span></span>''' | ||
− | + | <span style="font-size: small;"><span style="font-family: times new roman,times,serif;">Perform the following command in terminal console</span></span> | |
− | |||
− | |||
− | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;">Perform the following command in terminal console</span></span> | ||
<small>$ make -j4 bootloader</small> | <small>$ make -j4 bootloader</small> | ||
− | :<span style="font-family:times new roman,times,serif;">The two files, u-boot_crc.bin & u-boot_crc.bin.crc, will be located in directory, ./out/target/product/product_name</span> | + | :<span style="font-family: times new roman,times,serif;">The two files, u-boot_crc.bin & u-boot_crc.bin.crc, will be located in directory, ./out/target/product/product_name</span> |
+ | '''<span style="font-family: times new roman,times,serif;">To build boot image</span>'''<span style="font-family: times new roman,times,serif;"></span> | ||
− | + | <span style="font-family: times new roman,times,serif;">Perform the following command in terminal console</span> | |
− | |||
− | |||
− | <span style="font-family:times new roman,times,serif;">Perform the following command in terminal console</span> | ||
<small>$ make -j4 bootimage</small> | <small>$ make -j4 bootimage</small> | ||
+ | '''<span style="font-family: times new roman,times,serif;">To build system image</span>'''<span style="font-family: times new roman,times,serif;"></span> | ||
− | + | <span style="font-family: times new roman,times,serif;">Perform the following command in terminal console</span> | |
− | |||
− | |||
− | <span style="font-family:times new roman,times,serif;">Perform the following command in terminal console</span> | ||
<small>$ make -j4 systemimage</small> | <small>$ make -j4 systemimage</small> | ||
− | <span style="font-size:small;"><span style="font-family:times new roman,times,serif;">simg2img is a tool that converts a sparse system image to a raw system image on a Linux host PC and is located in myandroid/out/host/linux-x86/bin/simg2img.</span></span> | + | <span style="font-size: small;"><span style="font-family: times new roman,times,serif;">simg2img is a tool that converts a sparse system image to a raw system image on a Linux host PC and is located in myandroid/out/host/linux-x86/bin/simg2img.</span></span> |
<small>$ out/host/linux-x86/bin/simg2img out/target/product/$PRODUCT/system.img out/target/product/$PRODUCT/system_raw.img | <small>$ out/host/linux-x86/bin/simg2img out/target/product/$PRODUCT/system.img out/target/product/$PRODUCT/system_raw.img | ||
$ mv out/target/product/$PRODUCT/system_raw.img out/target/product/$PRODUCT/system.img</small> | $ mv out/target/product/$PRODUCT/system_raw.img out/target/product/$PRODUCT/system.img</small> | ||
− | <span style="font-size:small;"># Porting your device reference: [http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/How_to_do_about_first_porting <span style="color: | + | <span style="font-size: small;"># Porting your device reference: [http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/How_to_do_about_first_porting <span style="color: rgb(0, 0, 255);">http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/How_to_do_about_first_porting</span>]</span> |
− | <span style="font-size:small;"># The script below can be used to partition a SD card reference: [https://github.com/ADVANTECH-Corp/android_mk_sd_emmc_script <span style="color: | + | <span style="font-size: small;"># The script below can be used to partition a SD card reference: [https://github.com/ADVANTECH-Corp/android_mk_sd_emmc_script <span style="color: rgb(0, 0, 255);">https://github.com/ADVANTECH-Corp/android_mk_sd_emmc_script</span>]</span> |
Revision as of 04:26, 8 February 2017
Contents
Android BSP Version
Android 6.0.1_2.1.0
Introduction
This document describes how to work with the ELAA Android 6.0.1 Board Support Package (BSP) release for ROM-7421/3420. The BSP includes bootloaders; the Android Linux kernel and root file system; and tools and documentation to ease development, deployment, and execution of Android-based systems.
Setup Ubuntu Host Computer
Required equipment and software
- Ubuntu 14.04 LTS 64bit for Android build host OS
- 80G bytes free disk spaces for build image
Install Ubuntu
- IMPORTANT! You must be able to log in as root or use sudo to have root permissions during the installation.
Go to http://releases.ubuntu.com/14.04/ and download 64-bit PC (AMD64) desktop image: http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso for the installation.
Install docker and Use docker
Please use docker environment to compiler Android 6.0.1_2.1.0
Android 6.0.1_2.1.0 Docker
Image Repository : advrisc/u14.04-imx6abv4
Image Tag : 20160825
Reference: http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker
Getting Android Source Code
Related version information:
- Android 6.0.1_2.1.0
- kernel Yocto-2.0
- U-Boot Yocto-2.0
To pull down the Android source tree to your working directory from the repositories as specified in the default manifest, run
$ mkdir myandroid
$ mkdir bin
$ cd myandroid/
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ../bin/repo
$ chmod a+x ../bin/repo
$ ../bin/repo init -u https://github.com/ADVANTECH-Corp/android-manifest.git -b m6.0.1_2.1.0-ga
$ ../bin/repo sync
$ find . -name .repo | xargs rm -rf
$ find . -name .git | xargs rm -rf
$ cd myandroid/bootable/bootloader/uboot-imx/
$ patch -p1 <../../../patches_android_6.0.1/6001-Uboot_Yocto_4.1.15_1.2.0-to-Android_M6.0.1_2.1.0.patch
$ cd myandroid/kernel_imx/
$ patch -p1 <../patches_android_6.0.1/6001-Linux_Yocto_4.1.15_1.2.0-to-Android_M6.0.1_2.1.0.patch
$ cd myandroid/
Building Android 6.0.1_2.1.0 image for SD card
[ For reference ]
If your product is ROM-3420A1, the product name is rom_3420_a1
$PRODUCT = rom_3420_a1
If your product is ROM-7421A1, the product name is rom_7421_a1
$PRODUCT = rom_7421_a1
Build Instructions
Set the $JAVA_HOME environment variable
$ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
To build boot loader
Perform the following command in terminal console
$ make -j4 bootloader
- The two files, u-boot_crc.bin & u-boot_crc.bin.crc, will be located in directory, ./out/target/product/product_name
To build boot image
Perform the following command in terminal console
$ make -j4 bootimage
To build system image
Perform the following command in terminal console
$ make -j4 systemimage
simg2img is a tool that converts a sparse system image to a raw system image on a Linux host PC and is located in myandroid/out/host/linux-x86/bin/simg2img.
$ out/host/linux-x86/bin/simg2img out/target/product/$PRODUCT/system.img out/target/product/$PRODUCT/system_raw.img $ mv out/target/product/$PRODUCT/system_raw.img out/target/product/$PRODUCT/system.img
# Porting your device reference: http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/How_to_do_about_first_porting
# The script below can be used to partition a SD card reference: https://github.com/ADVANTECH-Corp/android_mk_sd_emmc_script