DART-SD410 Android LL 1 1: Difference between revisions

From Variscite Wiki
m (Text replacement - "http://variwiki" to "https://variwiki")
 
(26 intermediate revisions by one other user not shown)
Line 88: Line 88:
DART-SD410 evaluation kit.
DART-SD410 evaluation kit.


== Host (PC) setup requirements ==
Please refer to [https://variwiki.com/index.php?title=DART-SD410_Android_Host_Install Host requirements installation.]
 
The host development environment for Android is based on Ubuntu, please install Ubuntu version 14.04 64bit LTS [http://www.ubuntu.com/download/desktop http://www.ubuntu.com/download/desktop]
At least 60GByte free space.
=== IMPORTANT ===
 
Do not use other Ubuntu releases, other than recommended above.
 
=== For 64-bit Ubuntu 14.04 ===
 
The complete Android host requirments:  [http://source.android.com/source/initializing.html source.android.com/source/initializing.html] Also you can refer to [https://developer.qualcomm.com/qfile/28828/lm80-p0436-2_sw-build-and-install_gd_linux_android_rev_d.pdf Software Build and Installation Guide, Linux Android].
 
The following command installs repo:
<pre>First:
$ sudo apt-get update
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
</pre>
In addition to the packages requested on the Android website, the following packages are also needed:
 
=== Installing the OpenJDK ===
 
The master branch of Android in the Android Open Source Project (AOSP) requires Java 7. On Ubuntu, use OpenJDK. Be aware that you must use OpenJDK opposed to previous versions that used SUN Java.
 
Java 7: For the latest version of Android
<pre>$ sudo apt-get update
$ sudo apt-get install openjdk-7-jdk
</pre>
Optionally, update the default Java version by running:
<pre>$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
</pre>
=== Install fastboot and ADB ===
 
<pre>
$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install android-tools-adb android-tools-fastboot
</pre>
 
=== Install GIT ===
Please provide correct credentials during git initialization.
<pre>
$ sudo apt-get install git
$ git config --global user.email "you@example.com"
$ git config --global user.name "Your Name"
</pre>


= <span style="line-height: 1.5em;">Obtain Variscite's BSP</span> =
= <span style="line-height: 1.5em;">Obtain Variscite's BSP</span> =
Line 157: Line 109:


<pre>
<pre>
$ chmod +x DB410c_build.sh
$ chmod +x SD410c_build.sh
The file DB410c_build.sh can be adited and parameter $BUILD_MACHINE changed to follow the build machine.  
The file SD410c_build.sh can be edited and parameter $BUILD_MACHINE changed to follow the build machine.  
The best setting is number of threads of the CPU minus 2.
The best setting is number of threads of the CPU minus 2.
$ ./DB410c_build.sh
$ ./SD410c_build.sh
The build system will ask for credentials for repo initialization.
The build system will ask for credentials for repo initialization.
</pre>
</pre>
= Build Specific Android Image =
 
Usually the changes are done only to a kernel, or bootloader, in this case there is no need to build the whole system and a specific image can be built.
= Rebuild Android Image =
To accomplish it run:
To rebuild the Android run:
<pre>
<pre>
build.sh msm8916_64 --image "image to build"
$ source build/envsetup.sh  
image to build can be bootimg/sysimg/usrimg
$ lunch msm8916_64-userdebug
$ make -j8 WITH_DEXPREOPT=true WITH_DEXPREOPT_PIC=true DEX_PREOPT_DEFAULT=nostripping | tee log.txt
 
You can change the number of build threads (-j parameter) to a better number to make the build faster.
</pre>
</pre>


Line 182: Line 137:
==To flash the whole system==
==To flash the whole system==
<pre>
<pre>
$ cd /out/target/product/msm8916_64/
$ cd out/target/product/msm8916_64/
$ fastboot.exe flash aboot emmc_appsboot.mbn
$ sudo fastboot flash aboot emmc_appsboot.mbn
$ fastboot.exe flash persist persist.img
$ sudo fastboot flash persist persist.img
$ fastboot.exe flash userdata userdata.img
$ sudo fastboot flash userdata userdata.img
$ fastboot.exe flash system system.img
$ sudo fastboot flash system system.img
$ fastboot.exe flash recovery recovery.img
$ sudo fastboot flash recovery recovery.img
$ fastboot.exe flash boot boot.img
$ sudo fastboot flash boot boot.img
</pre>
</pre>
==To flash kernel and dtbs==
==To flash kernel and dtbs==
Sometimes the changes are done only to the android kernel, in this case there is no need to flash the whole system.</br>
Sometimes the changes are done only to the android kernel, in this case there is no need to flash the whole system.</br>
Line 195: Line 151:
Flashing it is enough
Flashing it is enough
<pre>
<pre>
$ cd /out/target/product/msm8916_64/
$ cd out/target/product/msm8916_64/
$ fastboot.exe flash boot boot.img
$ sudo fastboot flash boot boot.img
</pre>
</pre>
==To flash little kernel==
==To flash little kernel==
Sometimes the changes are done only to the bootloader, in this case there is no need to flash the whole system.</br>
Sometimes the changes are done only to the bootloader, in this case there is no need to flash the whole system.</br>
Line 203: Line 160:
Flashing it is enough
Flashing it is enough
<pre>
<pre>
$ cd /out/target/product/msm8916_64/
$ cd out/target/product/msm8916_64/
$ fastboot.exe flash aboot emmc_appsboot.mbn
$ sudo fastboot flash aboot emmc_appsboot.mbn
</pre>
 
=Adding Applications=
==Adding Broswer==
*Download Browser.zip file from Variscite's FTP site into ''~/dart-sd410/source/'' directory.<br>
*The file is located in ''dart-sd410/Software/Android/AdditionalPackages/'' FTP directory<br>
*Extract the downloaded file into your android directory
<pre>
$ cd ~/dart-sd410/source/
$ unzip Browser.zip
</pre>
*Build the Android
*Flash the new Android into the board by fastboot
 
==Adding GPS Test==
*Download GPSTest.zip file from Variscite's FTP site into ''~/dart-sd410/source/'' directory.<br>
*The file is located in ''dart-sd410/Software/Android/AdditionalPackages/'' FTP directory<br>
*Extract the downloaded file into your android directory
<pre>
$ cd ~/dart-sd410/source/
$ unzip GPSTest.zip
</pre>
*Add the new package into your board configuration
<pre>
$ gedit ./APQ8016_410C_LA.BR.1.2.4-01810-8x16.0_5.1.1_Lollipop_P2/device/qcom/msm8916_64/msm8916_64.mk
</pre>
locate the following lines:<br>
<br>
''PRODUCT_PACKAGES += \''<br>
''    libqcomvisualizer \''<br>
''    libqcompostprocbundle \''<br>
''    libqcomvoiceprocessing''<br><br>
Add a new package to the PRODUCT_PACKAGES<br><br>
''PRODUCT_PACKAGES += \''<br>
''    libqcomvisualizer \''<br>
''    libqcompostprocbundle \''<br>
''    libqcomvoiceprocessing \ '' <br>
''    GPSTest''<br>
<br>
Save the file and exit gedit
*Build the Android
*Flash the new Android into the board by fastboot
 
==Adding Geekbench==
Follow the same procedure as for GPSTest to add Geekbench into your image file.
==Troubleshoot==
If something goes wrong check the following:
* The downloaded files should be extracted into ''packages/apps/'' directory verify that the new directory exists
* Verify that the build process rebuilds the system.img image
* Verify that the fastboot burns the system.img into system partition succsessfully
= Customizing hardware =
The DART-SD410 hardware customization should be done by changing DTS files.<br>
This [https://www.raspberrypi.org/documentation/configuration/device-tree.md article]  is very helpful for reading about the DTS files.<br>
The VAR-SD410CustmoBoard DTS files are located in ''kernel/arch/arm/boot/dts/qcom/'' folder.
The DTS file tree is:
<pre>
apq8016-var-sd410.dts
└── apq8016-var-sd410.dtsi
    ├── apq8016-camera-sensor-var-sd410.dtsi
    ├── dsi-panel-var-sd410.dtsi
    └── apq8016-dart.dtsi
        ├── msm8916-pinctrl.dtsi
        └── msm8916.dtsi
            ├── skeleton64.dtsi
            ├── msm8916-coresight.dtsi
            ├── msm8916-smp2p.dtsi
            ├── msm8916-pinctrl.dtsi
            ├── msm8916-ipcrouter.dtsi
            ├── msm-gdsc-8916.dtsi
            ├── msm8916-iommu.dtsi
            ├── msm8916-gpu.dtsi
            ├── msm8916-mdss.dtsi
            │  ├── dsi-panel-sim-video.dtsi
            │  └── dsi-panel-sim-cmd.dtsi
            ├── msm8916-mdss-pll.dtsi
            ├── msm8916-iommu-domains.dtsi
            ├── msm8916-bus.dtsi
            ├── msm8916-camera.dtsi
            ├── msm-pm8916-rpm-regulator.dtsi
            ├── msm-pm8916.dtsi
            ├── msm8916-regulator.dtsi
            └── msm8916-pm.dtsi
</pre>
</pre>

Latest revision as of 11:56, 10 June 2020

DART-SD410 Android-LL-5.1.1 Developers Guide

Introduction

This WIKI describes how to build and deploy Android Lollipop Lollipop-5-1-1 on the DART-SD410. It is based on Qualcomm Android-LL-5.1.1.

Overview

The objective of this document is to guide DART-SD410 Android developers to obtain Android Lollipop sources, setting up host environment, compilation and deployment.

This document contains instructions for:

  • Hardware and software requirements.
  • Setup the hardware.
  • Setup the toolchain.
  • Download & build the sources.
  • Install the binaries on the DART-SD410 SOM.

Document Reference

This release is based on Qualcomm APQ8016_410C_LA.BR.1.2.4-01810-8x16.0_5.1.1_Lollipop_P2 release. Please refer to Qualcomm Developer Network before you start building.

Supported hardware and features

Feature Description
SOM support DART-SD410
Carrier Board support VAR-DT410CustomBoard
CPU Qualcomm - Snapdragon 410
Resque Image Resque Images set can be downloaded from FTP
eMMC up to 16GB
DDR size support configuration Up to 2G LPDDR3
SD-Card +
Wired Network 10/100 Mbps Ethernet
Wireless Network 802.11abg AP, & Wi-Fi
Bluetooth +
SPI +
I2C +
USB OTG Host and Device
Uarts x2
RTC +
Display HDMI: 1080P (On board DSI-to-HSMI bridge, 800x480 resolution)
LVDS (On board DSI-to-LVDS bridge, 800x480 resolution)
Audio Line In & Line out
Mono Speaker
Audio over HDMI
Camera IMX135 camera sensor. Board can be ordered separately at : sales@variscite.com

Hardware Requirements

DART-SD410 evaluation kit.

Please refer to Host requirements installation.

Obtain Variscite's BSP

Please download Android Board Support Package file from Variscite's FTP site.
Contact Variscite support for FTP credentials.

Unpack Variscite's Android Release Package

$ mkdir ~/dart-sd410
$ cd ~/dart-sd410
$ unzip ~/Downloads/variscite_bsp_vla.br_.1.2.4-01810-8x16.0-3.zip
$ cd source/

Download and Build Android Images

The following commands will download the full Android release from different Git repositories and build the Android images. It may take a very long time depending on Internel connection, Build machine, and remote servers. The process may fail fetching the repositories, in this case it can be started again.

$ chmod +x SD410c_build.sh
The file SD410c_build.sh can be edited and parameter $BUILD_MACHINE changed to follow the build machine. 
The best setting is number of threads of the CPU minus 2.
$ ./SD410c_build.sh
The build system will ask for credentials for repo initialization.

Rebuild Android Image

To rebuild the Android run:

$ source build/envsetup.sh 
$ lunch msm8916_64-userdebug 
$ make -j8 WITH_DEXPREOPT=true WITH_DEXPREOPT_PIC=true DEX_PREOPT_DEFAULT=nostripping | tee log.txt

You can change the number of build threads (-j parameter) to a better number to make the build faster.

Flashing newly built images

The build process creates an out directory and puts all images in the following directory:
/out/target/product/msm8916_64/
The following image files are created:
emmc_appsboot.mbn - little kernel (uboot)
boot.img - kernel and dtb files
system.img - system folder
The images can be flashed one by one via fastboot.
In order to enter fastboot mode cycle the power or press Reset key with Back key pressed.

To flash the whole system

$ cd out/target/product/msm8916_64/
$ sudo fastboot flash aboot emmc_appsboot.mbn
$ sudo fastboot flash persist persist.img
$ sudo fastboot flash userdata userdata.img
$ sudo fastboot flash system system.img
$ sudo fastboot flash recovery recovery.img
$ sudo fastboot flash boot boot.img

To flash kernel and dtbs

Sometimes the changes are done only to the android kernel, in this case there is no need to flash the whole system.
The kernel and dtb files are located in boot.img file.
Flashing it is enough

$ cd out/target/product/msm8916_64/
$ sudo fastboot flash boot boot.img

To flash little kernel

Sometimes the changes are done only to the bootloader, in this case there is no need to flash the whole system.
The little kernel is located in emmc_appsboot.mbn file.
Flashing it is enough

$ cd out/target/product/msm8916_64/
$ sudo fastboot flash aboot emmc_appsboot.mbn

Adding Applications

Adding Broswer

  • Download Browser.zip file from Variscite's FTP site into ~/dart-sd410/source/ directory.
  • The file is located in dart-sd410/Software/Android/AdditionalPackages/ FTP directory
  • Extract the downloaded file into your android directory
$ cd ~/dart-sd410/source/
$ unzip Browser.zip
  • Build the Android
  • Flash the new Android into the board by fastboot

Adding GPS Test

  • Download GPSTest.zip file from Variscite's FTP site into ~/dart-sd410/source/ directory.
  • The file is located in dart-sd410/Software/Android/AdditionalPackages/ FTP directory
  • Extract the downloaded file into your android directory
$ cd ~/dart-sd410/source/
$ unzip GPSTest.zip
  • Add the new package into your board configuration
$ gedit ./APQ8016_410C_LA.BR.1.2.4-01810-8x16.0_5.1.1_Lollipop_P2/device/qcom/msm8916_64/msm8916_64.mk

locate the following lines:

PRODUCT_PACKAGES += \
libqcomvisualizer \
libqcompostprocbundle \
libqcomvoiceprocessing

Add a new package to the PRODUCT_PACKAGES

PRODUCT_PACKAGES += \
libqcomvisualizer \
libqcompostprocbundle \
libqcomvoiceprocessing \
GPSTest

Save the file and exit gedit

  • Build the Android
  • Flash the new Android into the board by fastboot

Adding Geekbench

Follow the same procedure as for GPSTest to add Geekbench into your image file.

Troubleshoot

If something goes wrong check the following:

  • The downloaded files should be extracted into packages/apps/ directory verify that the new directory exists
  • Verify that the build process rebuilds the system.img image
  • Verify that the fastboot burns the system.img into system partition succsessfully

Customizing hardware

The DART-SD410 hardware customization should be done by changing DTS files.
This article is very helpful for reading about the DTS files.
The VAR-SD410CustmoBoard DTS files are located in kernel/arch/arm/boot/dts/qcom/ folder. The DTS file tree is:

apq8016-var-sd410.dts
└── apq8016-var-sd410.dtsi
    ├── apq8016-camera-sensor-var-sd410.dtsi
    ├── dsi-panel-var-sd410.dtsi
    └── apq8016-dart.dtsi
        ├── msm8916-pinctrl.dtsi
        └── msm8916.dtsi
            ├── skeleton64.dtsi
            ├── msm8916-coresight.dtsi
            ├── msm8916-smp2p.dtsi
            ├── msm8916-pinctrl.dtsi
            ├── msm8916-ipcrouter.dtsi
            ├── msm-gdsc-8916.dtsi
            ├── msm8916-iommu.dtsi
            ├── msm8916-gpu.dtsi
            ├── msm8916-mdss.dtsi
            │   ├── dsi-panel-sim-video.dtsi
            │   └── dsi-panel-sim-cmd.dtsi
            ├── msm8916-mdss-pll.dtsi
            ├── msm8916-iommu-domains.dtsi
            ├── msm8916-bus.dtsi
            ├── msm8916-camera.dtsi
            ├── msm-pm8916-rpm-regulator.dtsi
            ├── msm-pm8916.dtsi
            ├── msm8916-regulator.dtsi
            └── msm8916-pm.dtsi