VIA Technologies VAB-820 User manual

DEVELOPMENT GUIDE
VIA VAB-820
Android BSP v5.0.9
1.00-12202018-135700

Copyright
Copyright © 2018 VIA Technologies Incorporated. All rights reserved.
No part of this document may be reproduced, transmied, transcribed, stored in a retrieval system, or translated into any language, in any
form or by any means, electronic, mechanical, magnec, opcal, chemical, manual or otherwise without the prior wrien permission of
VIA Technologies, Incorporated.
Trademarks
All brands, product names, company names, trademarks and service marks are the property of their respecve holders.
Disclaimer
VIA Technologies makes no warranes, implied or otherwise, in regard to this document and to the products described in this document.
The informaon provided in this document is believed to be accurate and reliable as of the publicaon date of this document. However,
VIA Technologies assumes no responsibility for the use or misuse of the informaon (including use or connecon of extra device/
equipment/add-on card) in this document and for any patent infringements that may arise from the use of this document. The informaon
and product specicaons within this document are subject to change at any me, without noce and without obligaon to nofy any
person of such change.
VIA Technologies, Inc. reserves the right the make changes to the products described in this manual at any me without prior noce.

VIA VAB-820 Android BSP v5.0.9 Development Guide
Version Date Remarks
1.00 12/20/2018 Inial release
Revision History
iii

VIA VAB-820 Android BSP v5.0.9 Development Guide
Table of Contents
1. Introducon����������������������������������������������������������������������������������������������������������������������� 1
1�1 BSP Package Contents �������������������������������������������������������������������������������������������������������������������������� 1
1�1�1 Source Code Folder Contents �������������������������������������������������������������������������������������������������������� 1
1�1�2 Firmware Folder Contents ������������������������������������������������������������������������������������������������������������� 1
1�1�3 Document Folder Contents������������������������������������������������������������������������������������������������������������ 1
1�1�4 Tools Folder Contents �������������������������������������������������������������������������������������������������������������������� 2
1.2 VersionInformaonandSupportedFeatures �������������������������������������������������������������������������������������� 3
2. BuildEnvironmentSetup �������������������������������������������������������������������������������������������������� 4
2.1 ConguringLinuxHostMachine���������������������������������������������������������������������������������������������������������� 4
3� Image Build ����������������������������������������������������������������������������������������������������������������������� 5
3.1 ExtracngtheVIAVAB-820BSP ����������������������������������������������������������������������������������������������������������� 5
3.2 DownloadingtheSourceCodeofAndroid6.0.1 ���������������������������������������������������������������������������������� 5
3.3 InstallingtheSourceCodePatch ���������������������������������������������������������������������������������������������������������� 5
3.4 BuildinganAndroidImage ������������������������������������������������������������������������������������������������������������������� 5
iv

