background image

GUF-Yocto-34.0-r5756-0

VINCELL

User Manual

TEMPLATE = app

TARGET = myqtapp

QT = core gui widgets

S= \

main.cpp

Setup the build environment.

$ source

,!

/opt/guf/GUF-Yocto-34.0-r5756-0-sdk/environment-setup-vincell-guf-linux-gnueabi

Note:

The above command assumes that you have extracted the SDK in the default directory under

/opt/guf/GUF-

Yocto-34.0-r5756-0-sdk

. If the SDK is located in a different directory, you have to change the directory accord-

ingly.

Execute the following command to create a

Makefile

and build the binary in the

myqtapp

directory:

$ qmake myqtapp.pro

$ make

Now, there is the

myqtapp

executable in the

myqtapp

directory. You can transfer this application to the target

system’s

/usr/bin

directory in one of the ways described in chapter

[

I

3 Accessing the target system]

and run it

from the device shell.

7.4

Using the Qt Creator IDE

Apart from compiling Qt applications on the command line, Qt Creator can be used as a comfortable IDE for
developing, building and deploying applications for the target system. This section describes how to set up Qt
Creator and how to compile and deploy a sample application.

7.4.1 Configuring Qt Creator

To use Qt with the cross toolchain shipped with the Garz & Fricke BSP, the Qt version must be set up properly.
Furthermore, the device configuration for automatic deployment must be set up properly.

Our tests were performed using a virtual machine installation of Ubuntu 14.04 Desktop (amd64). The following
examples consider a Ubuntu 14.04 Desktop (amd64) installation. To install the Qt Creator from the terminal type

$ sudo apt-get install qtcreator qtcreator-plugin-cmake qtcreator-plugin-qnx

SFTP is used to deploy your program to the target device, thus SSH has to be installed as well:

$ sudo apt-get install ssh

To accept the ssh key of the Garz & Fricke device, create a manual ssh connection:

user@localhost$ ssh

root@172.20.56.212

The authenticity of host '172.20.56.212 (172.20.56.212)' can't be established.

ECDSA key fingerprint is a3:bf:37:99:04:37:81:91:46:5b:bc:76:d4:f1:56:dc.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '172.20.56.212' (ECDSA) to the list of known hosts.

Last login: Wed Sep 23 14:05:41 2015 from 172.20.42.189

root@vincell:~#

This needs to be repeated when the IP address or the ssh key of the device changes.

Each time the Qt Creator is startet some environment variables need to be set. It is the same process as in the
chapters

[

I

7.2 Simple command-line application]

and

[

I

7.3 Qt-based GUI user application]

. Open a console

and type

38

Summary of Contents for GUF-Yocto-34.0-r5756-0-VINCELL

Page 1: ...Yocto User Manual GUF Yocto 34 0 r5756 0 VINCELL Built on 11 02 2016...

Page 2: ...is liable for any direct indirect special incidental or consequential damages arising out of use or resulting from non compliancy of therein conditions and precautions even if advised of the possibil...

Page 3: ...Fricke shared configuration 15 4 1 8 Autocopy 16 4 1 9 Autostart 18 4 1 10 Cron 19 4 2 Utilities 20 4 2 1 Garz Fricke system configuration 20 4 2 2 Power down mode 20 4 2 3 Sendmail 21 5 Add On Packag...

Page 4: ...rmation about Garz Fricke Yocto Linux systems 44 8 2 Download and install the Garz Fricke Yocto BSP 45 8 3 Building the BSP for the target platform with Yocto 45 9 Deploying the Linux system to the ta...

Page 5: ...LL as well as the build process of the Garz Fricke Linux BSP and the integration of custom software components The BSP can be downloaded from the Garz Fricke support server I http support garz fricke...

Page 6: ...cific parts of the Linux OS and several internal device and subsystem drivers 2 3 The root file system The root file system is simply a file system It contains the Linux file system hierarchy folders...

Page 7: ...linux html Information regarding embedded Linux systems can be found in the following book Building Embedded Linux systems 2nd Edition Karim Yaghmour John Masters Gilad Ben Yossef Philippe Gerum O Rei...

Page 8: ...to RS232 converter using a null modem cable For a working connection the signals TXD and RXD have to be connected cross over in the same way like a null modem cable does The location of the X13 conne...

Page 9: ...e host system in order to gain access To login via SSH type on the host system ssh root 192 168 1 1 The first time you access the target system from the host system the target is added to the list of...

