User Container
The user container setup is designed to support all the included hardware. A number of external devices will also be supported by the USB host controller. The initial support will be for audio, video and mass storage devices.
Device information
Device information can be retrieved from the device tree under kvaser-parameters.
Examples:
# Read serial number
$ cat /proc/device-tree/kvaser-parameters/serial-number
1234
# Read EAN code
$ cat /proc/device-tree/kvaser-parameters/ean
73-30130-99999-9
Planned enhancements
In the current version a reboot inside the user container will only restart the container. A command line interface(CLI) with support for host reboot and power save will be available at a later release.
The CLI will also support system updates from within the user container.
Multicolor LED Handling
The system groups red, green, and blue LEDs into multicolor LEDs using the LED class multicolor interface. This makes it convenient to manage each RGB LED as a single logical unit.
Examples:
# Check which color channels are available
$ cat /sys/class/leds/multi\:led1/multi_index
red green blue
# Set individual RGB values
$ echo 50 100 200 > /sys/class/leds/multi\:led1/multi_intensity
# Set overall brightness
$ echo 100 > /sys/class/leds/multi\:led1/brightness
Each multicolor LED "owns" the underlying color LEDs, meaning they cannot be controlled directly while bound.
If direct control of individual channels is needed, you can unbind the multicolor LED:
$ echo led1-multi > /sys/bus/platform/drivers/leds_group_multicolor/unbind
$ echo 50 > /sys/class/leds/green\:led1/brightness
Note
Unbinding disables grouped control, so RGB values can no longer be set together via the multicolor interface.
Workarounds
The following table shows some limitations when running in a container and the workarounds.
LED triggers
LED timer trigger control for delay_on/delay_off is created with wrong
user/group id. The user/group id is changed by an udev script running in the
host system.
Workaround
Add a short delay before accessing the trigger control:
echo timer > /sys/class/leds/\*/trigger
sleep 0.1
echo 100 > /sys/class/leds/\*/delay_on
System time
System time can not be set from the container.
Workaround
An ntpd service is running with privileges for setting system time. The
status of the service can be checked with commands such as ntpstat or ntpq.
No udevd
In the user container there is no udev. Standard services containing device
unit configurations wont work, i.e.
Requires=sys-subsystem-net-devices-%i.device.
Workaround
Comment out the device dependency:
$ systemctl edit --full wpa_supplicant-nl80211@.service
$ systemctl cat wpa_supplicant-nl80211@.service
# /etc/systemd/system/wpa_supplicant-nl80211@.service
[Unit]
Description=WPA supplicant daemon (interface- and nl80211 driver-specific version)
#Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
Before=network.target
Wants=network.target
...