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

From ESS-WIKI
Jump to: navigation, search
(Undo revision 24799 by Wei.zeng (talk))
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 95: Line 97:
  
 
Step2: Patch to Android P9.0.0.0
 
Step2: Patch to Android P9.0.0.0
<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 < ../../../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/
Line 117: Line 118:
 
$PRODUCT = rom5721_a1
 
$PRODUCT = rom5721_a1
  
 
+
&nbsp;
  
 
=== 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]] ===
 
=== 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]] ===
Line 139: Line 140:
 
</pre>
 
</pre>
  
:
+
:&nbsp;
  
 
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 194: Line 195:
 
'''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 209: Line 210:
 
'''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 224: Line 225:
 
'''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.

Revision as of 10:59, 22 July 2022

 

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

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.