FAQ General: Difference between revisions

From Wiki-DB
Jump to navigationJump to search
Lzenz (talk | contribs)
Lzenz (talk | contribs)
Line 155: Line 155:
<tt> /sys/class/thermal/thermal_zone0 </tt><br/>
<tt> /sys/class/thermal/thermal_zone0 </tt><br/>
<tt> /sys/class/thermal/thermal_zone0/trip_point_0_temp </tt> (critical trip point)<br/>  
<tt> /sys/class/thermal/thermal_zone0/trip_point_0_temp </tt> (critical trip point)<br/>  
<tt> /sys/class/thermal/thermal_zone0/trip_point_1_temp </tt>(passive trip point)<br/>  
<tt> /sys/class/thermal/thermal_zone0/trip_point_1_temp </tt> (passive trip point)<br/>  
|}
|}
'''Attention:''' The thermal driver does not detect the thermal grade of your SoC. This does mean that you have to adjust the thresholds in some cases.
'''Attention:''' The thermal driver does not detect the thermal grade of your SoC. This does mean that you have to adjust the thresholds in some cases.
==== ''Thermal Management: i.MX6 Vivante GPU'' ====
The Vivante GPU does some frequency scaling based on temperature which enabled by default in the Vivante driver.  If enabled the driver will scale the GPU frequency down by a specified divisor. By default it is 1/64. Please have a look the your sysfs (when using 3.10.17_1.0.2 Kernel):
{| class="wikitable" | style="width: 100%; color: #000000; background: #FFFFFF;" valign="top" |
|
<tt> echo 3 > /sys/module/galcore/parameters/gpu3DMinClock  </tt> # set gpu frequency divisor to 3/64
|}
Remark: It is possible to do some further customizations at other parameters, too. This should be done depending your use case.

Revision as of 12:40, 4 November 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”

Bootloader

How can I access the bootloader u-boot console?

It is not possible to enter to the bootloader console by pressing a various key (e.g. "Enter") on your keyboard. You have to send "DEL" (ASCII 0x7F) to the device. We recommend you to use the terminal program teraterm if you are working on windows and to use kermit or minicom if you use a linux operating system on your pc.

  • You can configure teraterm to send "DEL" when the delete key or the backspace key is pressed by clicking through the menu to Setup->Keyboard-Setup and enable the required checkbox.
  • Kermit is sending a "DEL" if you hit the backspace key.
  • Minicom is able to send "DEL" when you hit the backspace key if you configure minicom to do that within a terminal window: run $ minicom -s and navigate to Screen and keyboard press "B"

The automatic update does not execute before the operating system boots!

Check if the command update auto is included in the bootloader environment variable bootcmd or in a script-variable which is called within bootcmd before bootm .

The automatic update does not work with my desired update-media!

The command update auto can be configured with flags within the DHCOM settings.bin block. It is possible to disable a interface for the update mechanism. You can run a update from a disabled interface if you use the command update without the argument auto .

Which USB Port should i use to run updates with the bootloader?

Our systems are designed to run updates via the DHCOM USB Host 1 interface. We can support additional usb nterfaces on request.

My usb stick (flash memory) device is not recognized by the bootloader

The are limitations when you use usb flash memory devices with u-boot. Please check that a master boot record is available and that a FAT32 filesystem is used on the first primary partition of the device. Please use gparted to format the device.

Linux

How to handle "FATAL: Could not load /lib/modules/.../modules.dep: No such file or directory"?

Check the path to your loadable kernel modules. It has to be /lib/modules/$(uname -r). If your system works without loadable Linux kernel modules:

# mkdir /lib/modules/$(uname -r)
# depmod –m

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

How to use the GPIO sysfs?

export

# echo <GPIO#> >/sys/class/gpio/export

Remark: Have a look into /sys/class/gpio/ for already configured gpios.

Set direction

# echo in >/sys/class/gpio/gpio<GPIO#>/direction
# echo out >/sys/class/gpio/gpio<GPIO#>/direction

Set state

# echo 0 >/sys/class/gpio/gpio<GPIO#>/value
# echo 1 >/sys/class/gpio/gpio<GPIO#>/value

unexport

# echo <GPIO#> >/sys/class/gpio/unexport

I want to use GPIO buttons/keys

We recommend to add a gpio-keys section to the devicetree of your board. For example:

gpio-keys {
	compatible = "gpio-keys";

	volume-up {
		label = "Volume Up";
		gpios = <&gpio1 4 0>;
		gpio-key,wakeup;
		linux,code = <115>; /* KEY_VOLUMEUP */
	};

	volume-down {
		label = "Volume Down";
		gpios = <&gpio1 5 0>;
		gpio-key,wakeup;
		linux,code = <114>; /* KEY_VOLUMEDOWN */
	};
};

Please check for the "input/gpio-keys.c" driver to be enabled. For further details how to customize the device tree please refer to www.kernel.org.

You should get a device /dev/input/eventX which provides the key events. Validate your configuration with cat /dev/input/eventX or use "evtest" which is available on debian .

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 enabled 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.org

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'

Power Management

How to use CPU Frequency scaling?

If your target supports CPU Frequency scaling (e.g. DHCOM i.MX6, DHCOM AM335x) it is possible to change the clock speed of CPUs on the fly. Check if CONFIG_CPU_FREQ=y is enabled in your kernel configuration. Note that this driver doesn't automatically change the CPU clock speed, you need to either enable a dynamic cpufreq governor after boot, or use a userspace tool. Have a look at the cpufreq user guide.

  • So far we use the CPU Frequency scaling with the dynamic cpufreq governor. Please have a look at www.kernel.org.

Thermal Management: Reasonable Values For Thermal Thresholds

To get some general information we reference to www.kernel.org. The general meaning of passive and critical threshold:

  • The passive trip point is a preventative measure before reaching critical that does things to lower temperature such as reducing cpu/gpu frequencies
  • The critical trip point should not be exceeded to avoid damaging the SoC and as such when this threshold is reached the operating systems shutdown function is called to attempt to shut down the OS.

An (carefully) example for industrial grade i.MX6 SoC (-40 to 105C):

  • critical Trip Point = maxT – 5C = 100C
  • passive Trip Point = maxT – 20C = 85C

Sysfs path on i.MX6 with Linux Kernel based on Freescale 3.10.17_1.0.2

/sys/class/thermal/thermal_zone0
/sys/class/thermal/thermal_zone0/trip_point_0_temp (critical trip point)
/sys/class/thermal/thermal_zone0/trip_point_1_temp (passive trip point)

Attention: The thermal driver does not detect the thermal grade of your SoC. This does mean that you have to adjust the thresholds in some cases.

Thermal Management: i.MX6 Vivante GPU

The Vivante GPU does some frequency scaling based on temperature which enabled by default in the Vivante driver. If enabled the driver will scale the GPU frequency down by a specified divisor. By default it is 1/64. Please have a look the your sysfs (when using 3.10.17_1.0.2 Kernel):

echo 3 > /sys/module/galcore/parameters/gpu3DMinClock # set gpu frequency divisor to 3/64

Remark: It is possible to do some further customizations at other parameters, too. This should be done depending your use case.