Android BSP User Guide for mt8395 series 11.0
Contents
Android BSP Version
Android 11.0
Kernel 4.19.127
Introduction
This document describes how to work with the RISC and ELAA Android 11.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
Required equipment and software
- Ubuntu 18.04 LTS 64bit for Android build host OS
- 250G bytes free disk spaces for build image
Install Ubuntu
- IMPORTANT! You must be able to log in as root or use sudo to have root permissions during the installation.
Docker install and setting
If you don't have docker in your system, then you can follow the below steps to install docker and run it first.
To install Docker Engine on your platform
- Please refer to Docker Installation Guide for details
To pull ubuntu 18.04 image from Docker Hub
$ docker pull advrisc/u18.04-mt8395abv1
Run Docker example
Step1 Run docker container (example)
$ sudo docker run --privileged -it --name android_R11 -v /home/bsp/android-bsp:/home/adv/BSP:rw advrisc/u18.04-mt8395abv1:latest /bin/bash
Step2 In container, change the user. (example)
adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP
Getting Android Source Code
Related version information:
- Android 11.0
- kernel 4.19.127
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 bin $ curl https://storage.googleapis.com/git-repo-downloads/repo > ./bin/repo $ chmod a+x ./bin/repo $ azcopy copy https://riscsw.blob.core.windows.net/bsp/mtk/android-bsp-alps-release-r0.mp6-aiot-v1.81.tar.gz . --recursive $ tar -zxvf android-bsp-alps-release-r0.mp6-aiot-v1.81.tar.gz $ cd android-bsp $ ../bin/repo init -u https://AIM-Linux@dev.azure.com/AIM-Linux/RISC-MT8395-Android11/_git/android-manifest -b adv_alps-release-r0.mp6-aiot-V1.81 -m [ release_version.xml ] $ ../bin/repo sync
=== The release_version.xml as follows: RSB-3810 for default_alps-release-r0.mp6-aiot-V1.81.xml or mt8395AB10034.xml
Building Android 11.0 image for EMMC
If your product is RSB-3810, the product name is rsb3810a1
$PRODUCT = rsb3810a1
Build Instructions
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 RSB-3810, you will be send command full_mt8395_rsb3810a1-userdebug
$ lunch full_mt8395_$PRODUCT-userdebug
To build all image (Need to build kernel first)
Perform the following command in terminal console
$ make 2>&1 | tee build-log.ext
To build preloader
Perform the following command in terminal console
$ make -j16 preloader
To build lk
Perform the following command in terminal console
$ make -j16 lk
To build kernel
Perform the following command in terminal console
$ make -j16 kernel
To build boot image
Perform the following command in terminal console
$ make -j16 bootimage
To build system image
Perform the following command in terminal console
$ make -j16 systemimage
To build dtbo image
Perform the following command in terminal console
$ make -j16 dtboimage
Output directory: out/target/product/mt8395_$PRODUCT
Burning image
1. Get SF Flash Tool V5
Supported OS :
- Windows 7
- Windows 10
- Ubuntu 16.x
- Ubuntu 18.x
2. Connect the usb type A to host computer and device type A port:
3. Burning image by SF Flash Tool V5:
(1) Select the MT8195_Android_scatter.txt file
(2) Select theFormat All + Download
(3) Click the Download button
4. Reboot the device and start to burn all image
Debug port
Baudrate: 921600