VIA Technologies ARTiGO A820 User manual

DEVELOPMENT GUIDE
VIA ARTiGO A820
Android BSP v5.0.6
1.00-11222018-153700

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 ARTiGO A820 Android BSP v5.0.6 Development Guide
Version Date Remarks
1.00 11/22/2018 Inial release
Revision History
iii

VIA ARTiGO A820 Android BSP v5.0.6 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 ExtracngtheVIAARTiGOA820BSP ��������������������������������������������������������������������������������������������������� 5
3.2 DownloadingtheSourceCodeofAndroid6.0.1 ���������������������������������������������������������������������������������� 5
3.3 InstallingtheSourceCodePatch ���������������������������������������������������������������������������������������������������������� 5
3.4 BuildinganAndroidImage ������������������������������������������������������������������������������������������������������������������� 5
iv

1
VIA ARTiGO A820 Android BSP v5.0.6 Development Guide
1� Introducon
ThisDevelopmentGuideexplainshowtosetupthenecessarybuildenvironmentinorderforuserstocustomize
theAndroidsourcecodeandcreatetheirownsystemimagefortheVIAARTiGOA820system.
TheVIAARTiGOA820AndroidBSPv5.0.6isdevelopedbasedontheNXPandroid_M6.0.1_1.0.0-ga(Android
6.0Marshmallow)andenableshardwarefeaturesthataredenedontheVIAARTiGOA820system.
1�1 BSP Package Contents
Therearefourfoldersinthepackageaslistedbelow.
VIA ARTiGO A820 Android BSP contents
1�1�1 Source Code Folder Contents
ARTiGO_A820_Android_ source_code_patch.zip: IncludesAndroid6.0.1sourcecodedownloadscriptles,
NXPAndroidpatchleandroid_M6.0.1_1.0.0-ga_core_source.tar.gz,theVIAARTiGOA820Androidsource
codepatchleandImagebuildingscriptles.
Smart_ETK_v1.0_SourceCode.zip:istheSmartETKdemoprogramsourcecode.
1�1�2 Firmware Folder Contents
Images_autoinstall_sd.zip:TheAndroidEVKsystemimageandinstallaonscriptles.
1�1�3 Document Folder Contents
ARTiGO_A820_Android_EVK_v5.0.6_Quick_Start_Guide _v1.00_20181122.pdf: TheQuickStartGuide
providesanoverviewofhowtoboottheAndroidEVKsystemimageontheVIAARTiGOA820systemand
congurethesupportedhardwarefunconsinthebuild.
ARTIGO_A820_Android_BSP_v5.0.6_Development_Guide _v1.00_20181122.pdf: TheDevelopmentGuide
explainshowtosetupthenecessarybuildenvironmentinorderforuserstocustomizetheAndroidsourcecode
andcreatetheirownsystemimagefortheVIAARTiGOA820system.
Source code folder Descripon
ARTiGO_A820_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
ARTiGO_A820_Android_EVK_v5.0.6_Quick_
Start_Guide_v1.00_20181122.pdf
QuickStartGuide
ARTiGO_A820_Android_BSP_v5.0.6_
Development_Guide_v1.00_20181122.pdf
DevelopmentGuide
Smart_ETK_SDK_Programming_Guide_v1.00_
20170811
SmartETKSDKProgrammingGuide
Tools folder Descripon
ARTiGO_A820_Smart_ETK_Demo_v1.0.apk SmartETKdemoprogram
BluetoothSPPTest.apk BluetoothSPPtesngprogram

2
VIA ARTiGO A820 Android BSP v5.0.6 Development Guide
Smart_ETK_SDK_Programming_Guide_v1 .00_20170811.pdf: TheProgrammingGuideexplainshowtobuild
theSmartETKprogramandintroducesafullyfunconalsetofAPIforthedierentVIAboardsorsystems.
1�1�4 Tools Folder Contents
ARTIGO_A820_Smart_ETK_Demo_v1.0.apk: istheSmartETKdemoprogram.
BluetoothSPPTest.apk:istheBluetoothSPPproletestprogram.

3
VIA ARTiGO A820 Android BSP v5.0.6 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
• SupportsCOM1(RS-232/RS-485),onboardCOMdebugconnector
• SupportsGigabitEthernet(LAN1)
• Supports10/100MbpsEthernet(LAN2)
• SupportsVIAVNT9271USBWi-Fidongle
• SupportsVIAEMIO-1541miniPCIeWi-Fimodule
• SupportsVIAEMIO-2531miniPCIeWi-Fi&Bluetoothmodule
ºSupportsBluetoothA2DPandSPPprole
• SupportsVIAEMIO-2550miniPCIeMobileBroadbandmodule
• SupportsSmartETKv1.0:WatchdogTimer,GPIO,andUART(RS-232/RS-485)
• SupportsOTA(Over-The-Airtechnology)
• SupportsshutdownoponinQuickSengs
• SupportsEthernetconguraoninSengs

4
VIA ARTiGO A820 Android BSP v5.0.6 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 ARTiGO A820 Android BSP v5.0.6 Development Guide
3� Image Build
TheseconexplainshowtobuildtheU-BootbinaryandAndroidlesystemfortheVIAARTiGOA820system.
3�1 ExtracngtheVIAARTiGOA820BSP
UsethefollowingcommandtoextractthecontentsoftheBSP.
3�2 DownloadingtheSourceCodeofAndroid6.0.1
DownloadingtheAndroid6.0.1sourcecodetotheBSP/srcfoldercantakeseveralhoursdependingonyour
internetconnecon.
*Note: YouneedtosetupaGitaccountbeforedownloadingthesourcecode.
UsethefollowingcommandstodownloadthesourcecodeofAndroid6.0.1:
3�3 InstallingtheSourceCodePatch
UsethefollowingcommandtoinstalltheNXPandVIAARTiGOA820sourcecodepatch.
3�4 BuildinganAndroidImage
UsethefollowingcommandstobuildtheAndroidimage,thecompilingprocesswilltakeseveralhours.
Aerthecompilaon,the src/out/target/product/argo_a820_6dl/directorywillcontaintheresulng
binaries,asshowninthetablebelow.
Binary les generated
$ unzip ARTiGO_A820_Android_source_code_patch.zip
$ ./patch_fsl_via.sh
Binary Descripon
u-boot-a820-6dl.imx U-Bootbootloader
bspinst.img BSP auto install image
boot-a820-6dl.img Kernelimage
system�img Androidsystemimage
recovery-a820-6dl.img RecoveryimageforiMX6DL
$ git cong –-global user.email [email protected]
$ git cong –-global user.name “Your Name”
$ cd ARTIGO A820_Android_source_code_patch/Script
$ ./download_source_Android6.0.sh
$ cd ../src
$ source build/envsetup.sh
$ lunch artigo_a820_6dl-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 ARTiGO A820
3
Table of contents
Other VIA Technologies Gateway manuals
Popular Gateway manuals by other brands

SMC Networks
SMC Networks SMC TigerAccess SMC-VIP04 Brochure & specs

AT&T
AT&T U-verse TV Self-installation guide

TRENDnet
TRENDnet TEW-734APO Quick installation guide

Dinstar
Dinstar DWG2000-1G user manual

Siemens
Siemens Gigaset SE568 user guide

SmartSavy
SmartSavy Serial GSM Gateway Software configuration guide