Difference between revisions of "IoTGateway/BSP/Android/User Guide 9.0.0 For i.MX8"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
=  =
+
<h1>&nbsp;</h1>
  
== Contents ==
+
<h2>Contents</h2>
  
&nbsp;[[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0# hide]]&nbsp;
+
<p>&nbsp;[<a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#">hide</a>]&nbsp;</p>
  
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Android_BSP_Version 1&nbsp;Android BSP Version]
+
<ul>
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Introduction 2&nbsp;Introduction]
+
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Android_BSP_Version" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Android_BSP_Version" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Android_BSP_Version">1&nbsp;Android BSP Version</a></li>
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Setup_Ubuntu_Host_Computer 3&nbsp;Setup Ubuntu Host Computer]
+
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Introduction" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Introduction" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Introduction">2&nbsp;Introduction</a></li>
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Required_equipment_and_software 3.1&nbsp;Required equipment and software]
+
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Setup_Ubuntu_Host_Computer" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Setup_Ubuntu_Host_Computer" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Setup_Ubuntu_Host_Computer">3&nbsp;Setup Ubuntu Host Computer</a>
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_Ubuntu 3.2&nbsp;Install Ubuntu]
+
<ul>
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Run_Docker_example 4&nbsp;Run Docker example]
+
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Required_equipment_and_software" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Required_equipment_and_software" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Required_equipment_and_software">3.1&nbsp;Required equipment and software</a></li>
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_docker_and_Use_docker 4.1&nbsp;Install docker and Use docker]
+
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_Ubuntu" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_Ubuntu" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_Ubuntu">3.2&nbsp;Install Ubuntu</a></li>
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#To_pull_Docker_image_from_Docker_Hub 4.2&nbsp;To pull Docker image from Docker Hub]
+
</ul>
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Getting_Android_Source_Code 5&nbsp;Getting Android Source Code]
+
</li>
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Related_version_information: 5.1&nbsp;Related version information:]
+
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Run_Docker_example" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Run_Docker_example" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Run_Docker_example">4&nbsp;Run Docker example</a>
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Building_Android_9.0.0.C2.A0image_for_SD_card 6&nbsp;Building Android 9.0.0&nbsp;image for SD card]
+
<ul>
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Build_Instructions 6.1&nbsp;Build Instructions]
+
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_docker_and_Use_docker" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_docker_and_Use_docker" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_docker_and_Use_docker">4.1&nbsp;Install docker and Use docker</a></li>
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Burning_image 7&nbsp;Burning image]
+
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#To_pull_Docker_image_from_Docker_Hub" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#To_pull_Docker_image_from_Docker_Hub" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#To_pull_Docker_image_from_Docker_Hub">4.2&nbsp;To pull Docker image from Docker Hub</a></li>
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#SD_card_boot 7.1&nbsp;SD card boot]
+
</ul>
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#EMMC_boot 7.2&nbsp;EMMC boot]
+
</li>
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Display_Configuration.C2.A0 8&nbsp;Display Configuration&nbsp;]
+
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Getting_Android_Source_Code" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Getting_Android_Source_Code" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Getting_Android_Source_Code">5&nbsp;Getting Android Source Code</a>
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Know_Issue 8.1&nbsp;Know Issue]
+
<ul>
 +
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Related_version_information:" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Related_version_information:" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Related_version_information:">5.1&nbsp;Related version information:</a></li>
 +
</ul>
 +
</li>
 +
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Building_Android_9.0.0.C2.A0image_for_SD_card" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Building_Android_9.0.0.C2.A0image_for_SD_card" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Building_Android_9.0.0.C2.A0image_for_SD_card">6&nbsp;Building Android 9.0.0&nbsp;image for SD card</a>
 +
<ul>
 +
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Build_Instructions" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Build_Instructions" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Build_Instructions">6.1&nbsp;Build Instructions</a></li>
 +
</ul>
 +
</li>
 +
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Burning_image" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Burning_image" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Burning_image">7&nbsp;Burning image</a>
 +
<ul>
 +
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#SD_card_boot" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#SD_card_boot" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#SD_card_boot">7.1&nbsp;SD card boot</a></li>
 +
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#EMMC_boot" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#EMMC_boot" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#EMMC_boot">7.2&nbsp;EMMC boot</a></li>
 +
</ul>
 +
</li>
 +
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Display_Configuration.C2.A0" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Display_Configuration.C2.A0" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Display_Configuration.C2.A0">8&nbsp;Display Configuration&nbsp;</a>
 +