Page 10: ...socket_type dgram wait yes user nobody server usr sbin in tftpd server_args srv tftp disable no The srv tftp directory must be created on the host system with the following commands sudo mkdir srv tft...

Page 11: ...GUF Yocto 34 0 r5756 0 VINCELL User Manual user root and no password 11...

Page 12: ...3 3 wait etc init d rc 3 l4 4 wait etc init d rc 4 l5 5 wait etc init d rc 5 l6 6 wait etc init d rc 6 As the comments in the file tell the first script to be run on boot is etc init d rcS which execu...

Page 13: ...p remove update rc d etc init d myapp exists during rc d purge continuing Removing any system startup links for myapp etc rc0 d K20myapp etc rc1 d K20myapp etc rc2 d S20myapp etc rc3 d S20myapp etc rc...

Page 14: ...dbus bindings can be found at I http dbus freedesktop org doc dbus glib 4 1 3 SSH service The ssh service allows the user to log in on the target system Futhermore the SFTP and SCP functionalities are...

Page 15: ...onfig files in one specific folder To reduce the security risk of a open remote service it is possible to restrict the ssh service access to the SFTP feature locking the user into for example his home...

Page 16: ...es are listed in etc modules and loads them using sbin modprobe To ensure that the module loading works correctly the module dependencies in lib modules kernel ver sion modules dep have to be consiste...

Page 17: ...copy mechanism includes the following components etc udev rules d automount rules UDEV rule that triggers the mount sh script when a storage media is plugged unplugged etc udev scripts mount sh Script...

Page 18: ...on is still enabled by default if the XML configuration contains no explicit setting for this function To be able to configure each of the autojob functions individually you may have to install an XML...

Page 19: ...eady stated in I 4 1 8 Autocopy autocopy is executed before autostart The user may desire to autostart an application from a storage media with command line args In this case a start script can be pla...

Page 20: ...your XML configuration probably doesn t contain explicit settings for the autojob functions yet Please install one of the provided XML configuration files as shown above The possible values of all and...

Page 21: ...itionally a value is appended this value is written to the according setting in the XML configuration The name set with sconfig is also used as hostname for the device It defaults to GFMM serial numbe...

Page 22: ...irst few incoming bytes after and including the wakeup byte might be truncated and not received by the UART driver 4 2 3 Sendmail The sendmail tool can be used to send emails from the device The sendm...

Page 23: ...mium browser as installable RPM package This package is intended to be used for HTML based applications starting automatically during system boot which won t display the regular browser GUI i e URL ba...

Page 24: ...n temporarily do so by first stopping Chromium as described above and then calling it manually with any URL s and command line options you like e g etc init d chromium stop Chromium http www google co...

Page 25: ...s the easiest way is to configure one single device as desired and then take a snapshot of the device s root chromium folder which can then be unpacked on any other device desired 5 1 6 Soft Keyboard...

Page 26: ...he Garz Fricke hardware platforms include a dedicated connector with isolated digital I O pins On these pins the direction cannot be changed since it is determined by the wiring Thus the direction fil...

Page 27: ...5_half_duplex_mode struct serial_rs485 rs485 int fd Open port fd open dev ttymxc2 O_RDWR O_SYNC Enable RS485 half duplex mode rs485 flags SER_RS485_ENABLED SER_RS485_RTS_ON_SEND ioctl fd TIOCSRS485 rs...

Page 28: ...ev is described in the Linux kernel documentation and available in the kernel directory under Documentation spi spidev Additionally there is an example C program available in the same location Documen...

Page 29: ...kBit s from a Linux console root vincell canconfig can0 bitrate 125000 root vincell ifconfig can0 up Note Due to the use of the busybox version of the ip tool the following sequence does NOT work on...

Page 30: ...vice acts as a USB device itself by emulating a specific device type Additionally if supported an OTG enabled port can automatically detect which of the above roles the platform plays during the plugg...

Page 31: ...file operations open read write and close Example 1 Reading and adjusting the current backlight brightness on the console root vincell cat sys class backlight pwm backlight 0 brightness 255 root vince...

Page 32: ...interrupt is generated The interrupt will trigger an event on the temp1_alrt sysfs entry that can be catched using the poll function Read the temperature alert flag active low root vincell cat sys cla...

Page 33: ...nal with a frequency of 440 Hz default settings with GStreamer s adiotestsrc and alsasink plugins root vincell gst launch audiotestsrc audioconvert alsasink 6 15 SRAM The battery backed SRAM is contro...

