Professional Documents
Culture Documents
AMOS-820
Linux BSP v3.0.2
1.00-06282016-104800
Copyright
Copyright 2016 VIA Technologies Incorporated. All rights reserved.
No part of this document may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language,
in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual or otherwise without the prior written
permission of VIA Technologies, Incorporated.
Trademarks
All brands, product names, company names, trademarks and service marks are the property of their respective holders.
Disclaimer
VIA Technologies makes no warranties, implied or otherwise, in regard to this document and to the products described in this
document. The information provided in this document is believed to be accurate and reliable as of the publication date of this
document. However, VIA Technologies assumes no responsibility for the use or misuse of the information (including use or
connection 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 information and product specifications within this document are subject to change at any time, without notice
and without obligation to notify any person of such change.
VIA Technologies, Inc. reserves the right the make changes to the products described in this manual at any time without prior notice.
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
Revision History
Version Date Remarks
1.00 6/27/2016 Initial release
iii
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
Table of Contents
1. Introduction ................................................................
................................................................................................
................................................................................................
..................................................................
.................................. 1
1.1. Package Contents............................................................................................................................ 1
1.1.1. BSP Folder Contents.................................................................................................................................. 1
1.1.2. Document Folder Contents ..................................................................................................................... 1
1.1.3. EVK Folder Contents ................................................................................................................................. 2
1.2. Version Information and Supported Features .......................................................................... 3
4. Image Build................................
Build ................................................................
................................................................................................
................................................................................................
.................................................................
................................. 10
4.1. Extracting the AMOS-820 BSP................................................................................................... 10
4.2. Machine Configuration ................................................................................................................ 10
4.3. Building an SD Card Image......................................................................................................... 10
iv
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
1. Introduction
The purpose of this document is to provide an overview of getting started with the
AMOS-820 (Bare board: VAB-820 NXP i.MX6 Quad) using Yocto with an OpenEmbedded
filesystem.
The AMOS-820 Linux BSP v3.0.2 is developed based on the NXP fsl-yocto-3.14.28_1.0.0
(Yocto 1.7 Dizzy) and it enables hardware features that are defined on the AMOS-820.
1
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
2
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
3
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
2. Image Development
This section explains the setup requirements for booting from a Micro SD card or the SPI
ROM. A precompiled image is provided in the EVK folder of the BSP.
Next, on the AMOS-820, set the Micro SD/SPI boot switch to the Micro SD position
shown below.
Insert the prepared Micro SD card into the AMOS-820, connect an HDMI display, and
power on the device to initiate the boot process.
When the boot process is completed, you will see the OpenEmbedded desktop.
4
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
Please note that if you have previously saved U-Boot parameters, it is recommended to
clear that area of the SPI ROM with the following command:
$ sudo dd if=/dev/zero of=/dev/mtdblock0 bs=512 seek=1536 count=16
Flash the U-Boot binary from the mass storage device onto the SPI ROM:
$ sudo dd if=u-boot.imx of=/dev/mtdblock0 bs=512 seek=2
Copy the root filesystem image from the mass storage device onto the eMMC storage.
$ sudo dd if=via-image-gui-imx6qvab820.sdcard of=/dev/mmcblk0 bs=1M
In order to boot from the SPI ROM make sure the Micro SD/SPI boot switch is set to SPI
ROM boot.
Next, connect an HDMI display, and power on the device to initiate the boot process.
When the boot process is completed, you will see the OpenEmbedded desktop.
5
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
6
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
Next, power on the AMOS-820 to initiate the boot process. When prompted, press any key
to stop the boot process, and enter the U-Boot console as illustrated by the screenshot
below.
U-Boot 2014.04 (Nov 19 2015 - 18:49:13)VAB820 ver:3.0.2
Normal Boot
Hit any key to stop autoboot: 0
=>
Debug console view of boot process
7
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
8
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
#/bin/bash
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential
chrpath socat
$ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils
python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev
mercurial autoconf automake groff curl lzop asciidoc
The tool to create images for use with the U-Boot boot loader, "mkimage
mkimage",
mkimage is provided by
different packages in Ubuntu 12.04 and in newer Ubuntu releases.
On Ubuntu 12.04 install it as below.
$ sudo apt-get install uboot-mkimage
9
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
4. Image Build
4.1. Extracting the AMOS-820 BSP
Use the following command to extract the contents of the BSP.
$ tar xvf yocto-vab820-bsp-v3.0.2.tar.bz2
Binary Description
u-boot.imx U-Boot boot loader
zImage Kernel
zImage-imx6q-vab820.dtb Device tree
via-image-gui-imx6qvab820.sdcard SD card image
10
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
5. Hardware Functions
5.1. Setting up the Video-in
The AMOS-820 supports the composite RCA jack which is a CVBS signal input. The
following steps are for video-in function verification.
If the source of the video-in is PAL, use the following command to display the video on the
screen:
# gst-launch-0.10 imxv4l2src input=1 deinterlace=true ! imxv4l2sink crop-top-by-pixel=1
To display other video-in sources on the screen, use the following command:
# gst-launch-0.10 imxv4l2src input=1 deinterlace=true ! imxv4l2sink
For example, to save the video-in video as a 10-second MP4 file into /home folder with a
filename demo_1.mp4, use the following command:
# gst-launch-0.10 imxv4l2src input=1 num-buffers=300 ! vpuenc codec=6 ! ffmux_mov ! filesink
location=/home/demo_1.mp4
11
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
If you need to display the video-in source on the screen and record the feed at the same
time, use the following command:
# gst-launch-0.10 imxv4l2src input=1 num-buffers=900 queue-size=30 ! tee name=t ! queue !
imxv4l2sink t. ! queue ! vpuenc codec=6 bitrate=3000000 ! matroskamux ! filesink
location=/<path/filename.mp4>
12
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
Please note that you need to disable the CAN bus first then set the CAN bus bitrate. The
CAN bus bitrate should be 5000 < [BRT_value] < 1000000.
The CAN bus 1 is can0 and the CAN bus 2 is can1.
To set the CAN bus 1 bitrate [BRT_value], use the following command:
# ip link set can0 type can bitrate [BRT_value]
13
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
14
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
Make sure the printout message includes Bus 001 Device 004: ID 1545:1102 U-Blox AG.
Configure the 3G function by creating a PPP connection with root privilege.
$ pppd call Module-ZU200
Once the PPP connection has been created, open the browser to ensure connection to the
Internet.
15
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
5.3.2.Enabling GPS
To configure the GPS functions of the module requires the use of the Minicom serial
communication program. Open the Minicom serial communication program with the
following command:
$ minicom -s
Use the Minicom to set serial device to /dev/ttyUSB7 in another terminal and it will output
the data received from the GPS module as illustrated in the screenshot below.
$GPRMC,142015,00,A,2501.93961,N,12133.66111,E,0.068,,030314,,,A*73
$GPGSV,4,1,13,01,34,184,29,03,49,023,47,06,26,042,41,07,44,317,26*75
$GPGSV,4,2,13,08,13,323,,11,60,192,,13,29,242,38,16,33,071,16*79
$GPGSV,4,3,13,19,65,356,44,23,18,208,12,27,35,034,27,30,37,145,29*7B
$GPGSV,4,4,13,32,01,154,*4B
$GPZDA,142015.00,03,03,2014,00,00*62
GPS NMEA message
16
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
To change the timeout <value> and the system reboot <value> (seconds), use the
following command:
$ /unit_tests/wdt_driver_test.out set_timeout <value>
To send keep-alive requests to the Watchdog <value> (seconds), use the following
command:
$ /unit_tests/ wdt_driver_test.out set_keep_alive <value>
When the value of set_keep_alive is smaller than the value of set_timeout, the system
will not reboot.
To disable the Watchdog, use the following command:
$ /unit_tests/wdt_driver_test.out disable wdt
17
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
Set the multifunction pin as a GPIO pin. Here is the example for GPIO pin 1:
$ echo 7 > /sys/class/gpio/export
18
AMOS-
AMOS-820 Linux BSP v3.0.2 Quick Start Guide
To output a "Low" value on the GPO pin, use the following command:
$ echo 0 > /sys/class/gpio/gpio7/value
To output a "High" value on the GPO pin, use the following command:
$ echo 1 > /sys/class/gpio/gpio7/value
Time Value
mm 2-digit month
dd 2-digit day
HH 2-digit hours in 24h system
MM 2-digit minutes
YYYY 4-digit year
Time value table
For example the value 061110072013 means June 11 2013 10:07. The date command also
accepts other time formats, for more info see:
$ date --help
19
TaiwanlHeadquarters USA Japan China
7F0lNk7lZhongMZhenglRoad JBSlMissionlCourt kM7NMjlEbisulMTlBldgClDF TsinghualSciencelParklBldgClj
Xindian0lTaipei0lPk7By Fremont0lCAllJBNkJ Higashi0lShibuyaMku NoCl7lZongguancunlEastlRoad
Taiwan USA Tokyol7NSMSS77 HaidenlDistrict0lBeijing0ll7SSSyB
Japan China
TEL:lyyDCPCPP7yCNBNP TEL:l7CN7SCDykCkkSS
FAX:lyyDCPCPP7yCNBNk FAX:l7CN7SCDyjCBDNB TEL:ly7CkCNBDDC7Dkj TEL:lyDC7SCNJyNPPyy
Email:lembedded@viaCcomCtw Email:lembedded@viatechCcom FAX:ly7CkCNBDDC7Dky FAX:lyDC7SCNJyNPPJJ
Email:lembedded@viatechCcoCjp Email:lembedded@viatechCcomCcn
Europe
Email:lembedded@viaMtechCeu