FAQ General: Difference between revisions

From Wiki-DB
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
:'''Q: Do the DHCOM modules have a serial numbers included? If yes, how is it accessible? '''
__TOC__
:'''A:''' The serial number of a DHCOM module is stored inside the bootloader environment. It can be retrieved by u-boot commands like printenv or by Linux commands like “fw_printenv”.


== General ==
==== ''Do the DHCOM modules have a serial numbers included? If yes, how is it accessible?'' ====
The serial number of a DHCOM module is stored inside the bootloader environment. It can be retrieved by u-boot commands like printenv or by Linux commands like “fw_printenv”.


:'''Q: We would like to use ubifs for rootfilesystem.'''
== Linux ==
:'''A:''' Ubifs is the standard NAND flash file system (FFS) for DHCOM.
=== NAND ===
==== ''We would like to use UBIFS for the root filesystem volume.'' ====
UBI/UBIFS is the standard file system for DHCOM systems with NAND flash storage.


==== ''We have the need for additional UBI/UBIFS volumens (partitions).'' ====
It shouldn't be necessary to make changes in the Bootloader u-boot, the Linux kernel, or devicetree. We recommend to use the available NAND Flash storage as a single UBI partition and create if needed multiple UBIFS volumes on it.


:'''Q: We have the need for additional UBI volumens (partitions).'''
==== ''We want to backup the root filesystem from the NAND-Flash of the target.'' ====
:'''A:''' It shouldn't be necessary to make changes in u-boot, Linux kernel or devicetree.
You can use the DHCOM Update Mechanism of root filesystem of the bootloader for the rootfs in the backup mode. This feature is available on i.MX25 and AM35x DHCOMs. Further information at: [[DHCOM Update: Linux Root Filesystem|DHCOM Update: Linux Root Filesystem]]


=== GPIOs ===
==== ''We want to use GPIO buttons/keys.'' ====


:'''Q: We want to backup the root filesystem from the NAND-Flash of the target.'''
For further details how to customize the device tree please refer to [https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt www.kernel.org].
:'''A:''' You can use the DHCOM Update Mechanism of root filesystem of the bootloader for the rootfs in the backup mode. Further information at: [[DHCOM Update: Linux Root Filesystem|DHCOM Update: Linux Root Filesystem]]