1
VIA VAB-820 Android BSP v5.0.9 Development Guide
1� Introducon
ThisDevelopmentGuideexplainshowtosetupthenecessarybuildenvironmentinorderforuserstocustomize
theAndroidsourcecodeandcreatetheirownsystemimagefortheVIAVAB-820board.
TheVIAVAB-820AndroidBSPv5.0.9isdevelopedbasedontheNXPandroid_M6.0.1_1.0.0-ga(Android6.0
Marshmallow)andenableshardwarefeaturesthataredenedontheVIAVAB-820board.
1�1 BSP Package Contents
Therearefourfoldersinthepackageaslistedbelow.
VIA VAB-820 Android BSP contents
1�1�1 Source Code Folder Contents
VAB-820_Android_ source_code_patch.zip: IncludesAndroid6.0.1sourcecodedownloadscriptles,NXP
Androidpatchleandroid_M6.0.1_1.0.0-ga_core_source.tar.gz,theVIAVAB-820Androidsourcecodepatch
leandImagebuildingscriptles.
Smart_ETK_v1.0_SourceCode.zip:istheSmartETKdemoprogramsourcecode.
1�1�2 Firmware Folder Contents
Images_autoinstall_sd.zip:TheAndroidEVKsystemimageandinstallaonscriptles.
1�1�3 Document Folder Contents
VAB-820_Android_EVK_v5.0.9_Quick_Start_Guide _v1.00_20181220.pdf: TheQuickStartGuideprovides
anoverviewofhowtoboottheAndroidEVKsystemimageontheVIAVAB-820boardandcongurethe
supportedhardwarefunconsinthebuild.
VAB-820_Android_BSP_v5.0.9_Development_Guide _v1.00_20181220pdf: TheDevelopmentGuideexplains
howtosetupthenecessarybuildenvironmentinorderforuserstocustomizetheAndroidsourcecodeand
createtheirownsystemimagefortheVIAVAB-820board.
Source code folder Descripon
VAB-820_Android_source_code_patch.zip AndroidsourcecodepatchlesandImage
buildingscriptles
Smart_ETK_v1.0_SourceCode.zip SmartETKdemoprogramsourcecode
Firmware folder Descripon
Images_autoinstall_sd.zip AndroidEVKsystemimageandinstallaon
scriptles
Document folder Descripon
VAB-820_Android_EVK_v5.0.9_Quick_Start_
Guide_v1.00_20181220.pdf
QuickStartGuide
VAB-820_Android_BSP_v5.0.9_Development_
Guide_v1.00_20181220.pdf
DevelopmentGuide
Smart_ETK_SDK_Programming_Guide_v1.00_
20170811
SmartETKSDKProgrammingGuide
Tools folder Descripon
VAB-820_Smart_ETK_Demo_v1.0.apk SmartETKdemoprogram
BluetoothSPPTest.apk BluetoothSPPtesngprogram

2
VIA VAB-820 Android BSP v5.0.9 Development Guide
Smart_ETK_SDK_Programming_Guide_v1 .00_20170811.pdf: TheProgrammingGuideexplainshowtobuild
theSmartETKprogramandintroducesafullyfunconalsetofAPIforthedierentVIAboardsorsystems.
1�1�4 Tools Folder Contents
VAB-820_Smart_ETK_Demo_v1.0.apk: istheSmartETKdemoprogram.
BluetoothSPPTest.apk:istheBluetoothSPPproletestprogram.

3
VIA VAB-820 Android BSP v5.0.9 Development Guide
1�2 VersionInformaonandSupportedFeatures
• U-Bootversion:2015.04
• Kernelversion:3.14.52
• Evaluaonimage:AndroidMarshmallow6.0
• DevelopmentbasedonNXPandroid_M6.0.1_1.0.0-ga(Android6.0Marshmallow)
• SupportsSPIwitheMMCboot
• SupportsHDMIdisplay
• SupportsHDMIaudiooutput
• SupportsAUOLVDScapacivetouchpanels(throughUSBinterface)
ºAUO10.4″G104XVN01.0(1024×768)
ºAUO7″G070VW01(800×480)
• SupportsDualDisplay(CloneMode)
• SupportsCVBS&S-Video
• SupportsCOM1DTEmode,COM2TX/RXonly
• SupportstwoFlexCANTX/RX
• SupportsGigabitEthernet
• SupportsLine-in,Line-out,andMic-in
• SupportsVIAVNT9271USBWi-Fidongle
• SupportsVIAEMIO-1533USBWi-Fimodule
• SupportsVIAEMIO-1541miniPCIeWi-Fimodule
• SupportsVIAEMIO-2531miniPCIeWi-Fi&Bluetoothmodule
ºSupportsBluetoothA2DPandSPPprole
• SupportsVIAEMIO-5531USBWi-Fi&Bluetoothmodule
ºSupportsBluetoothA2DPandSPPprole
• SupportsVIAEMIO-2550miniPCIeMobileBroadbandmodule
• SupportsSmartETKv1.0:Watchdogmer,GPIO,UART,andFlexCAN
• SupportsOTA(Over-The-Airtechnology)
• SupportsshutdownoponinQuickSengs
• SupportsEthernetconguraoninSengs

