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

From ESS-WIKI
Jump to: navigation, search
(Build Instructionshttp://ess-wiki.advantech.com.tw/wiki/index.php?title=IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0&action=edit&section=12 edit)
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= =
+
 
 +
=   =
  
 
== Contents ==
 
== Contents ==
Line 5: Line 6:
 
 [[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0# hide]] 
 
 [[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0# hide]] 
  
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Android_BSP_Version 1 Android BSP Version]
+
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Android_BSP_Version 1 Android BSP Version]  
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Introduction 2 Introduction]
+
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Introduction 2 Introduction]  
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Setup_Ubuntu_Host_Computer 3 Setup Ubuntu Host Computer]
+
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Setup_Ubuntu_Host_Computer 3 Setup Ubuntu Host Computer]  
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Required_equipment_and_software 3.1 Required equipment and software]
+
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Required_equipment_and_software 3.1 Required equipment and software]  
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_Ubuntu 3.2 Install Ubuntu]
+
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_Ubuntu 3.2 Install Ubuntu]  
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Run_Docker_example 4 Run Docker example]
+
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Run_Docker_example 4 Run Docker example]  
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_docker_and_Use_docker 4.1 Install docker and Use docker]
+
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Install_docker_and_Use_docker 4.1 Install docker and Use docker]  
**[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 To pull Docker image from Docker Hub]
+
**[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 To pull Docker image from Docker Hub]  
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Getting_Android_Source_Code 5 Getting Android Source Code]
+
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Getting_Android_Source_Code 5 Getting Android Source Code]  
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Related_version_information: 5.1 Related version information:]
+
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Related_version_information: 5.1 Related version information:]  
*[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 Building Android 9.0.0 image for SD card]
+
*[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 Building Android 9.0.0 image for SD card]  
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Build_Instructions 6.1 Build Instructions]
+
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Build_Instructions 6.1 Build Instructions]  
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Burning_image 7 Burning image]
+
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Burning_image 7 Burning image]  
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#SD_card_boot 7.1 SD card boot]
+
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#SD_card_boot 7.1 SD card boot]  
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#EMMC_boot 7.2 EMMC boot]
+
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#EMMC_boot 7.2 EMMC boot]  
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Display_Configuration.C2.A0 8 Display Configuration ]
+
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Display_Configuration.C2.A0 8 Display Configuration ]  
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Know_Issue 8.1 Know Issue]
+
**[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Android/Android_BSP_User_Guide_9.0.0#Know_Issue 8.1 Know Issue]  
  
 
== 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]] ==
 
== 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]] ==
Line 35: Line 36:
 
=== 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]] ===
 
=== 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]] ===
  
*Ubuntu 16.04 LTS 64bit for Android build host OS
+
*Ubuntu 16.04 LTS 64bit for Android build host OS  
*130G bytes free disk spaces for build image
+
*130G bytes free disk spaces for build image  
  
 
=== 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]] ===
 
=== 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]] ===
  
*IMPORTANT! You must be able to log in as root or use sudo to have root permissions during the installation.
+
*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/16.04/ [1]] and download 64-bit PC (AMD64) desktop image: [http://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-amd64.iso [2]] for the installation.
 
Go to [http://releases.ubuntu.com/16.04/ [1]] and download 64-bit PC (AMD64) desktop image: [http://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-amd64.iso [2]] for the installation.
Line 56: Line 57:
 
Please use docker environment to compiler Android 9.0.0
 
Please use docker environment to compiler Android 9.0.0
  
*Android 9.0.0 Docker
+
*Android 9.0.0 Docker  
*Image Repository : advrisc/u16.04-imx6abv6
+
*Image Repository : advrisc/u16.04-imx6abv6  
*Image Tag : lastest
+
*Image Tag : lastest  
  
 
Reference: [http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker [3]]
 
Reference: [http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker [3]]
Line 64: Line 65:
 
=== 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]] ===
 
=== 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]] ===
  
*docker pull advrisc/u16.04-imx6abv6
+
*docker pull advrisc/u16.04-imx6abv6  
*docker run --name imx6ABV6 -it advrisc/u16.04-imx6abv6 /bin/bash
+
*docker run --name imx6ABV6 -it advrisc/u16.04-imx6abv6 /bin/bash  
 +
 
 +
 
  
 
== 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]] ==
 
== 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]] ==
Line 71: Line 74:
 
=== 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]] ===
 
=== 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]] ===
  
*Android 9.0.0_r35
+
*Android 9.0.0_r35  
*kernel Yocto-2.5
+
*kernel Yocto-2.5  
*U-Boot 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
 
Step1 : To pull down the Android source tree to your working directory from the repositories as specified in the default manifest
Line 85: Line 88:
 
$ cd myandroid/ $ curl [https://storage.googleapis.com/git-repo-downloads/repo https://storage.googleapis.com/git-repo-downloads/repo] > ../bin/repo
 
$ cd myandroid/ $ curl [https://storage.googleapis.com/git-repo-downloads/repo 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 https://github.com/ADVANTECH-Corp/android-manifest.git] -b p9.0.0_2.2.0-ga
+
$ 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
  
 
$ ../bin/repo sync
 
$ ../bin/repo sync
 
+
<pre class="de1">=== The release_version.xml  as follows:
Step2: Patch to Android P9.0.0.0
+
ROM5721 for imx8ABV9001.xml
<pre>$ cd ~/myandroid/vendor/nxp-opensource/uboot-imx/
+
ROM5720 for imx8ABV90003.xml
</pre>
+
ROM7720 for imx8ABV9001.xml</pre>
 
 
$ 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&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]] ==
 
== 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]] ==
Line 107: Line 102:
 
$PRODUCT = rom5720_a1
 
$PRODUCT = rom5720_a1
  
If your product is RSB-4411A1, the product name is rom7720_a1
+
If your product is ROM-7720, the product name is rom7720_a1
  
 
$PRODUCT = rom7720_a1
 
$PRODUCT = rom7720_a1
Line 115: Line 110:
 
$PRODUCT = rom5721_a1
 
$PRODUCT = rom5721_a1
  
 +
&nbsp;
  
  
Line 120: Line 116:
  
 
Set the $JAVA_HOME environment variable
 
Set the $JAVA_HOME environment variable
<pre>$ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
+
<pre>$ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
 
</pre>
 
</pre>
  
Line 127: Line 123:
 
</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 RSB4411, you will be send command " lunch rsb_4411_a1-user
+
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
 
<pre>$ lunch $PRODUCT-user
 
<pre>$ lunch $PRODUCT-user
 
</pre>
 
</pre>
Line 136: Line 132:
 
<pre>$ make bootloader -j8  
 
<pre>$ make bootloader -j8  
 
</pre>
 
</pre>
 
:
 
  
 
The two files, u-boot_crc.bin & u-boot_crc.bin.crc, will be located in directory, ./out/target/product/product_name
 
The two files, u-boot_crc.bin & u-boot_crc.bin.crc, will be located in directory, ./out/target/product/product_name
Line 144: Line 138:
  
 
Perform the following command in terminal console
 
Perform the following command in terminal console
<pre><big><small>$ make bootimage -j8</small></big>
+
<pre>$ make bootimage -j8
 
</pre>
 
</pre>
  
Line 156: Line 150:
  
 
Perform the following command in terminal console
 
Perform the following command in terminal console
<pre>$ make -j8</small></big>
+
<pre>$ make -j8
 +
</pre>
 +
 
 +
'''Building a full update package'''
 +
 
 +
Perform the following command in terminal console
 +
<pre>$ make otapackage -j8
 
</pre>
 
</pre>
 +
 +