==== ''How to cleanly shutdown the target using a GPIO?'' ====
A common solution is to define a [[FAQ_General#We want to use GPIO buttons/keys. | gpio key]]''' '''"KEY_POWER"''' in the devicetree of your target. Please have a look on the following example:
gpio-keys {
    compatible = "gpio-keys";
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_gpiopowerkey>;
    power {
            label = "Power-Key";
            gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
            linux,code = <KEY_POWER>;
            debounce-interval = <5>;
    };
};


Depending on your root filesystem configuration you have to add a daemon which handles the event. Please have a look at "esekeyd" or "triggerhappy". There are Debian Packages available ([https://packages.debian.org/search?keywords=esekeyd esekeyd][https://packages.debian.org/wheezy/triggerhappy triggerhappy ]). Alternative it is possible to use a udev rule (e.g. /etc/udev/rules.d/..).


:'''Q: We want to capture the screen content.'''
:'''A:''' The VLC media player provides the necessary features: [http://www.howtogeek.com/120202/how-to-record-your-desktop-to-a-file-or-stream-it-over-the-internet-with-vlc/ Capture Sceen Content with VLC media player: http://www.howtogeek.com] A x-window-system is required. Have a look at our Yocto tutorial: [[Building Chromium, VLC and X11VNC using Yocto | Building Chromium, VLC and X11VNC using Yocto]]


==== ''The target should power off ifself after a shutdown.'' ====
To switch off the power after shutdown you can use a GPIO. Keep in mind that the hardware design of you baseboard has to support this feature (The Premium Developer Kit does not). The Linux Kernel provides a specific GPIO power-off driver to handle this requirement. It has to be enable with CONFIG_POWER_RESET_GPIO in the kernel configuration. Add a gpio-poweroff section to the device-tree of your board:


:'''Q: View and interact (mouse, keyboard) with X displays.'''
gpio-poweroff {
:'''A:''' Install x11vnc and execute on the target. You can use ssvnc to connect via SSH. See '[[Building Chromium, VLC and X11VNC using Yocto | Building Chromium, VLC and X11VNC using Yocto]]' and 'SSVNC (SSL/SSH VNC viewer): [http://www.karlrunge.com/x11vnc/ssvnc.html http://www.karlrunge.com/x11vnc/ssvnc.html]'
    compatible = "gpio-poweroff";
    gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
};
 
Use the <tt>poweroff</tt> command to power-off the system
 
# poweroff
 
For further details please have a look at [https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt www.kernel.orf]
 
=== Features ===
==== ''We want to capture the screen content.'' ====
The VLC media player provides the necessary features: [http://www.howtogeek.com/120202/how-to-record-your-desktop-to-a-file-or-stream-it-over-the-internet-with-vlc/ Capture Sceen Content with VLC media player: http://www.howtogeek.com] A x-window-system is required. Have a look at our Yocto tutorial: [[Building Chromium, VLC and X11VNC using Yocto | Building Chromium, VLC and X11VNC using Yocto]]
 
==== ''View and interact (mouse, keyboard) with a target running the x window system.'' ====
Install x11vnc and execute on the target. You can use ssvnc to connect via SSH. See '[[Building Chromium, VLC and X11VNC using Yocto | Building Chromium, VLC and X11VNC using Yocto]]' and 'SSVNC (SSL/SSH VNC viewer): [http://www.karlrunge.com/x11vnc/ssvnc.html http://www.karlrunge.com/x11vnc/ssvnc.html]'

Revision as of 10:42, 24 July 2015

General

Do the DHCOM modules have a serial numbers included? If yes, how is it accessible?

The serial number of a DHCOM module is stored inside the bootloader environment. It can be retrieved by u-boot commands like printenv or by Linux commands like “fw_printenv”.

Linux

NAND

We would like to use UBIFS for the root filesystem volume.

UBI/UBIFS is the standard file system for DHCOM systems with NAND flash storage.

We have the need for additional UBI/UBIFS volumens (partitions).

It shouldn't be necessary to make changes in the Bootloader u-boot, the Linux kernel, or devicetree. We recommend to use the available NAND Flash storage as a single UBI partition and create if needed multiple UBIFS volumes on it.

We want to backup the root filesystem from the NAND-Flash of the target.

You can use the DHCOM Update Mechanism of root filesystem of the bootloader for the rootfs in the backup mode. This feature is available on i.MX25 and AM35x DHCOMs. Further information at: DHCOM Update: Linux Root Filesystem

GPIOs

We want to use GPIO buttons/keys.

For further details how to customize the device tree please refer to www.kernel.org.

How to cleanly shutdown the target using a GPIO?

A common solution is to define a gpio key "KEY_POWER" in the devicetree of your target. Please have a look on the following example:

gpio-keys {
   compatible = "gpio-keys";
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_gpiopowerkey>;
   power {
           label = "Power-Key";
           gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
           linux,code = <KEY_POWER>;
           debounce-interval = <5>;
   };
};

Depending on your root filesystem configuration you have to add a daemon which handles the event. Please have a look at "esekeyd" or "triggerhappy". There are Debian Packages available (esekeydtriggerhappy ). Alternative it is possible to use a udev rule (e.g. /etc/udev/rules.d/..).


The target should power off ifself after a shutdown.

To switch off the power after shutdown you can use a GPIO. Keep in mind that the hardware design of you baseboard has to support this feature (The Premium Developer Kit does not). The Linux Kernel provides a specific GPIO power-off driver to handle this requirement. It has to be enable with CONFIG_POWER_RESET_GPIO in the kernel configuration. Add a gpio-poweroff section to the device-tree of your board:

gpio-poweroff {
    compatible = "gpio-poweroff";
    gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
};

Use the poweroff command to power-off the system

# poweroff

For further details please have a look at www.kernel.orf

Features

We want to capture the screen content.

The VLC media player provides the necessary features: Capture Sceen Content with VLC media player: http://www.howtogeek.com A x-window-system is required. Have a look at our Yocto tutorial: Building Chromium, VLC and X11VNC using Yocto

View and interact (mouse, keyboard) with a target running the x window system.

Install x11vnc and execute on the target. You can use ssvnc to connect via SSH. See ' Building Chromium, VLC and X11VNC using Yocto' and 'SSVNC (SSL/SSH VNC viewer): http://www.karlrunge.com/x11vnc/ssvnc.html'