Difference between revisions of "IoTGateway/BSP/Android/Android BSP User Guide 6.0.1 for rk"

From ESS-WIKI
Jump to: navigation, search
(change lunch product)
 
(9 intermediate revisions by 3 users not shown)
Line 16: Line 16:
  
 
To get the images we provided, you can use ''docker pull <IMAGE REPOSITORY>'' to get the images in the ''[[#Image_List|image list]]''.
 
To get the images we provided, you can use ''docker pull <IMAGE REPOSITORY>'' to get the images in the ''[[#Image_List|image list]]''.
 
+
<pre>$ docker pull advrisc/u14.04-imx6abv4
$ docker pull advrisc/u14.04-imx6abv4
+
$ docker run --name rkABV2500 -it advrisc/u14.04-imx6abv4 /bin/bash</pre>
 
 
 
 
  
 
== <span style="color:#0070c0">Getting Android Source Code</span> ==
 
== <span style="color:#0070c0">Getting Android Source Code</span> ==
Line 35: Line 33:
 
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ../bin/repo
 
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ../bin/repo
 
$ chmod a+x ../bin/repo
 
$ chmod a+x ../bin/repo
$ ../bin/repo init -u https://github.com/ADVANTECH-Rockchip/android-rk-manifest.git -b android-6.0.1 [ release_version.xml ]
+
$ ../bin/repo init -u https://github.com/ADVANTECH-Rockchip/android-rk-manifest.git -b android-6.0.1 -m [ release_version.xml ]
 
$ ../bin/repo sync
 
$ ../bin/repo sync
  
 
=== The release_version.xml  is an option, the default value is default.xml        please refer :  https://github.com/ADVANTECH-Rockchip/android-rk-manifest/tree/android-6.0.1 ====
 
=== The release_version.xml  is an option, the default value is default.xml        please refer :  https://github.com/ADVANTECH-Rockchip/android-rk-manifest/tree/android-6.0.1 ====
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
== <span style="color:#0070c0">Building Android 6.0.1 image</span> ==
 
== <span style="color:#0070c0">Building Android 6.0.1 image</span> ==
 
 
  
 
=== <span style="color:#0070c0">Start Docker Container</span> ===
 
=== <span style="color:#0070c0">Start Docker Container</span> ===
  
 
  $ docker run -it --name android6.0-build -v /home/adv/myandroid:/home/adv/android6.0:rw advrisc/u14.04-imx6abv4 /bin/bash
 
  $ docker run -it --name android6.0-build -v /home/adv/myandroid:/home/adv/android6.0:rw advrisc/u14.04-imx6abv4 /bin/bash
 
<span style="font-size:small"><span style="font-family: times new roman,times,serif">If your product is RSB-4680, the product name is rsb4680</span></span>
 
 
<span style="font-size:small"><span style="font-family: times new roman,times,serif"><span style="color: rgb(255, 0, 0)">$PRODUCT = rsb4680</span></span></span>
 
  
 
=== <span style="color:#0070c0"><span style="font-family: times new roman,times,serif">Build Instructions</span></span> ===
 
=== <span style="color:#0070c0"><span style="font-family: times new roman,times,serif">Build Instructions</span></span> ===
Line 62: Line 55:
 
  <big><small>$ source build/envsetup.sh</small></big>
 
  <big><small>$ source build/envsetup.sh</small></big>
  
<span style="font-size: small"><span style="font-family: times new roman,times,serif">Execute the Android lunch command. In this example, the setup is for the production image of Advantech RISC platfrom device with user type. &nbsp;If you devices is RSB4680, &nbsp;you will be send command "&nbsp;lunch rsb4680-userdebug</span></span>
+
<span style="font-size: small"><span style="font-family: times new roman,times,serif">Execute the Android lunch command. In this example, the setup is for the production image of Advantech RISC platfrom device with userdebug type. &nbsp;If you devices is RSB4680, &nbsp;you will be send command "&nbsp;lunch rsb4680-userdebug</span></span>
  
 
  <big><small>$ lunch $PRODUCT-userdebug</small></big>
 
  <big><small>$ lunch $PRODUCT-userdebug</small></big>
Line 71: Line 64:
  
 
  <big><small>$ cd u-boot/</small></big>
 
  <big><small>$ cd u-boot/</small></big>
  $ make rk3288_rsb4680a2_2G_defconfig
+
  $ make rk3288_rsb4680a3_2G_defconfig
 
  $ make -j4
 
  $ make -j4
  
Line 84: Line 77:
 
  <big><small>$ cd kernel/</small></big>  
 
  <big><small>$ cd kernel/</small></big>  
 
  $ make rk3288_adv_defconfig
 
  $ make rk3288_adv_defconfig
  $ make -j4 rk3288-rsb4680-a2.img
+
  $ make -j4 rk3288-rsb4680-a3.img
  
 
'''<span style="font-family: times new roman,times,serif">To build system image</span>'''
 
'''<span style="font-family: times new roman,times,serif">To build system image</span>'''
Line 91: Line 84:
  
 
  <big><small>$ make -j4</small></big>
 
  <big><small>$ make -j4</small></big>
 +
$./mkimage.sh
 +
 +
all android image will be&nbsp;generated in&nbsp;rockdev/Image-rsb4680/ folder.
  
 
<span style="color:#FF0000">''<u><span style="font-size: medium"><span style="font-family: times new roman,times,serif">'''Problems and Solutions'''</span></span></u>''</span>
 
<span style="color:#FF0000">''<u><span style="font-size: medium"><span style="font-family: times new roman,times,serif">'''Problems and Solutions'''</span></span></u>''</span>
  
 
Compiled kernel
 
Compiled kernel
 +
 +
/bin/sh: 1: /home/zengwei/android_rk3288_androi6.0/kernel/scripts/gcc-wrapper.py: Permission denied
 +
make[1]: *** [kernel/bounds.s] Error 126
 +
make: *** [prepare0] Error 2
 +
make: *** Waiting for unfinished jobs....
 +
&nbsp; HOSTCC&nbsp; scripts/dtc/dtc-parser.tab.o
 +
&nbsp; HOSTLD&nbsp; scripts/dtc/dtc
 +
make: *** [scripts] Error 2
 +
 +
Solution
  
 
  <big><small>$ </small></big>chmod 555 kernel/scripts/gcc-wrapper.py
 
  <big><small>$ </small></big>chmod 555 kernel/scripts/gcc-wrapper.py
  
Compiled android
+
Compiled android,Please copy this file before compiling
  
 
  <big><small>$ </small></big>cp .repo/manifests/default.xml manifest.xml
 
  <big><small>$ </small></big>cp .repo/manifests/default.xml manifest.xml
Line 104: Line 110:
 
== <span style="color:#0070c0">Flash SD Card /EMMC</span> ==
 
== <span style="color:#0070c0">Flash SD Card /EMMC</span> ==
  
reference:{android_source}/RKDocs/ and {android_source}/RKTools/
+
reference:[https://github.com/ADVANTECH-Rockchip/rk3288_tools https://github.com/ADVANTECH-Rockchip/rk3288_tools]
  
 
'''''SD_Firmware_Tool.v1.46&nbsp;;AndroidTool_Release_v2.33&nbsp;; DriverAssitant_v4.2'''''
 
'''''SD_Firmware_Tool.v1.46&nbsp;;AndroidTool_Release_v2.33&nbsp;; DriverAssitant_v4.2'''''

Latest revision as of 04:33, 17 June 2019

Android BSP Version

Android 6.0.1

Introduction

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

Setup Docker

Install Docker

  • Before you use Docker to develop, you have to install Docker on your platform. Please refer to Docker Installation Guide. You are able to install Docker on Linux, Cloud, Windows, and OS X. In general, you may choose to install on Ubuntu.[1]

Get base image

To get the images we provided, you can use docker pull <IMAGE REPOSITORY> to get the images in the image list.

$ docker pull advrisc/u14.04-imx6abv4
$ docker run --name rkABV2500 -it advrisc/u14.04-imx6abv4 /bin/bash

Getting Android Source Code

Related version information:

  • Android 6.0.1
  • kernel 3.10.0
  • U-Boot 2014-10

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

$ 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-Rockchip/android-rk-manifest.git -b android-6.0.1 -m [ release_version.xml ]
$ ../bin/repo sync

=== The release_version.xml  is an option, the default value is default.xml        please refer :  https://github.com/ADVANTECH-Rockchip/android-rk-manifest/tree/android-6.0.1 ====

Building Android 6.0.1 image

Start Docker Container

$ docker run -it --name android6.0-build -v /home/adv/myandroid:/home/adv/android6.0:rw advrisc/u14.04-imx6abv4 /bin/bash

Build Instructions

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 userdebug type.  If you devices is RSB4680,  you will be send command " lunch rsb4680-userdebug

$ lunch $PRODUCT-userdebug

To build boot loader

Perform the following command in terminal console

$ cd u-boot/
$ make rk3288_rsb4680a3_2G_defconfig
$ make -j4

The one file, RK3288UbootLoader_V2.30.10.bin, will be located in directory

To build kernel image

Perform the following command in terminal console

$ cd kernel/ 
$ make rk3288_adv_defconfig
$ make -j4 rk3288-rsb4680-a3.img

To build system image

Perform the following command in terminal console

$ make -j4
$./mkimage.sh

all android image will be generated in rockdev/Image-rsb4680/ folder.

Problems and Solutions

Compiled kernel

/bin/sh: 1: /home/zengwei/android_rk3288_androi6.0/kernel/scripts/gcc-wrapper.py: Permission denied
make[1]: *** [kernel/bounds.s] Error 126
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
make: *** [scripts] Error 2

Solution

$ chmod 555 kernel/scripts/gcc-wrapper.py

Compiled android,Please copy this file before compiling

$ cp .repo/manifests/default.xml manifest.xml

Flash SD Card /EMMC

reference:https://github.com/ADVANTECH-Rockchip/rk3288_tools

SD_Firmware_Tool.v1.46 ;AndroidTool_Release_v2.33 ; DriverAssitant_v4.2

Bootimg from MMC/SD on the Advantech RISC board

reference:{android_source}/RKDocs/ and {android_source}/RKTools/
  1. Docker Installation on Ubuntu