'''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:
 +
<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>
 +
 +
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[[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]] ==
 
== 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]] ==
Line 192: Line 220:
 
'''For ROM-5720'''
 
'''For ROM-5720'''
  
*Go to ~/out/target/product/rom5720_a1.
+
*Go to ~/out/target/product/rom5720_a1.  
*Copy uuu in this directory.
+
*Copy uuu in this directory.  
*Adjust boot jumper to serial download mode (4 on only).
+
*Adjust boot jumper to serial download mode (4 on only).  
*Connect the PC and DUT with micro-USB cable.
+
*Connect the PC and DUT with micro-USB cable.  
*Power on the DUT.
+
*Power on the DUT.  
*Make sure the following status by using command lsusb.
+
*Make sure the following status by using command lsusb.  
 
<pre>“Bus 001 Device 104: ID 1fc9:012b NXP Semiconductors”
 
<pre>“Bus 001 Device 104: ID 1fc9:012b NXP Semiconductors”
 
</pre>
 
</pre>
  
*Run burning command
+
*Run burning command  
 
<pre>sudo ./uuu_imx_android_flash.sh -f imx8mq -a -e
 
<pre>sudo ./uuu_imx_android_flash.sh -f imx8mq -a -e
 
</pre>
 
</pre>
Line 207: Line 235:
 
'''For ROM-5721'''
 
'''For ROM-5721'''
  
*Go to ~/out/target/product/rom5721_a1.
+
*Go to ~/out/target/product/rom5721_a1.  
*Copy uuu in this directory.
+
*Copy uuu in this directory.  
*Adjust boot jumper to serial download mode (4 on only).
+
*Adjust boot jumper to serial download mode (4 on only).  
*Connect the PC and DUT with micro-USB cable.
+
*Connect the PC and DUT with micro-USB cable.  
*Power on the DUT.
+
*Power on the DUT.  
*Make sure the following status by using command lsusb.
+
*Make sure the following status by using command lsusb.  
 
<pre>“Bus 001 Device 066: ID 1fc9:0134 NXP Semiconductors”
 
<pre>“Bus 001 Device 066: ID 1fc9:0134 NXP Semiconductors”
 
</pre>
 
</pre>
  
*Run burning command
+
*Run burning command  
 
<pre>sudo ./uuu_imx_android_flash.sh -f imx8mm -a -e -c 7
 
<pre>sudo ./uuu_imx_android_flash.sh -f imx8mm -a -e -c 7
 
</pre>
 
</pre>
Line 222: Line 250:
 
'''For ROM-7720'''
 
'''For ROM-7720'''
  
*Go to ~/out/target/product/rom7720_a1
+
*Go to ~/out/target/product/rom7720_a1  
*Copy uuu in this directory.
+
*Copy uuu in this directory.  
*Adjust boot jumper to serial download mode (3 on only).
+
*Adjust boot jumper to serial download mode (3 on only).  
*Connect the PC and DUT with micro-USB cable.
+
*Connect the PC and DUT with micro-USB cable.  
*Power on the DUT.
+
*Power on the DUT.  
*Make sure the following status by using command lsusb.
+
*Make sure the following status by using command lsusb.  
 
<pre>“Bus 001 Device 104: ID 1fc9:012b NXP Semiconductors”
 
<pre>“Bus 001 Device 104: ID 1fc9:012b NXP Semiconductors”
 
</pre>
 
</pre>
  
*Run burning command
+
*Run burning command  
 
<pre>sudo ./uuu_imx_android_flash.sh -f imx8qm -a -c 7
 
<pre>sudo ./uuu_imx_android_flash.sh -f imx8qm -a -c 7
 
</pre>
 
</pre>
  
*Power off the DUT.
+
*Power off the DUT.  
*Adjust boot jumper to EMMC boot mode (4 on only).
+
*Adjust boot jumper to EMMC boot mode (4 on only).  
 
*Power on the DUT.
 
*Power on the DUT.

Latest revision as of 04:51, 25 April 2024

 

Contents

 [hide

Android BSP Version[edit]

Android 9.0.0_r35

Introduction[edit]

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[edit]

Required equipment and software[edit]

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

Install Ubuntu[edit]

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

Go to [1] and download 64-bit PC (AMD64) desktop image: [2] for the installation.

Run Docker example[edit]

Step1 Run docker container (example)

 $ 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[edit]

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: [3]

To pull Docker image from Docker Hub[edit]

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

 

Getting Android Source Code[edit]

Related version information:[edit]

  • 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 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 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 imx8ABV90003.xml
ROM7720 for imx8ABV9001.xml

Building Android 9.0.0 image for SD card[edit]

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[edit]

Set the $JAVA_HOME environment variable

$ export JAVA_HOME=/usr/lib/jvm/java-8-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[edit]

SD card boot[edit]

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 : SD card device drive)

For ROM-5721

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

For ROM-7720

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

EMMC boot[edit]

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.