4
VIA VAB-820 Android BSP v5.0.9 Development Guide
2� BuildEnvironmentSetup
Thisseconguidesyouthroughsengupthebuildenvironmentfordevelopment.Allinstruconsarebased
onusingUbuntu14.04LTS(64-bit).
Tomakesurethatthebuildprocesscompletessuccessfully,werecommendatleast120GBofdiskspaceand
15GBofcombinedmemoryandswapspaceonthehostmachine.
2�1 ConguringLinuxHostMachine
ThefollowingpackagesarerequiredfortheAndroiddevelopmentenvironment.Therequiredpackagescanbe
installedusingthecommandsbelow.Togetmoreinformaon,pleasevisittheAndroidwebsiteat
hps://source.android.com/setup/build/inializing�
TheOpenJDK7isnotincludedintheUbuntu14.04defaultinstallaon.Therststepistoaddanewserver
manuallybyusingthefollowingcommands:
ToinstalltheOpenJDK7,usethefollowingcommands:
ThefollowingpackagesarerequiredfortheAndroiddevelopmentenvironment.Toinstalltherequired
packagesontheUbuntu14.04,usethefollowingcommand:
$ sudo apt-get install openjdk-7-jre
$ sudo apt-get install openjdk-7-jdk
$ sudo apt-get install git gnupg ex bison gperf build-essential zip curl zlib1g-dev libc6-
dev libncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-
glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
zlib1g-dev:i386 uuid-dev liblzo2-dev libz-dev libc6-dev-i386 lib32z1 gcc g++ lzop u-boot-tools
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update

5
VIA VAB-820 Android BSP v5.0.9 Development Guide
3� Image Build
TheseconexplainshowtobuildtheU-BootbinaryandAndroidlesystemfortheVIAVAB-820board.
3�1 ExtracngtheVIAVAB-820BSP
UsethefollowingcommandtoextractthecontentsoftheBSP.
3�2 DownloadingtheSourceCodeofAndroid6.0.1
DownloadingtheAndroid6.0.1sourcecodetotheBSP/srcfoldercantakeseveralhoursdependingonyour
internetconnecon.
*Note: YouneedtosetupaGitaccountbeforedownloadingthesourcecode.
UsethefollowingcommandstodownloadthesourcecodeofAndroid6.0.1:
3�3 InstallingtheSourceCodePatch
UsethefollowingcommandtoinstalltheNXPandVIAVAB-820sourcecodepatch.
3�4 BuildinganAndroidImage
UsethefollowingcommandstobuildtheAndroidimage,thecompilingprocesswilltakeseveralhours.
Aerthecompilaon,the src/out/target/product/vab820/directorywillcontaintheresulngbinaries,as
showninthetablebelow.
Binary les generated
$ unzip VAB-820_Android_source_code_patch.zip
$ ./patch_fsl_via.sh
Binary Descripon
u-boot.imx U-BootbootloaderforiMX6Q
bspinst-vab820.img BSPautoinstallimageforiMX6Q
bspinst-vab820-6qp.img BSPautoinstallimageforiMX6QP
boot-vab820.img KernelforiMX6Q
boot-vab820-6qp.img KernelforiMX6QP
system�img Androidsystemimage
recovery-vab820.img RecoveryimageforiMX6Q
recovery-vab820-6qp.img RecoveryimageforiMX6QP
$ git cong –-global user.email [email protected]
$ git cong –-global user.name “Your Name”
$ cd Script
$ ./download_source_Android6.0.sh
$ cd ../src
$ source build/envsetup.sh
$ lunch vab820-userdebug
$ make –j8

1F, 531 Zhong-zheng Road,
Xindian Dist., New Taipei City 231
Taiwan
Tel: 886-2-2218-5452
Fax: 886-2-2218-9860
Email: [email protected]
940 Mission Court
Fremont, CA 94539,
USA
Tel: 1-510-687-4688
Fax: 1-510-687-4654
Email: embedded@viatech.com
Email: [email protected]
Taiwan Headquarters USA
Europe
Tsinghua Science Park Bldg. 7
No. 1 Zongguancun East Road,
Haidian Dist., Beijing, 100084
China
Tel: 86-10-59852288
Fax: 86-10-59852299
Email: embedded@viatech.com.cn
3-15-7 Ebisu MT Bldg. 6F,
Higashi, Shibuya-ku
Tokyo 150-0011
Japan
Tel: 81-3-5466-1637
Fax: 81-3-5466-1638
Email: embedded@viatech.co.jp
China
Japan
Other manuals for VAB-820
9
Table of contents