GARZ&FRICKE GUF-Yocto-34.0-r5756-0-VINCELL User Manual

Embedded computer systems
Table of Contents

Advertisement

Quick Links

Yocto
User Manual
¡
GUF-Yocto-34.0-r5756-0
VINCELL
¡
Built on 11.02.2016

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the GUF-Yocto-34.0-r5756-0-VINCELL and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for GARZ&FRICKE 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 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Important hints Thank you very much for purchasing a Garz & Fricke product. Our products are dedicated to professional use and therefore we suppose extended technical knowledge and practice in working with such products. The information in this manual is subject to technical changes, particularly as a result of continuous product upgrades.
  • Page 3: Table Of Contents

    Contents Important hints Introduction Overview The bootloader The Linux kernel The root file system The partition layout Further information Accessing the target system Serial console SSH console Telnet console Uploading files with TFTP Uploading files with SFTP Services and utilities Services 4.1.1 Udev...
  • Page 4 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 6.14 Audio 6.15 SRAM 6.16 HDMI 6.16.1 HDMI as primary display 6.16.2 HDMI as secondary display 6.16.3 HDMI as mirror of the internal display 6.16.4 HDMI XML configuration Building and running a user application SDK installation Simple command-line application Qt-based GUI user application...
  • Page 5: Introduction

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 1 Introduction Garz & Fricke systems based on Freescale i.MX53 can be used with an adapted version of Linux, a royalty- free open-source operating system. The Linux kernel as provided by Garz & Fricke is based on extensions by Freescale that currently have not been contributed back into the mainline kernel.
  • Page 6: Overview

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 2 Overview A Garz & Fricke Linux System generally consists of four basic components: the bootloader the Linux kernel the root file system the device configuration These software components are usually installed on separate partitions on the backing storage of the embedded system.
  • Page 7: The Partition Layout

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 2.4 The partition layout As already stated in chapter Overview], the different components of the embedded Linux system are stored in different partitons of the backing-storage. The backing-storage type of VINCELL is NAND Flash. In addition to the partitions for the basic Linux components there may be some more partitions depending on the system configuration.
  • Page 8: Accessing The Target System

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 3 Accessing the target system A Garz & Fricke hardware platform can be accessed from a host system using the following technologies: Serial console console access over RS-232 Telnet console access over Ethernet encrypted console access and file transfer over Ethernet TFTP file downoad over Ethernet SFTP...
  • Page 9: Ssh Console

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Note: Although the serial connection over USB is easy to setup, there are some disadvantages over the RS232 connection: The output of the bootloader and the boot messages are not shown. The first thing you see is the login shell.
  • Page 10: Uploading Files With Tftp

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ $ telnet 192.168.1.1 The login prompt appears and you can login with username and password: Trying 192.168.1.1... Connected to 192.168.1.1. Escape character is '^]'. vincell login: root Password: [Enter password] root@vincell:~# 3.4 Uploading files with TFTP You can copy files from the host system to the target system using the target’s TFTP client.
  • Page 11 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ user root and no password.
  • Page 12: Services And Utilities

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 4 Services and utilities The Garz & Fricke Linux BSP includes several useful services for flexible application handling. Some of them are just run-once services directly after the OS has been started, others are available permanently. 4.1 Services The services on Garz &...
  • Page 13: Udev

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ . /etc/profile case "$\$$1" in start) # Add here command that should execute during system startup. stop) # Add here command that should execute during system shutdown. echo "Usage: ... " >&2 exit 1 esac To create the startup links, put the above script into /etc/init.d/myapp...
  • Page 14: D-Bus

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Udev can be configured in /etc/udev/udev.conf. More information about udev can be found at: https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html 4.1.2 D-Bus dbus service is a message bus system, a simple way for applications to communicate with each another. Additionally, D-Bus helps coordinating the process lifecycle: it makes it simple and reliable to code a single instance...
  • Page 15: Telnet Service

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ generating ssh ED25519 key... Restarting OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 1108) root@gufboardll:~# ll /etc/ssh/ * key * -rw------- 1 root root 668 Sep 23 13:06 /etc/ssh/ssh_host_dsa_key -rw-r--r-- 1 root root 607 Sep 23 13:06 /etc/ssh/ssh_host_dsa_key. -rw------- 1 root root...
  • Page 16: Module Loading

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Note: Due to the fact that telnet does not use encryption, it is recommended to deactivate this service in final products in order to avoid security leaks. Disabling services is described in the chapter Services].
  • Page 17: Autocopy

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ /etc/rcS.d/S24sharedconf -> /etc/init.d/sharedconf 4.1.8 Autocopy This service is executed after the OS has booted and when a storage medium has been inserted. It is triggered together with the the Autostart service (see chapter 4.1.9 Autostart]) via UDEV.
  • Page 18 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Figure 4: Automatic transfer process from storage medium (left hand) to the targets root file system (right hand) after plugging the storage Warning: The user should be carefull by copying system files that may lead to an unusable system. Garz &...
  • Page 19: Autostart

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Notes: sconfig replies with its usage-information you still have an OS installed, which doesn’t support en- abling/disabling individual autojob functions. Please update your OS in this case. If querying an autojob function returns no reply, at all, your XML-configuration probably doesn’t contain explicit settings for the autojob functions, yet.
  • Page 20: Cron

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ rbcfg-enable-autojobs.xml: Enables all autojob functions (default behaviour). rbcfg-disable-autojobs.xml: Disables all autojob functions. These may be installed like all other XML-configuration files via the xconfig tool, e.g.: root@santaro:~# export TFTP=172.20.0.146 root@santaro:~# curl tftp://$TFTP/rbcfg-enable-autojobs.xml > /tmp/cfg.xml root@santaro:~# xconfig import -y /tmp/cfg.xml Afterwards you can query and enable/disable each autojob...
  • Page 21: Utilities

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 4.2 Utilities 4.2.1 Garz & Fricke system configuration /etc/init.d/sharedconf script (see 4.1.7 Garz & Fricke shared configuration]) can be used to change the shared system configuration. For this purpose, there is a link to the script at /usr/bin/sconfig which can be called without the absolute path:...
  • Page 22: Sendmail

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ RTC: The CPU internal RTC can be configured to wake up the system after a specified time. The following command wakes the system up at 20 seconds after the command has been executed: root@vincell:~# echo +20 > /sys/class/rtc/rtc0/wakealarm RS232/RS485/MDB: All serial interfaces can be configured to wake up the system on incoming bytes.
  • Page 23: Add-On Packages

    IP-address in the following example to the IP-address of your Host-PC and may have to change the name of the RPM-package you want to install (Garz & Fricke will eventually supply different Chromium versions for each platform). $ export TFTP=172.20.9.107 $ curl tftp://$TFTP/GUF-Yocto-34.0-r5756-0-VINCELL-chromium-42.0.2311.90-r0.rpm >/tmp /chromium.rpm $ rpm -i /tmp/chromium.rpm $ sync This may take a moment and shortly afterwards Chromium should already start automatically.
  • Page 24: Deinstallation

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Note: Installing multiple different versions at the same time on a system is currently not supported, i.e. if you want to install a different version than you already may have installed on your device, you must deinstall the previous version first.
  • Page 25: Soft-Keyboard

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ $ /etc/init.d/chromium stop $ Chromium --show-fps --kiosk --incognito http://www.garz-fricke.com A list of all Chromium command-line options is available here: http://peter.sh/experiments/chromium-command-line-switches/ Not all command-line options are supported by all versions or builds of the Chromium browser, though, and Chromium does not complain about command-line options it does not recognize, but just ignores them silently, instead.
  • Page 26: Accessing The Hardware

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 6 Accessing the hardware This chapter gives a short overview of how to access the different hardware parts and interfaces from within the Linux operating system. It is written universally in order to fit all Garz & Fricke platforms in general. 6.1 Digital I/O The digital I/O pins for a platform are controlled by the kernel’s GPIO Library...
  • Page 27: Serial Interfaces (Rs-232 / Rs-485 / Mdb)

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ A more detailed documentation of the GPIO handling in the Linux kernel can be found in the documentation directory of the Linux kernel source tree. 6.2 Serial interfaces (RS-232 / RS-485 / MDB) Most of the serial interfaces are exported as TTY devices and thus accessible via their device nodes under /dev/t- tymxc<number>.
  • Page 28: Spi

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ root@vincell:~# hwclock --show Fri Jun 1 14:51:12 UTC 2012 The RTC time cannot be adjusted directly in one command because only the current system time can be trans- ferred to the RTC. Thus, the system time has to be set first, using the date command, and can then be written to the RTC:...
  • Page 29: Can

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ The header for i2c-dev is available under: include/linux/i2c-dev.h Note: If i2c-dev is used to access the I2C bus directly, the user is responible for keeping the interop- erability consistent with all other I2C devices that are controlled by the Linux kernel. 6.7 CAN CAN bus devices are controlled through the SocketCAN framework in the Linux kernel.
  • Page 30: Usb

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ struct can_frame frame; nbytes = read(iSock, &frame, sizeof(frame)); if (nbytes > 0) { printf("ID=0x%X DLC=%d data[0]=0x%X\n", frame.can_id, frame.can_dlc, frame.data[0]); Example 5 shows how a CAN message with four bytes with the standard ID 0x20 is sent on can0 from the Linux shell, using the...
  • Page 31: Display Power

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ USB Serial Gadget Again, further drivers can be activated by reconfiguring the Linux kernel. The USB Device drivers are not compiled into the kernel by default, but are located as modules in the file system. In order to use the Serial Gadget for example, the according module has to be loaded: root@vincell:~# modprobe g_serial The Serial Gadget creates a virtual serial port over USB, accessible via the device node /dev/ttyGS0.
  • Page 32: Temperature Sensor

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ If the first partition on an SD card or a USB mass storage device already contains a file system when it is plugged into the device, it is mounted automatically by the udev service. SD card partitions are mounted to mount point /media/mmcblk0pX with X being a positive number, and USB mass storage devices are mounted to mount point /media/sdXY...
  • Page 33: Sram

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ amixer, alsactl) for controlling and accessing the audio hardware from user applications or the console. Please refer to the official ALSA webpage for a full documentation: http://www.alsa-project.org For a quick start here are three short examples of how to play/record an audio file and how to adjust the playback volume.
  • Page 34: Hdmi As Secondary Display

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ The resolution is configured automatically via EDID. The monitor is registered as framebuffer /dev/fb0. To over- write the resolution from the EDID an xml file can be used 6.16.4 HDMI XML configuration]. Note: The bootlogo will still come up in the resolution read from the EDID, but the X Server will use the resolution configured via xml.
  • Page 35 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ lower=<value> : lower margin (in pixel lines) hslen=<value> : horizontal sync length ( in pixels) vslen=<value> : vertical sync length (in pixel lines) Display flags: accel=<value> : hardware text acceleration enable (false or true) hsync=<value>...
  • Page 36: Building And Running A User Application

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 7 Building and running a user application There are two general ways of building your own native application for the target: it can be built either manually, using the cross toolchain of the SDK, or integrated into the BSP, using Yocto and bitbake as a build system. Integrating the application into the BSP build process is the more complex way and useful only if you have modified the BSP and want to deploy a complete root file system image to the target anyway (see 8 Building...
  • Page 37: Qt-Based Gui User Application

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ cout << "Hello World!" << endl; return 0; Edit the contents of the Makefile as follows: myapp: main.cpp $(CXX) ${CXXFLAGS} -o $@ $< $(STRIP) $@ clean: rm -f myapp * .o * ~ * .bak It is necessary to setup your build environment so that the complier, headers and libraries can be found.
  • Page 38: Using The Qt Creator Ide

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ TEMPLATE = app TARGET = myqtapp QT = core gui widgets SOURCES += \ 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.
  • Page 39 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ $ source /opt/guf/GUF-Yocto-34.0-r5756-0-sdk/environment-setup-vincell-guf-linux-gnueabi Now that this console session is prepared, start the Qt Creator: $ qtcreator & During the first start after installation you need to configure the Qt Creator to use the correct toolchain and to deploy to the correct device.
  • Page 40 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Figure 7: Qt Creator compiler options Optionally the debugger could be configured in the the Debuggers section. Press add to create a new debugger entry and enter the here: Path /opt/guf/GUF-Yocto-34.0-r5756-0-sdk/sysroots/x86_64-gufsdk-linux/usr/bin/arm-guf- linux-gnueabi/arm-guf-linux-gnueabi-gdb The next step is checking the version the section.
  • Page 41: Developing With Qt Creator

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Please note that the Qt mkspec will hide after setting. Figure 9: Qt Creator kits options If you want to use the debugger open the Debugger view on the left pane of the dialog. In the section add the following into the Additional Startup Commands...
  • Page 42: Autostart Mechanism For User Applications

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Figure 11: Qt Creator kit selection After finishing the wizard you should see the opened main.qml and the project files. Figure 12: The first Qt Quick application in Qt Creator You can now build and deploy the application by clicking the button (the play button in the left bottom corner) or using the shortcut Ctrl-R.
  • Page 43 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ start stop The command can be called by hand to start or stop a specific service. In order to start a service automatically during system boot, a link to the script has to be created in the /etc/rc.d directory.
  • Page 44: Configuring The Qt Webkit Demo

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ root@vincell:~# update-rc.d -f qt4-guf-demo remove After system reboot your application will start automatically. 7.6 Configuring the Qt Webkit demo The Linux BSP for VINCELL contains a small Qt Webkit demo application, which simply displays a website over the whole screen.
  • Page 45: Building A Garz & Fricke Yocto Linux System From Source

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 8 Building a Garz & Fricke Yocto Linux system from source This chapter describes how to build a Yocto based Linux BSP for a Garz & Fricke platform from source. All steps, including the installation of the build system and the required toolchains, are covered here. 8.1 General information about Garz &...
  • Page 46: Download And Install The Garz & Fricke Yocto Bsp

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ To distinguish between the native GNU toolchain and the GNU cross toolchain, the GNU cross tools are prefixed with a triplet. E.g. if the toolchain produces opcode for an ARMv5TE core having library routines that can deal with Linux system calls satisfying the EABI, the compiler is named arm-v5te-linux-gnueabi-gcc, the assembler is named arm-v5te-linux-gnueabi-as, and so on.
  • Page 47: Deploying The Linux System To The Target

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 9 Deploying the Linux system to the target When the development phase has finished, the kernel and the root file system can be written into the system’s NAND flash memory and executed from there. In chapter 8.3 Building the BSP for the target platform with Yocto] we created two image files:...
  • Page 48 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ RedBoot> load -r -v -b 0x80100000 -h 192.168.1.100 root.ubi The creation of the root partition is a little different: After loading the file to the target RAM you have to determine the file size of the image. The address range is shown in the console output, e.g.: [...] Raw file loaded Entry point: 0x80100000, address range: 0x80100000-0x81ebffff...
  • Page 49: Securing The Device

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 10 Securing the device The meaning of security for embedded systems is often underestimated. This chapter should sensitize customers to the needs of security and disclose some of the typical security holes. It also provides some tips and hints for the implementation of well chosen security mechanisms.
  • Page 50: Non Root User

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ Blocking root access Linux offers the opportunity to disable the root-login for specific services like ssh, or the serial console. Since the root login is is always a popular target for attackers this easy mechanism will decrease the risk for those kinds of brute force attacks.
  • Page 51: Autostart

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 10.3 autostart Garz & Fricke devices are equipped with an 4.1.9 Autostart] 4.1.8 Autocopy] service. As this service executes anything with root privileges without further checking, this is a possible vulnerability. Restricting the physical access to the interfaces by the mechanical construction is one way to reduce the risk of attacks.
  • Page 52: Using Secure Network Protocols

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ root@vincell:~# iptables -F root@vincell:~# iptables -A INPUT -j DROP This is the first step is a mandatory preparation for the following steps Open SSH access only: root@vincell:~# iptables -I INPUT 1 -i eth0 -p tcp --dport 22 -m state --state NEW, ESTABLISHED -j ACCEPT root@vincell:~# iptables -I OUTPUT 1 -o eth0 -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT...
  • Page 53: Related Documents And Online Support

    11 Related documents and online support This document contains product and OS specific information. Additional documentation is available for the use of the bootloader. Title File Name Description GUF-Yocto-34.0-r5756-0-VINCELL-release-notes.html Contains details about the Yocto Yocto release: change history, known Release restrictions, performed tests, etc.
  • Page 54: Agnu General Public License V2

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ A GNU General Public License v2 Version 2, June 1991 Copyright ©1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
  • Page 55 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date...
  • Page 56 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License.
  • Page 57: End Of Terms And Conditions

    GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PRO- GRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE...
  • Page 58 GUF-Yocto-34.0-r5756-0 VINCELL User Manual ¡ ¡ This General Public License does not permit 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.

Table of Contents