Page 34: ...ote Currently there is a limitation in the X Server display driver so the secondary display can t be used from the X Server out of the box 6 16 3 HDMI as mirror of the internal display The HDMI mirror...

Page 35: ...ue composite sync polarity low or high gsync value synch on green false or true extsync value external sync enable false or true bcast value broadcast enable false or true laced value interlace enable...

Page 36: ...04 Desktop amd64 other destributions might work but 32bit systems will not In that case you have to build the sdk yourself using the bsp as described in I 8 3 Building the BSP for the target platform...

Page 37: ...target system s usr bin directory using one of the ways described in chapter I 3 Accessing the target system and execute it from the device shell It might be necessary to change the access rights of...

Page 38: ...e cross toolchain shipped with the Garz Fricke BSP the Qt version must be set up properly Furthermore the device configuration for automatic deployment must be set up properly Our tests were performed...

Page 39: ...dress depends on the configuration factory default is the static adress 192 168 1 1 but dhcp is also possible Make sure that you can access the target as described in I 3 Accessing the target system w...

Page 40: ...the version the Qt Versions section It should be set to opt guf GUF Yocto 34 0 r5756 0 sdk sysroots x86_64 gufsdk linux usr bin qt5 qmake as seen in I Figure 8 Figure 8 Qt Creator Qt Versions In the...

Page 41: ...uick Application The application will be the default sample application that comes with the Qt Creator IDE To create a new project select File New File or Project Make sure that in the top right corne...

Page 42: ...now For further information on how to use Qt Creator and how to program Qt applications see the online Qt documen tation I http qt project org doc qtcreator 3 0 index html I http qt project org doc 7...

Page 43: ...h etc profile d tslib sh f etc profile d qt5 touch config sh etc profile d qt5 touch config sh export DISPLAY 0 case 1 in start We don t want this script to block the rest of the boot process if 2 bac...

Page 44: ...mon m p var run qt4 guf webdemo pid b a usr bin qt4 guf webdemo S no scrollbars file usr share website index htm stop start stop daemon p var run qt4 guf webdemo pid K echo Usage etc init d qt4 guf we...

Page 45: ...ww yoctoproject org documentation current In order to build a Yocto based Linux system the following list of packages should be installed Debian and Ubuntu package names autoconf automake build essent...

Page 46: ...34 0 r5756 0 tar bz2 If everything went right we have a GUF Yocto 34 0 r5756 0 directory now so we can change into it cd GUF Yocto 34 0 r5756 0 8 3 Building the BSP for the target platform with Yocto...

Page 47: ...0x00000000 Redundant FIS 0xE0080000 0xE0080000 0x00040000 0x00000000 current FIS directory 0xE00C0000 0xE00C0000 0x00040000 0x00000000 backup logo png 0xE0100000 0x80100000 0x00020000 0x80100000 kerne...

Page 48: ...may choose 0x1F000000 To create the new root file sysetm partition on the NAND flash use RedBoot fis create b 0x80100000 l 0x1F000000 e 0x80100000 rootfs If the system asks you to increment the length...

Page 49: ...there are more hints on securing the ssh service in the chapter I 4 1 3 SSH service It is possible to restrict the users allowed using this service lock a sftp access to a subfolder only and create cu...

Page 50: ...sword changed This creates a new user user name with group user name and the home directory home user name The new user can be used to login immediately See the man page of adduser for more options 10...

Page 51: ...ser permissions concept should solve this issue The bootmode switch should be secured with restricing physical access by the mechanical construction If this is impossible it is possible to disable the...

Page 52: ...firewall root vincell iptables F 10 5 2 Using secure network protocols We strongly recommend the usage of secure network protocols E g HTTPS instead of HTTP FTPS instead of FTP or SSH instead of telne...

Page 53: ...er Manual GF_Flash N Go_Manual version pdf Contains relevant information about the BIOS boot logo display settings etc in the case that Flash N Go Boot is used as the bootloader RedBoot User Manual GF...

Page 54: ...n and ours we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed on we want its recipients to know t...

Page 55: ...ased on the Program on a volume of a storage or distribution medium does not bring the other work under the scope of this License 3 You may copy and distribute the Program or a work based on it under...

Page 56: ...ystem in reliance on consistent application of that system it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose t...

Page 57: ...al Public License as published by the Free Software Foundation either version 2 of the License or at your option any later version This program is distributed in the hope that it will be useful but WI...

Page 58: ...incorporating your program into proprietary programs If your pro gram is a subroutine library you may consider it more useful to permit linking proprietary applications with the library If this is wh...

Reviews: