background image

GUF-Yocto-jethro-9.0-r7707-0

i.MX6

User Manual

4.2

Utilities

4.2.1 Garz & Fricke system configuration

The

/etc/init.d/sharedconf

script (see

[

I

4.1.8 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:

root@santaro:~# sconfig

If called without any parameters, the command prints the usage:

Usage: /usr/bin/sconfig {start | list | <setting> [value]}

Call without [value] to read a setting, call with [value] to write it.

Available settings:

serialdiag

switch serial debug console on or off

dhcp

switch DHCP on or off

ip

set IP address

mask

set subnet mask

gateway

set standard network gateway

mac

set MAC address

name

set device name

serial

set serial number (affects MAC address and device name)

rotation

set display rotation

If a 2.Ethernet is present, it may be configured via serial2, mac2, etc.

If a WLAN adapter is present, it may be configured via dhcp_wlan, ip_wlan, etc.

If a WLAN AP configuration is present, it may be configured via ssid_wlan, proto_wlan

,!

and psk_wlan

If the script is called with a setting as parameter, the setting is read from the XML configuration and displayed
on the console. If additionally 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 number>.

Example 1:

To activate DHCP on the device, type:

root@santaro:~# sconfig dhcp on

Example 2:

To deactivate DHCP and set a static IP address, type:

root@santaro:~# sconfig dhcp off

root@santaro:~# sconfig ip 192.168.1.123

Note:

The settings require a reboot to take effect.

There are some settings only available, if the corresponding XML default configuration is installed for this feature
as indicated by the help message.

Currently these features are:

Second network interface

WLAN interface

WLAN AP configuration

Please contact Garz & Fricke support if a configuration is missing though the corresponding hardware is present.

The full option list can be displayed with the

list

option of sconfig:

24

Summary of Contents for GUF-Yocto-jethro-10.0-r7885-0

Page 1: ...Yocto User Manual GUF Yocto jethro 9 0 r7707 0 i MX6 Built on 18 08 2017...

Page 2: ...ke 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 possib...

Page 3: ...red configuration 18 4 1 9 Autocopy 18 4 1 10 Autostart 20 4 1 11 Cron 21 4 2 Utilities 22 4 2 1 Garz Fricke system configuration 22 4 2 2 Power down mode 24 4 2 3 Reboot Halt and Poweroff 24 4 2 4 Ke...

Page 4: ...8 Building a Garz Fricke Yocto Linux system from source 55 8 1 General information about Garz Fricke Yocto Linux systems 55 8 2 Build requirements 55 8 3 Download and installation of the Garz Fricke...

Page 5: ...bugging 65 11 1 7 Known issues 65 11 2 Simple command line application debugging 66 11 2 1 KDbg as simple GUI debug frontend 68 11 3 Qt application debugging 72 12 Related documents and online support...

Page 6: ...MX6 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 7: ...c 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 and...

Page 8: ...n start the following Linux kernel image types zImage compressed image uImage compressed image with u boot header Image uncompressed image 2 5 Further information For readers who are not familar with...

Page 9: ...http ecos sourceware org docs latest redboot redboot guide html Information about the Yocto Project can be found at I https www yoctoproject org Documentation of the Yocto Project can be found at I ht...

Page 10: ...are two way to connect the serial console RS232 on Molex Micro Fit connector Virtual console over USB To use the RS232 connection connect the first RS232 port of your target system using to a COM por...

Page 11: ...inished you will see the Linux login shell Garz Fricke Yocto BSP based on Poky VERSION santaro dev ttymxc0 santaro login You can log in as user root without any password by default 3 2 SSH console Usi...

Page 12: ...x distribution To install the TFTP server under Debian based systems with apt the following command must be executed on the host system sudo apt get install xinetd tftpd tftp The TFTP server must be c...

Page 13: ...system type root santaro tftp g 192 168 1 100 r myapp l usr bin myapp 3 5 Uploading files with SFTP You can exchange files between the host system and the target system using an SFTP Secure FTP clien...

Page 14: ...l3 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 exe...

Page 15: ...app 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...

Page 16: ...b 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 a...

Page 17: ...config 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 ho...

Page 18: ...t simply looks which modules 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 modul...

Page 19: ...ks with root santaro update rc d watchdog sh defaults The watchdog service is configured using the configuration file etc watchdog conf ping 172 31 14 1 ping 172 26 1 255 interface eth0 file var log m...

Page 20: ...ocopy on a USB stick SD card or in the NAND flash will be copied to the root of the device resp its equivalent targets Non existing folders will be created automatically The autocopy mechanism include...

Page 21: ...tion 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 X...

Page 22: ...lready stated in I 4 1 9 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 p...

Page 23: ...l 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 a...

Page 24: ...configured via dhcp_wlan ip_wlan etc If a WLAN AP configuration is present it may be configured via ssid_wlan proto_wlan and psk_wlan If the script is called with a setting as parameter the setting i...

Page 25: ...se guest IP is obtained by DHCP root santaro sconfig dhcp_wlan on root santaro sconfig ssid_wlan GuestNet root santaro sconfig proto_wlan RSN root santaro sconfig psk_wlan guest Note The settings requ...

Page 26: ...mmand root santaro echo mem sys power state The average time it takes to enter power down mode has been measured 364 5 ms last byte on UART RX until voltage drop on VDDSOC There are different possibil...

Page 27: ...no user processes are running anymore and all data has been written back to storage media If you d like to e g turn off the display when the halt and poweroff commands are issued you may do so yourse...

Page 28: ...ftp g r rb logolicense xml 192 168 1 100 root santaro xconfig import b rb logolicense xml Because the bootlogo has to be shown as early as possible the Linux kernel cannot wait until the file system i...

Page 29: ...uld not be used too extensive due to the additional demand on system memory Closing these views is due to the web page s implemenation as well as implementing forward and backward functionality if nee...

Page 30: ...1 shows how to configure the parameters of the progress bar To configure the progress bar a configuration file needs to be created root santaro touch etc progress_bar conf Calling root santaro nano et...

Page 31: ...nd emails from the device The sendmail tool is based on busybox and has no configuration files Everything is passed via command line The mail is passed using stdin For a simple test the following can...

Page 32: ...ns for GUF Yocto jethro 9 0 r7707 0 cups debug qt and gpu examples Install add on using the script add ons install cups Remove add on using the script Deinstallation of an add on works with the add on...

Page 33: ...t it will work with CUPS on Yocto However Garz Fricke cannot guarantee support for any given printer except for those listed in the release notes 5 1 1 Installation The CUPS add on is installed as des...

Page 34: ...lgrind quick start guide is located at I http valgrind org docs manual QuickStart html The default instrumentation performs a memory check As an example we inspect the bin true executable valgrind bin...

Page 35: ...s located at I http www ex parrot com pdw iftop The tool presents an interactive user interface started with the following command to stop the tool hit Q iftop tcpdump tcpdump is a command line packet...

Page 36: ...the 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 f...

Page 37: ...85_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 r...

Page 38: ...d The actual pin mapping is described in the hardware guide for your device There are three available functions GPIO keypad gpio All pins are available as gpios You can access them in usermode using t...

Page 39: ...x spi spidev h Note If spidev is used to access the SPI bus directly the user is responible for keeping the interoper ability consistent with all other SPI devices that are controlled by the Linux ker...

Page 40: ...NOT work on Garz Fricke Linux systems root santaro ip link set can0 type can bitrate 125000 root santaro ifconfig can0 up As already stated above CAN messages can be sent through the BSD Socket API T...

Page 41: ...latforms per default support the following devices USB Mass Storage USB Keyboard There are many more device drivers available in the Linux kernel They are not activated by default because Garz Fricke...

Page 42: ...ork across all platforms since the file otg_id_pin_emulation exists in only one of these paths Note We are not liable for system instability or hardware damages if the software emulation does not corr...

Page 43: ...d 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 mmc...

Page 44: ...re from user applications or the console Please refer to the official ALSA webpage for a full documentation I http www alsa project org For a quick start here are three short examples of how to play r...

Page 45: ...ad from the EDID but the X Server will use the resolution configured via xml 6 17 2 HDMI as secondary display The HDMI output can also be used as secondary display This mode is automatically selected...

Page 46: ...per value upper margin in pixel lines 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 har...

Page 47: ...ant generally uses the configuration in etc wpa_supplicant conf However on Garz Fricke systems there is a service called sharedconf as described in I 4 1 8 Garz Fricke shared configuration that genera...

Page 48: ...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 4 Building the BSP for the target platform I http supp...

Page 49: ...o the 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 right...

Page 50: ...iguring 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...

Page 51: ...left pane of the dialog open the Devices view Add a new Generic Linux Device and configure IP and credentials according to your target settings The IP address depends on the configuration factory defa...

Page 52: ...the version the Qt Versions section It should be set to opt guf GUF Yocto jethro 9 0 r7707 0 sdk sysroots x86_64 gufsdk linux usr bin qt5 qmake as seen in I Figure 12 Figure 12 Qt Creator Qt Versions...

Page 53: ...t Quick 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 co...

Page 54: ...ld 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...

Page 55: ...sh 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 b...

Page 56: ...GUF Yocto jethro 9 0 r7707 0 i MX6 User Manual root santaro update rc d f qt guf demo remove After system reboot your application will start automatically 56...

Page 57: ...d in the BSP release notes under Software Dependencies The official Yocto documentation lists which packages have to be installed in order to be able to compile a Yocto image I https www yoctoproject...

Page 58: ...online in the OpenEmbedded Bitbake Manual I http www yoctoproject org docs 2 0 bitbake user manual bitbake user manual html Yocto builds the images from build descriptions called recipes The recipe to...

Page 59: ...command is permanent i e the next boot of the device will start Flash N Go System again until the bootmode is set back to regular operation FLASH N GO bootselect regular Alternatively the bootmode can...

Page 60: ...stall sh tmp a sh sh tmp a sh The above command loads the fng install sh script from your TFTP server to the tmp directory of the Flash N Go System and executes it from there During execution of the s...

Page 61: ...rver directory FLASH N GO export TFTP 192 168 1 100 curl tftp TFTP fng install sh tmp a sh sh tmp a sh Image my logo png Note Be aware that the boot logo needs a license either embedded into logo itse...

Page 62: ...t 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...

Page 63: ...assword 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...

Page 64: ...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 65: ...e firewall root santaro 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 tel...

Page 66: ...rce code on the target device since it is not needed for normal operation and would consume a lot of disk space 11 1 3 Optimization compiler flags destroy high level language code stepping Optimizatio...

Page 67: ...code vs kernel code debugging As already stated above the kernel is treated differently with respect to debugging Apart from the already explained different debug agents to use kernel debugging requi...

Page 68: ...RIP clean rm f myapp o bak Since the code is debugged with O2 optimization the debugger can t cleanly relate object code to high level source lines That will result in problems on high level language...

Page 69: ...nd assures that the debugger can access all SDK source codes that are eventually accessed by the debug session e g setpping into a library call Every source path found in the specified directory is pa...

Page 70: ...tack gdb bt 0 main argc 1 argv 0x7efffe14 at main cpp 7 Show the contents of a variaable or more complex data type gdb p argv 1 0x7effff05 tmp myapp Step over gdb n 8 return 0 List code gdb l 3 using...

Page 71: ...ptions dialog Set up How to invoke GDB in the dialog as shown in I Figure 19 as follows arm guf linux gnueabi gdb iex set sysroot opt guf GUF Yocto jethro 9 0 r7707 0 sdk sysroots imx6guf guf linux gn...

Page 72: ...y ssh root 172 20 55 89 gdbserver 2345 tmp myapp Start KDbg again with connecting to target device with the follwoing command out of the myapp directory kdbg r 172 20 55 89 myapp The KDbg opens again...

Page 73: ...as shown in I Figure 21 Figure 22 KDbg breakpoint setup Now a breakpoint can be set by right clicking on the deired instruction as shown in I Figure 22 Figure 23 KDbg run command By selecting Executi...

Page 74: ...tp www kdbg org manual 11 3 Qt application debugging Based on the Qt Creator setup discussed in I 7 4 Using the Qt Creator IDE this chapter demonstate a simple Qt Widget application debugging session...

Page 75: ...ator new project creation Create a new project through File New file or project as shown in I Figure 25 Figure 26 Qt Creator Qt Widget Application project type selection Select Qt Widgets Application...

Page 76: ...evelopment kit that was created and configured in I 7 4 2 Developing with Qt Creator as shown in I Figure 28 Figure 29 Qt Creator project main class information Leave the default widget class creation...

Page 77: ...es to myqtapp pro to set up the installation path of the myqtapp application linux target path tmp INSTALLS target as shown in I Figure 31 We select tmp here Figure 32 Qt Creator custom remote command...

Page 78: ...wn in I Figure 33 to make sure that the automatically Garz Fricke demo is stopped if it s running From I Figure 33 we can further see that the remote installation directory we set up previously is now...

Page 79: ...35 Qt Creator debug start and breakpint hit Finally debugging can be started s shown in I Figure 35 For more information about Qt Creator debugging consult the debugging part of the reference manual...

Page 80: ...em User 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 Red Boot User Man...

Page 81: ...ion 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...

Page 82: ...based 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 unde...

Page 83: ...system 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...

Page 84: ...eral 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...

Page 85: ...it 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...

Page 86: ...Operating System OS Type Yocto Linux OS Distribution Version 2 0 Jethro OS Release Version jethro 9 0 r7707 0 B 2 Bootloader Bootloader Type Flash N Go Boot Bootloader Revision 9 0r3476 B 3 Boot Logo...

Page 87: ...not available RPC sunrpc portmapper 111 X SNMP Server 161 not available OpenVPN 1194 UDP CUPS 631 X11 6000 X B 7 Display The display orientation of the device is by default landscape The most connecto...

Reviews: