Difference between revisions of "IoTGateway/BSP/Android/Android BSP User Guide 8.1.0 for rk"
(3 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
This document describes how to work with the RISC and ELAA Android 8.1.0 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. | This document describes how to work with the RISC and ELAA Android 8.1.0 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. | ||
+ | == <font color="#0070c0">Build Environment on Host</font> == | ||
+ | |||
+ | Currently, we adopt [https://www.docker.com/ Docker] as build environment. | ||
+ | |||
+ | You can get the latest version of [https://hub.docker.com/r/advrisc/u16.04-imx6abv5 advrisc/u16.04-imx6abv5] Docker image for developing Rockchip RK3288 android8.1 projects. | ||
+ | |||
+ | Docker command: | ||
+ | <syntaxhighlight lang="bash">docker pull advrisc/u16.04-imx6abv5:20170523 </syntaxhighlight> | ||
+ | == <span style="color:#0070c0">Run Docker example</span> == | ||
+ | |||
+ | Step1 Run docker container (example) | ||
+ | <syntaxhighlight lang="bash"> $ docker run -it --name android_n7 -v /home/bsp/myandroid:/home/adv/BSP:rw advrisc/u16.04-imx6abv5:20170523 /bin/bash | ||
+ | </syntaxhighlight>Step2 In container, change the user. (example) | ||
+ | |||
+ | <syntaxhighlight lang="bash"> adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP | ||
+ | </syntaxhighlight> | ||
Line 23: | Line 39: | ||
$ 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-8.1.0-r46 [ release_version.xml ] | + | $ ../bin/repo init -u https://github.com/ADVANTECH-Rockchip/android-rk-manifest.git -b android-8.1.0-r46 -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-8.1.0-r46 ==== | === 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-8.1.0-r46 ==== | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
== <span style="color:#0070c0">Building Android 8.1.0 image</span> == | == <span style="color:#0070c0">Building Android 8.1.0 image</span> == | ||
Line 40: | Line 57: | ||
<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 userdebug type. | + | <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. </span></span> |
+ | |||
+ | <u><span style="font-size:medium">'''<span style="font-family: times new roman,times,serif">Build Product for rsb4680</span>'''</span></u> | ||
− | <big><small>$ lunch | + | <big><small>$ lunch </small></big><span style="font-size: small"><span style="font-family: times new roman,times,serif">rsb4680-</span></span><big><small>userdebug</small></big> |
'''<span style="font-size: small"><span style="font-family: times new roman,times,serif">To build boot loader</span></span>''' | '''<span style="font-size: small"><span style="font-family: times new roman,times,serif">To build boot loader</span></span>''' | ||
Line 68: | Line 87: | ||
all android image will be generated in rockdev/Image-rsb4680/ folder. | all android image will be generated in rockdev/Image-rsb4680/ folder. | ||
+ | |||
+ | <u><span style="font-size:medium">'''<span style="font-family: times new roman,times,serif">Build Product for usm110</span>'''</span></u> | ||
+ | |||
+ | <big><small>$ lunch </small></big><span style="font-size: small"><span style="font-family: times new roman,times,serif">usm110-</span></span><big><small>userdebug</small></big> | ||
+ | |||
+ | '''<span style="font-size: small"><span style="font-family: times new roman,times,serif">To build boot loader</span></span>''' | ||
+ | |||
+ | <span style="font-size: small"><span style="font-family: times new roman,times,serif">Perform the following command in terminal console</span></span> | ||
+ | |||
+ | <big><small>$ cd u-boot/</small></big> | ||
+ | $ make rk3288_usm110a2_2G_defconfig | ||
+ | $ ./mkv7.sh | ||
+ | |||
+ | '''<span style="font-family: times new roman,times,serif">To build kernel image</span>''' | ||
+ | |||
+ | <span style="font-family: times new roman,times,serif">Perform the following command in terminal console</span> | ||
+ | |||
+ | <big><small>$ cd kernel/</small></big> | ||
+ | $ make ARCH=arm rk3288_adv_defconfig | ||
+ | $ make ARCH=arm rk3288-usm110-a2.img -j8 | ||
+ | |||
+ | '''<span style="font-family: times new roman,times,serif">To build system image</span>''' | ||
+ | |||
+ | <span style="font-family: times new roman,times,serif">Perform the following command in terminal console</span> | ||
+ | |||
+ | <big><small>$ make -j8</small></big> | ||
+ | $./mkimage.sh | ||
+ | |||
+ | all android image will be generated in rockdev/Image-usm110/ folder. | ||
== <span style="color:#0070c0">Flash SD Card /EMMC</span> == | == <span style="color:#0070c0">Flash SD Card /EMMC</span> == | ||
Line 73: | Line 121: | ||
reference:[https://github.com/ADVANTECH-Rockchip/rk3288_tools https://github.com/ADVANTECH-Rockchip/rk3288_tools] | reference:[https://github.com/ADVANTECH-Rockchip/rk3288_tools https://github.com/ADVANTECH-Rockchip/rk3288_tools] | ||
− | + | SDDiskTool_v1.56.zip:flash OS from sd card | |
+ | |||
+ | AndroidTool_Release_v2.54.tar.xz:flash OS from OTG | ||
+ | |||
+ | FWFactoryTool_V5.51.zip:modify update.img |
Latest revision as of 07:19, 17 March 2020
Contents
Android BSP Version
Android 8.1.0
Introduction
This document describes how to work with the RISC and ELAA Android 8.1.0 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.
Build Environment on Host
Currently, we adopt Docker as build environment.
You can get the latest version of advrisc/u16.04-imx6abv5 Docker image for developing Rockchip RK3288 android8.1 projects.
Docker command:
docker pull advrisc/u16.04-imx6abv5:20170523
Run Docker example
Step1 Run docker container (example)
$ docker run -it --name android_n7 -v /home/bsp/myandroid:/home/adv/BSP:rw advrisc/u16.04-imx6abv5:20170523 /bin/bash
adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP
Getting Android Source Code
Related version information:
- Android 8.1.0
- kernel 4.4
- 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-8.1.0-r46 -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-8.1.0-r46 ====
Building Android 8.1.0 image
Build Instructions
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 userdebug type.
Build Product for rsb4680
$ lunch rsb4680-userdebug
To build boot loader
Perform the following command in terminal console
$ cd u-boot/ $ make rk3288_rsb4680a3_2G_defconfig $ ./mkv7.sh
To build kernel image
Perform the following command in terminal console
$ cd kernel/ $ make ARCH=arm rk3288_adv_defconfig $ make ARCH=arm rk3288-rsb4680-a3.img -j8
To build system image
Perform the following command in terminal console
$ make -j8 $./mkimage.sh
all android image will be generated in rockdev/Image-rsb4680/ folder.
Build Product for usm110
$ lunch usm110-userdebug
To build boot loader
Perform the following command in terminal console
$ cd u-boot/ $ make rk3288_usm110a2_2G_defconfig $ ./mkv7.sh
To build kernel image
Perform the following command in terminal console
$ cd kernel/ $ make ARCH=arm rk3288_adv_defconfig $ make ARCH=arm rk3288-usm110-a2.img -j8
To build system image
Perform the following command in terminal console
$ make -j8 $./mkimage.sh
all android image will be generated in rockdev/Image-usm110/ folder.
Flash SD Card /EMMC
reference:https://github.com/ADVANTECH-Rockchip/rk3288_tools
SDDiskTool_v1.56.zip:flash OS from sd card
AndroidTool_Release_v2.54.tar.xz:flash OS from OTG
FWFactoryTool_V5.51.zip:modify update.img