<ul>
 +
<li><a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Know_Issue" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Know_Issue" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Know_Issue">8.1&nbsp;Know Issue</a></li>
 +
</ul>
 +
</li>
 +
</ul>
  
== Android BSP Version[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=1 edit]] ==
+
<h2>Android BSP Version[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=1" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=1" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=1">edit</a>]</h2>
  
Android 9.0.0_r35
+
<p>Android 9.0.0_r35</p>
  
== Introduction[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=2 edit]] ==
+
<h2>Introduction[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=2" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=2" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=2">edit</a>]</h2>
  
This document describes how to work with the RISC and ELAA Android 9.0.0&nbsp;Board Support Package (BSP) release. The BSP includes bootloaders; the Android Linux kernel and root file system; and tools and documentation to ease the development, deployment, and execution of Android-based systems.
+
<p>This document describes how to work with the RISC and ELAA Android 9.0.0&nbsp;Board Support Package (BSP) release. The BSP includes bootloaders; the Android Linux kernel and root file system; and tools and documentation to ease the development, deployment, and execution of Android-based systems.</p>
  
== Setup Ubuntu Host Computer[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=3 edit]] ==
+
<h2>Setup Ubuntu Host Computer[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=3" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=3" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=3">edit</a>]</h2>
  
=== Required equipment and software[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=4 edit]] ===
+
<h3>Required equipment and software[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=4" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=4" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=4">edit</a>]</h3>
  
*Ubuntu 16.04 LTS 64bit for Android build host OS
+
<ul>
*130G bytes free disk spaces for build image
+
<li>Ubuntu 16.04 LTS 64bit for Android build host OS</li>
 +
<li>130G bytes free disk spaces for build image</li>
 +
</ul>
  
=== Install Ubuntu[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=5 edit]] ===
+
<h3>Install Ubuntu[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=5" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=5" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=5">edit</a>]</h3>
  
*IMPORTANT! You must be able to log in as root or use sudo to have root permissions during the installation.
+
<ul>
 +
<li>IMPORTANT! You must be able to log in as root or use sudo to have root permissions during the installation.</li>
 +
</ul>
  
Go to&nbsp;[http://releases.ubuntu.com/16.04/ [1]] and download 64-bit PC (AMD64) desktop image:&nbsp;[http://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-amd64.iso [2]] for the installation.
+
<p>Go to&nbsp;<a alt="http://releases.ubuntu.com/16.04/" href="http://releases.ubuntu.com/16.04/" title="http://releases.ubuntu.com/16.04/">[1</a>] and download 64-bit PC (AMD64) desktop image:&nbsp;<a alt="http://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-amd64.iso" href="http://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-amd64.iso" title="http://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-amd64.iso">[2</a>] for the installation.</p>
  
== Run Docker example[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=6 edit]] ==
+
<h2>Run Docker example[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=6" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=6" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=6">edit</a>]</h2>
  
Step1 Run docker container (example)
+
<p>Step1 Run docker container (example)</p>
<pre>&nbsp;$&nbsp;docker run -it --name android_p9 -v /home/bsp/myandroid:/home/adv/BSP:rw advrisc/u16.04-imx6abv6 /bin/bash</pre>
 
  
Step2 In container, change the user. (example)
+
<pre>
<pre> adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP</pre>
+
&amp;nbsp;$&amp;nbsp;docker run -it --name android_p9 -v /home/bsp/myandroid:/home/adv/BSP:rw advrisc/u16.04-imx6abv6 /bin/bash</pre>
 +
 
 +
<p>Step2 In container, change the user. (example)</p>
 +
 
 +
<pre>
 +
adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP</pre>
  
=== Install docker and Use docker[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=7 edit]] ===
+
<h3>Install docker and Use docker[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=7" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=7" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=7">edit</a>]</h3>
  
Please use docker environment to compiler Android 9.0.0
+
<p>Please use docker environment to compiler Android 9.0.0</p>
  
*Android 9.0.0 Docker
+
<ul>
*Image Repository&nbsp;: advrisc/u16.04-imx6abv6
+
<li>Android 9.0.0 Docker</li>
*Image Tag&nbsp;: lastest
+
<li>Image Repository&nbsp;: advrisc/u16.04-imx6abv6</li>
 +
<li>Image Tag&nbsp;: lastest</li>
 +
</ul>
  
Reference:&nbsp;[http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker [3]]
+
<p>Reference:&nbsp;<a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker">[3</a>]</p>
  
=== To pull Docker image from Docker Hub[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=8 edit]] ===
+
<h3>To pull Docker image from Docker Hub[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=8" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=8" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=8">edit</a>]</h3>
  
*docker pull advrisc/u16.04-imx6abv6
+
<ul>
*docker run --name imx6ABV6&nbsp;-it advrisc/u16.04-imx6abv6&nbsp;/bin/bash
+
<li>docker pull advrisc/u16.04-imx6abv6</li>
 +
<li>docker run --name imx6ABV6&nbsp;-it advrisc/u16.04-imx6abv6&nbsp;/bin/bash</li>
 +
</ul>
  
 +
<p>&nbsp;</p>
  
== Getting Android Source Code[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=9 edit]] ==
+
<h2>Getting Android Source Code[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=9" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=9" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=9">edit</a>]</h2>
  
=== Related version information:[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=10 edit]] ===
+
<h3>Related version information:[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=10" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=10" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=10">edit</a>]</h3>
  
*Android 9.0.0_r35  
+
<ul>
*kernel Yocto-2.5  
+
<li>Android 9.0.0_r35</li>
*U-Boot Yocto-2.5  
+
<li>kernel Yocto-2.5</li>
 +
<li>U-Boot Yocto-2.5</li>
 +
</ul>
  
Step1&nbsp;: To pull down the Android source tree to your working directory from the repositories as specified in the default manifest
+
<p>Step1&nbsp;: To pull down the Android source tree to your working directory from the repositories as specified in the default manifest</p>
<pre>$ git config --global user.name "Your Name"
+
 
 +
<pre>
 +
$ git config --global user.name &quot;Your Name&quot;
 
$ git config --global user.email you@example.com</pre>
 
$ git config --global user.email you@example.com</pre>
<pre>$ mkdir myandroid
+
 
 +
<pre>
 +
$ mkdir myandroid
 
</pre>
 
</pre>
  
$ mkdir bin
+
<p>$ mkdir bin</p>
 +
 
 +
<p>$ cd myandroid/ $ curl <a alt="https://storage.googleapis.com/git-repo-downloads/repo" href="https://storage.googleapis.com/git-repo-downloads/repo" title="https://storage.googleapis.com/git-repo-downloads/repo">https://storage.googleapis.com/git-repo-downloads/repo</a> &gt; ../bin/repo</p>
  
$ cd myandroid/ $ curl [https://storage.googleapis.com/git-repo-downloads/repo https://storage.googleapis.com/git-repo-downloads/repo] > ../bin/repo
+
<p>$ chmod a+x ../bin/repo $ ../bin/repo init -u <a alt="https://github.com/ADVANTECH-Corp/android-manifest.git" href="https://github.com/ADVANTECH-Corp/android-manifest.git" title="https://github.com/ADVANTECH-Corp/android-manifest.git">https://github.com/ADVANTECH-Corp/android-manifest.git</a> -b p9.0.0_2.2.0-ga -m release_version.xml</p>
  
$ chmod a+x ../bin/repo $ ../bin/repo init -u [https://github.com/ADVANTECH-Corp/android-manifest.git https://github.com/ADVANTECH-Corp/android-manifest.git] -b p9.0.0_2.2.0-ga -m release_version.xml
+
<p>$ ../bin/repo sync</p>
  
$ ../bin/repo sync
+
<pre class="de1">
<pre class="de1">=== The release_version.xml  as follows:
+
=== The release_version.xml  as follows:
 
ROM5721 for imx8ABV9001.xml
 
ROM5721 for imx8ABV9001.xml
 
ROM5720 for imx8ABV9001.xml
 
ROM5720 for imx8ABV9001.xml
 
ROM7720 for imx8ABV9001.xml</pre>
 
ROM7720 for imx8ABV9001.xml</pre>
  
Step2: Patch to Android P9.0.0.0
+
<p>Step2: Patch to Android P9.0.0.0</p>
 +
 
 
<pre>
 
<pre>
 
$ cd ~/myandroid/vendor/nxp-opensource/uboot-imx/
 
$ cd ~/myandroid/vendor/nxp-opensource/uboot-imx/
$ patch -p1 < ../../../patches_android_9.0.0_r35/9001-Uboot_Yocto_4.14.98_2.0.0-to-android-9.0.0_r35.patch
+
$ patch -p1 &lt; ../../../patches_android_9.0.0_r35/9001-Uboot_Yocto_4.14.98_2.0.0-to-android-9.0.0_r35.patch
 
$ cd ~/myandroid/vendor/nxp-opensource/kernel_imx/
 
$ cd ~/myandroid/vendor/nxp-opensource/kernel_imx/
$ patch -p1 < ../../../patches_android_9.0.0_r35/9001-Linux_Yocto_4.14.98_2.0.0-to-android-9.0.0_r35.patch
+
$ patch -p1 &lt; ../../../patches_android_9.0.0_r35/9001-Linux_Yocto_4.14.98_2.0.0-to-android-9.0.0_r35.patch
 
$ cd myandroid
 
$ cd myandroid
 
</pre>
 
</pre>
  
== Building Android 9.0.0&nbsp;image for SD card[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=11 edit]] ==
+
<h2>Building Android 9.0.0&nbsp;image for SD card[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=11" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=11" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=11">edit</a>]</h2>
  
If your product is ROM-5720, the product name is rom5720_a1
+
<p>If your product is ROM-5720, the product name is rom5720_a1</p>
  
$PRODUCT = rom5720_a1
+
<p>$PRODUCT = rom5720_a1</p>
  
If your product is ROM-7720, the product name is rom7720_a1
+
<p>If your product is ROM-7720, the product name is rom7720_a1</p>
  
$PRODUCT = rom7720_a1
+
<p>$PRODUCT = rom7720_a1</p>
  
If your product is ROM-5721A1, the product name is rom5721_a1
+
<p>If your product is ROM-5721A1, the product name is rom5721_a1</p>
  
$PRODUCT = rom5721_a1
+
<p>$PRODUCT = rom5721_a1</p>
  
 +
<p>&nbsp;</p>
  
 +
<h3>Build Instructions[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=12" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=12" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=12">edit</a>]</h3>
  
=== Build Instructions[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=12 edit]] ===
+
<p>Set the $JAVA_HOME environment variable</p>
  
Set the $JAVA_HOME environment variable
+
<pre>
<pre>$ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
+
$ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
 
</pre>
 
</pre>
  
Set up the environment for building. This only configures the current terminal.
+
<p>Set up the environment for building. This only configures the current terminal.</p>
<pre>$ source build/envsetup.sh
+
 
 +
<pre>
 +
$ source build/envsetup.sh
 
</pre>
 
</pre>
  
Execute the Android lunch command. In this example, the setup is for the production image of Advantech RISC platfrom device with user type. If you devices is ROM5720, you will be send command rom5720_a1-userdebug
+
<p>Execute the Android lunch command. In this example, the setup is for the production image of Advantech RISC platfrom device with user type. If you devices is ROM5720, you will be send command rom5720_a1-userdebug</p>
<pre>$ lunch $PRODUCT-user
+
 
 +
<pre>
 +
$ lunch $PRODUCT-user
 
</pre>
 
</pre>
  
'''To build boot loader'''
+
<p><b>To build boot loader</b></p>
 +
 
 +
<p>Perform the following command in terminal console</p>
  
Perform the following command in terminal console
+
<pre>
<pre>$ make bootloader -j8  
+
$ make bootloader -j8  
 
</pre>
 
</pre>
  
:
+
<dl>
 +
<dd>&nbsp;</dd>
 +
</dl>
  
The two files, u-boot_crc.bin & u-boot_crc.bin.crc, will be located in directory, ./out/target/product/product_name
+
<p>The two files, u-boot_crc.bin &amp; u-boot_crc.bin.crc, will be located in directory, ./out/target/product/product_name</p>
  
'''To build boot image'''
+
<p><b>To build boot image</b></p>
  
Perform the following command in terminal console
+
<p>Perform the following command in terminal console</p>
<pre>$ make bootimage -j8
+
 
 +
<pre>
 +
$ make bootimage -j8
 
</pre>
 
</pre>
  
'''To build dtbo&nbsp;image (kernel device tree)'''
+
<p><b>To build dtbo&nbsp;image (kernel device tree)</b></p>
  
Perform the following command in terminal console
+
<p>Perform the following command in terminal console</p>
<pre>$ make dtboimage -j8
+
 
 +
<pre>
 +
$ make dtboimage -j8
 
</pre>
 
</pre>
  
'''To build system image'''
+
<p><b>To build system image</b></p>
 +
 
 +
<p>Perform the following command in terminal console</p>
  
Perform the following command in terminal console
+
<pre>
<pre>$ make -j8
+
$ make -j8
 
</pre>
 
</pre>
  
== Burning image[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=13 edit]] ==
+
<p><strong>Building a full update package</strong></p>
  
=== SD card boot[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=14 edit]] ===
+
<p>Perform the following command in terminal console</p>
  
'''Go to those built&nbsp;image file directory'''
+
<pre>
 +
$ make otapackage -j8
 +
</pre>
  
For daily build
+
<p><strong>Implementing OTA update</strong><br />
<pre>$ cd ~/image/
+
To update system from board&#39;s storage, perform the following steps:<br />
 +
1. Unzip ota_update.zip or incremental_ota_update.zip (Generated on <strong>Building a full update package</strong>) to get payload.bin and payload_properties.txt .<br />
 +
2. Push payload.bin to board&#39;s /sdcard dir: adb push payload.bin /sdcard/ .<br />
 +
3. Cat the content of payload_properties.txt like this:<br />
 +
&bull; FILE_HASH=0fSBbXonyTjaAzMpwTBgM9AVtlBeyOigpCCgkoOfHKY=<br />
 +
&bull; FILE_SIZE=379074366&bull; METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ=<br />
 +
&bull; METADATA_SIZE=46866<br />
 +
4. Input the following command on the board&#39;s console to update:</p>
 +
 
 +
<pre>
 +
$ update_engine_client --payload=file:///sdcard/payload.bin --update --
 +
headers=&quot;FILE_HASH=0fSBbXonyTjaAzMpwTBgM9AVtlBeyOigpCCgkoOfHKY=
 +
FILE_SIZE=379074366
 +
METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ=
 +
METADATA_SIZE=46866&quot;
 
</pre>
 
</pre>
  
For local build
+
<p>5. The system will update in the background. After it finishes, it will show &quot;Update successfully applied, waiting to reboot&quot; in the logcat.</p>
<pre>$ cd ~/out/target/product/PRODUCT_NAME/
+
 
 +
<h2>Burning image[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=13" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=13" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=13">edit</a>]</h2>
 +
 
 +
<h3>SD card boot[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=14" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=14" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=14">edit</a>]</h3>
 +
 
 +
<p><b>Go to those built&nbsp;image file directory</b></p>
 +
 
 +
<p>For daily build</p>
 +
 
 +
<pre>
 +
$ cd ~/image/
 
</pre>
 
</pre>
  
'''Enter flash command'''
+
<p>For local build</p>
  
For ROM-5720
+
<pre>
<pre>$ sudo ./fsl-sdcard-partition.sh -f imx8mq /dev/sdX (X&nbsp;: SD card device drive)
+
$ cd ~/out/target/product/PRODUCT_NAME/
 
</pre>
 
</pre>
  
For ROM-5721
+
<p><b>Enter flash command</b></p>
<pre>$ sudo ./fsl-sdcard-partition.sh -f imx8mm /dev/sdX (X&nbsp;: SD card device drive)
+
 
 +
<p>For ROM-5720</p>
 +
 
 +
<pre>
 +
$ sudo ./fsl-sdcard-partition.sh -f imx8mq /dev/sdX (X&amp;nbsp;: SD card device drive)
 
</pre>
 
</pre>
  
For ROM-7720
+
<p>For ROM-5721</p>
<pre>$ sudo ./fsl-sdcard-partition.sh -f imx8qm /dev/sdX (X&nbsp;: SD card device drive)
+
 
$ sudo ./fsl-sdcard-partition.sh -f imx8qm -c 7 /dev/sdX (X&nbsp;: SD card device drive) - 7G SD card
+
<pre>
 +
$ sudo ./fsl-sdcard-partition.sh -f imx8mm /dev/sdX (X&amp;nbsp;: SD card device drive)
 
</pre>
 
</pre>
  
EMMC boot[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=15 edit]]
+
<p>For ROM-7720</p>
  
'''For ROM-5720'''
+
<pre>
 +
$ sudo ./fsl-sdcard-partition.sh -f imx8qm /dev/sdX (X&amp;nbsp;: SD card device drive)
 +
$ sudo ./fsl-sdcard-partition.sh -f imx8qm -c 7 /dev/sdX (X&amp;nbsp;: SD card device drive) - 7G SD card
 +
</pre>
  
*Go to ~/out/target/product/rom5720_a1.
+
<p>EMMC boot[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=15" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=15" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&amp;action=edit&amp;section=15">edit</a>]</p>
*Copy uuu in this directory.
+
 
*Adjust boot jumper to serial download mode (4 on only).
+
<p><b>For ROM-5720</b></p>
*Connect the PC and DUT with micro-USB cable.
+
 
*Power on the DUT.
+
<ul>
*Make sure the following status by using command lsusb.
+
<li>Go to ~/out/target/product/rom5720_a1.</li>
<pre>“Bus 001 Device 104: ID 1fc9:012b NXP Semiconductors”
+
<li>Copy uuu in this directory.</li>
 +
<li>Adjust boot jumper to serial download mode (4 on only).</li>
 +
<li>Connect the PC and DUT with micro-USB cable.</li>
 +
<li>Power on the DUT.</li>
 +
<li>Make sure the following status by using command lsusb.</li>
 +
</ul>
 +
 
 +
<pre>
 +
&ldquo;Bus 001 Device 104: ID 1fc9:012b NXP Semiconductors&rdquo;
 
</pre>
 
</pre>
  
*Run burning command
+
<ul>
<pre>sudo ./uuu_imx_android_flash.sh -f imx8mq -a -e
+
<li>Run burning command</li>
 +
</ul>
 +
 
 +
<pre>
 +
sudo ./uuu_imx_android_flash.sh -f imx8mq -a -e
 
</pre>
 
</pre>
  
'''For ROM-5721'''
+
<p><b>For ROM-5721</b></p>
  
*Go to ~/out/target/product/rom5721_a1.
+
<ul>
*Copy uuu in this directory.
+
<li>Go to ~/out/target/product/rom5721_a1.</li>
*Adjust boot jumper to serial download mode (4 on only).
+
<li>Copy uuu in this directory.</li>
*Connect the PC and DUT with micro-USB cable.
+
<li>Adjust boot jumper to serial download mode (4 on only).</li>
*Power on the DUT.
+
<li>Connect the PC and DUT with micro-USB cable.</li>
*Make sure the following status by using command lsusb.
+
<li>Power on the DUT.</li>
<pre>“Bus 001 Device 066: ID 1fc9:0134 NXP Semiconductors”
+
<li>Make sure the following status by using command lsusb.</li>
 +
</ul>
 +
 
 +
<pre>
 +
&ldquo;Bus 001 Device 066: ID 1fc9:0134 NXP Semiconductors&rdquo;
 
</pre>
 
</pre>
  
*Run burning command
+
<ul>
<pre>sudo ./uuu_imx_android_flash.sh -f imx8mm -a -e -c 7
+
<li>Run burning command</li>
 +
</ul>
 +
 
 +
<pre>
 +
sudo ./uuu_imx_android_flash.sh -f imx8mm -a -e -c 7
 
</pre>
 
</pre>
  
'''For ROM-7720'''
+
<p><b>For ROM-7720</b></p>
 +
 
 +
<ul>
 +
<li>Go to ~/out/target/product/rom7720_a1</li>
 +
<li>Copy uuu in this directory.</li>
 +
<li>Adjust boot jumper to serial download mode (3 on only).</li>
 +
<li>Connect the PC and DUT with micro-USB cable.</li>
 +
<li>Power on the DUT.</li>
 +
<li>Make sure the following status by using command lsusb.</li>
 +
</ul>
  
*Go to ~/out/target/product/rom7720_a1
+
<pre>
*Copy uuu in this directory.
+
&ldquo;Bus 001 Device 104: ID 1fc9:012b NXP Semiconductors&rdquo;
*Adjust boot jumper to serial download mode (3 on only).
 
*Connect the PC and DUT with micro-USB cable.
 
*Power on the DUT.
 
*Make sure the following status by using command lsusb.
 
<pre>“Bus 001 Device 104: ID 1fc9:012b NXP Semiconductors”
 
 
</pre>
 
</pre>
  
*Run burning command
+
<ul>
<pre>sudo ./uuu_imx_android_flash.sh -f imx8qm -a -c 7
+
<li>Run burning command</li>
 +
</ul>
 +
 
 +
<pre>
 +
sudo ./uuu_imx_android_flash.sh -f imx8qm -a -c 7
 
</pre>
 
</pre>
  
*Power off the DUT.
+
<ul>
*Adjust boot jumper to EMMC boot mode (4 on only).
+
<li>Power off the DUT.</li>
*Power on the DUT.
+
<li>Adjust boot jumper to EMMC boot mode (4 on only).</li>
 +
<li>Power on the DUT.</li>
 +
</ul>

Revision as of 10:53, 22 July 2022

Contents

 

Contents

 [<a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#">hide</a>] 

Android BSP Version[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=1" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=1" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=1">edit</a>]

Android 9.0.0_r35

Introduction[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=2" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=2" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=2">edit</a>]

This document describes how to work with the RISC and ELAA Android 9.0.0 Board Support Package (BSP) release. The BSP includes bootloaders; the Android Linux kernel and root file system; and tools and documentation to ease the development, deployment, and execution of Android-based systems.

Setup Ubuntu Host Computer[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=3" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=3" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=3">edit</a>]

Required equipment and software[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=4" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=4" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=4">edit</a>]

  • Ubuntu 16.04 LTS 64bit for Android build host OS
  • 130G bytes free disk spaces for build image

Install Ubuntu[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=5" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=5" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=5">edit</a>]

  • IMPORTANT! You must be able to log in as root or use sudo to have root permissions during the installation.

Go to <a alt="http://releases.ubuntu.com/16.04/" href="http://releases.ubuntu.com/16.04/" title="http://releases.ubuntu.com/16.04/">[1</a>] and download 64-bit PC (AMD64) desktop image: <a alt="http://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-amd64.iso" href="http://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-amd64.iso" title="http://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-amd64.iso">[2</a>] for the installation.

Run Docker example[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=6" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=6" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=6">edit</a>]

Step1 Run docker container (example)

&nbsp;$&nbsp;docker run -it --name android_p9 -v /home/bsp/myandroid:/home/adv/BSP:rw advrisc/u16.04-imx6abv6 /bin/bash

Step2 In container, change the user. (example)

 adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP

Install docker and Use docker[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=7" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=7" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=7">edit</a>]

Please use docker environment to compiler Android 9.0.0

  • Android 9.0.0 Docker
  • Image Repository : advrisc/u16.04-imx6abv6
  • Image Tag : lastest

Reference: <a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker">[3</a>]

To pull Docker image from Docker Hub[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=8" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=8" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=8">edit</a>]

  • docker pull advrisc/u16.04-imx6abv6
  • docker run --name imx6ABV6 -it advrisc/u16.04-imx6abv6 /bin/bash

 

Getting Android Source Code[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=9" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=9" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=9">edit</a>]

Related version information:[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=10" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=10" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=10">edit</a>]

  • Android 9.0.0_r35
  • kernel Yocto-2.5
  • U-Boot Yocto-2.5

Step1 : To pull down the Android source tree to your working directory from the repositories as specified in the default manifest

$ git config --global user.name "Your Name" 
$ git config --global user.email you@example.com
$ mkdir myandroid

$ mkdir bin

$ cd myandroid/ $ curl <a alt="https://storage.googleapis.com/git-repo-downloads/repo" href="https://storage.googleapis.com/git-repo-downloads/repo" title="https://storage.googleapis.com/git-repo-downloads/repo">https://storage.googleapis.com/git-repo-downloads/repo</a> > ../bin/repo

$ chmod a+x ../bin/repo $ ../bin/repo init -u <a alt="https://github.com/ADVANTECH-Corp/android-manifest.git" href="https://github.com/ADVANTECH-Corp/android-manifest.git" title="https://github.com/ADVANTECH-Corp/android-manifest.git">https://github.com/ADVANTECH-Corp/android-manifest.git</a> -b p9.0.0_2.2.0-ga -m release_version.xml

$ ../bin/repo sync

=== The release_version.xml  as follows:
ROM5721 for imx8ABV9001.xml
ROM5720 for imx8ABV9001.xml
ROM7720 for imx8ABV9001.xml

Step2: Patch to Android P9.0.0.0

$ cd ~/myandroid/vendor/nxp-opensource/uboot-imx/
$ patch -p1 < ../../../patches_android_9.0.0_r35/9001-Uboot_Yocto_4.14.98_2.0.0-to-android-9.0.0_r35.patch
$ cd ~/myandroid/vendor/nxp-opensource/kernel_imx/
$ patch -p1 < ../../../patches_android_9.0.0_r35/9001-Linux_Yocto_4.14.98_2.0.0-to-android-9.0.0_r35.patch
$ cd myandroid

Building Android 9.0.0 image for SD card[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=11" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=11" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=11">edit</a>]

If your product is ROM-5720, the product name is rom5720_a1

$PRODUCT = rom5720_a1

If your product is ROM-7720, the product name is rom7720_a1

$PRODUCT = rom7720_a1

If your product is ROM-5721A1, the product name is rom5721_a1

$PRODUCT = rom5721_a1

 

Build Instructions[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=12" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=12" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=12">edit</a>]

Set the $JAVA_HOME environment variable

$ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/

Set up the environment for building. This only configures the current terminal.

$ source build/envsetup.sh

Execute the Android lunch command. In this example, the setup is for the production image of Advantech RISC platfrom device with user type. If you devices is ROM5720, you will be send command rom5720_a1-userdebug

$ lunch $PRODUCT-user

To build boot loader

Perform the following command in terminal console

$ make bootloader -j8 
 

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 bootimage -j8

To build dtbo image (kernel device tree)

Perform the following command in terminal console

$ make dtboimage -j8

To build system image

Perform the following command in terminal console

$ make -j8

Building a full update package

Perform the following command in terminal console

$ make otapackage -j8

Implementing OTA update
To update system from board's storage, perform the following steps:
1. Unzip ota_update.zip or incremental_ota_update.zip (Generated on Building a full update package) to get payload.bin and payload_properties.txt .
2. Push payload.bin to board's /sdcard dir: adb push payload.bin /sdcard/ .
3. Cat the content of payload_properties.txt like this:
• FILE_HASH=0fSBbXonyTjaAzMpwTBgM9AVtlBeyOigpCCgkoOfHKY=
• FILE_SIZE=379074366• METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ=
• METADATA_SIZE=46866
4. Input the following command on the board's console to update:

$ update_engine_client --payload=file:///sdcard/payload.bin --update --
headers="FILE_HASH=0fSBbXonyTjaAzMpwTBgM9AVtlBeyOigpCCgkoOfHKY=
FILE_SIZE=379074366
METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ=
METADATA_SIZE=46866"

5. The system will update in the background. After it finishes, it will show "Update successfully applied, waiting to reboot" in the logcat.

Burning image[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=13" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=13" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=13">edit</a>]

SD card boot[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=14" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=14" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=14">edit</a>]

Go to those built image file directory

For daily build

$ cd ~/image/

For local build

$ cd ~/out/target/product/PRODUCT_NAME/

Enter flash command

For ROM-5720

$ sudo ./fsl-sdcard-partition.sh -f imx8mq /dev/sdX (X&nbsp;: SD card device drive)

For ROM-5721

$ sudo ./fsl-sdcard-partition.sh -f imx8mm /dev/sdX (X&nbsp;: SD card device drive)

For ROM-7720

$ sudo ./fsl-sdcard-partition.sh -f imx8qm /dev/sdX (X&nbsp;: SD card device drive)
$ sudo ./fsl-sdcard-partition.sh -f imx8qm -c 7 /dev/sdX (X&nbsp;: SD card device drive) - 7G SD card

EMMC boot[<a alt="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=15" href="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=15" title="http://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=15">edit</a>]

For ROM-5720

  • Go to ~/out/target/product/rom5720_a1.
  • Copy uuu in this directory.
  • Adjust boot jumper to serial download mode (4 on only).
  • Connect the PC and DUT with micro-USB cable.
  • Power on the DUT.
  • Make sure the following status by using command lsusb.
“Bus 001 Device 104: ID 1fc9:012b NXP Semiconductors”
  • Run burning command
sudo ./uuu_imx_android_flash.sh -f imx8mq -a -e

For ROM-5721

  • Go to ~/out/target/product/rom5721_a1.
  • Copy uuu in this directory.
  • Adjust boot jumper to serial download mode (4 on only).
  • Connect the PC and DUT with micro-USB cable.
  • Power on the DUT.
  • Make sure the following status by using command lsusb.
“Bus 001 Device 066: ID 1fc9:0134 NXP Semiconductors”
  • Run burning command
sudo ./uuu_imx_android_flash.sh -f imx8mm -a -e -c 7

For ROM-7720

  • Go to ~/out/target/product/rom7720_a1
  • Copy uuu in this directory.
  • Adjust boot jumper to serial download mode (3 on only).
  • Connect the PC and DUT with micro-USB cable.
  • Power on the DUT.
  • Make sure the following status by using command lsusb.
“Bus 001 Device 104: ID 1fc9:012b NXP Semiconductors”
  • Run burning command
sudo ./uuu_imx_android_flash.sh -f imx8qm -a -c 7
  • Power off the DUT.
  • Adjust boot jumper to EMMC boot mode (4 on only).
  • Power on the DUT.