Embedded SBC MBa8MP-RAS314 - Armbian Linux BSP documentation

Audio

Audio Connector Overview

Connector Function
X3 Headphone/Microphone

Audio Connector Location

Play Audio on MBa8MP-RAS314

A simple test sound can be played with the commandline tool speaker-test.
Headphones or active speakers have to be connected to X3 on MBa8MP-RAS314.

speaker-test --channels 2 --test wav

You can also play your own audio files using aplay

aplay <file>

e.g.

aplay test.wav
Please notice that no audio test files are available in the default image.

Record Audio via Line-In on MBa8MP-RAS314

arecord -f cd test.wav
The audio settings can be altered using amixer or alsamixer

CPU

The MBa8MP-RAS314 supports DVFS (dynamic voltage and frequency scaling, by default the governor schedutil is set. Governors are power schemes for the CPU. Only one may be active at a time.

Governor Description
performance Run the CPU at the maximum frequency.
powersave Run the CPU at the minimum frequency.
userspace Run the CPU at user specified frequencies.
ondemand Scales the frequency dynamically according to current load. Jumps to the highest frequency and then possibly back off as the idle time increases.
conservative Scales the frequency dynamically according to current load. Scales the frequency more gradually than ondemand.
schedutil Scheduler-driven CPU frequency selection

You can change the actual governor with the following command:

cpufreq-set -g <governor>
(e.g. cpufreq-set -g performance)

At runtime it is possible to disable multiple CPU cores via the Linux sysfs. On a system that has four CPU cores, the maximum of three cores can be disabled. To disable the a CPU core value 0 must be written to the CPU core specific file /sys/devices/system/cpu/cpu<N>/online where <N> is the number of the Core, the counting starts at zero.
e.g. disable CPU core 4:

echo 0 > /sys/devices/system/cpu/cpu3/online

To check which CPU core(s) are currently enabled the following command can be used:

grep "processor" /proc/cpuinfo

The CPU core can be enabled again by writing the value 1 to /sys/devices/system/cpu/cpu<N>/online.

e.g. enable CPU core 4:

echo 1 > /sys/devices/system/cpu/cpu3/online

It is possible to limit the maximium amount of cores with the the maxcpus= parameter in the kernel command line. To add the new parameter a new U-boot variable addcpu has to be created.

setenv addcpu maxcpus=${cpu_num}

The amount of cores is set by the cpu_num variable, for example if cpu num is set to 2 only two cores will be started.

setenv cpu_num 2

Ethernet

The MBa8MP-RAS314 provides two Gigabit Ethernet interfaces.

U-Boot

In U-Boot eth0 is configured as default interface. The IP configuration can be done statically or by a DHCP server in the network.

IP configuration via DHCP

For a configuration via a DHCP server, use the dhcp command in U-Boot.

Static IP configuration For a static IP configuration the following, U-Boot environment variables must be set:

setenv ipaddr <ipaddr> 
(e.g.: setenv ipaddr 192.168.100.111)
setenv netmask <netmask> 
(e.g.: setenv netmask 255.255.255.0)

Linux

Both Ethernet interfaces are activated and configured by systemd-networkd. The configuration files for the interfaces are located in /lib/systemd/network/ these configuration files can be altered to customize the default interface configuration. A documentation of the configuration files can be found here.

eth0 10-eth0.network
eth1 10-eth1.network

For a temporary static configuration the ip command can be used, below some useful ip commands are listed:

Activate a specific interface
e.g. eth0

ip link set eth0 up


Disable a specific interace
e.g. eth0

ip link set eth0 down


Show ip address for a specific interface
e.g. eth0

ip addr show eth0


Show statistic for a specific interface
e.g. eth0

 
ip -s link show eth0 


Set ip address for a specific interface
e.g. eth0

ip addr add 192.168.1.100/24 dev eth0


Show statistic of all interfaces

ip -s link


Set default gateway for a specific interfaces
e.g. set gateway ip 192.168.1.1 for eth0

ip route add default via 192.168.1.1 dev eth0

If a DHCP server is available in the network environment the ip configuration can be received from it. To do so execute the udhcpc command, by default eth0 is used.
To configure another interface via dhcp the parameter -i followed by the interface name e.g. eth1 must be given.
e.g. eth1

dhclient 

Wi-Fi

There are two ways to connect to a Wi-Fi network. Graphically or via the command line.

Using Wi-Fi on the MBa8MP-RAS314 via the command line and connecting it to a wireless network is done using nmcli, which is the command line utility for the NetworkManager and a common Linux application for identifying and configuring Internet connections.

First check the status of your network interfaces:

nmcli dev status

If you are not sure whether your Wi-Fi device is enabled or not, you can check it with this command:

nmcli radio wifi

If you want to enable or disable your Wi-Fi, use the following command:

nmcli radio wifi on
nmcli radio wifi off

If you don't know the name of your Wi-Fi network yet, you can view all available connections with the following command:

nmcli dev wifi list

If you know the name and password of your network, you can use the following command to connect to it:

sudo nmcli --ask dev wifi connect your-Wi-Fi

Enter the name of your network at “your-Wi-Fi”. After issuing the command, you will be prompted to enter your password.

GPU

Running a GPU benchmark requires a display (HDMI or LVDS) Please keep in mind to set the devicetree properly if LVDS is used.

The benchmark tools are not included in the standard image configuration. In order to use them, they have to be downloaded via APT package manager.

Please note that the glmark2 test requires a Desktop environment, while the kmscube works on both image types.
sudo apt install kmscube

or

sudo apt install glmark2-es-drm

The benchmark can be started by using the following terminal commands:

Image type Command
Minimal image
 kmscube 
Desktop environment
 glmark2-es2-drm 

HDMI

HDMI is enabled by default on all Armbian images for the MBa8MP-RAS314 board, no further configuration is required.

LVDS

TQ offers an optional LVDS Display kit for the MBa8MP-RAS314. To activate LVDS including the display configuration, the devicetree imx8mp-tqma8mpql-mba8mp-ras314-lvds.dtb has to be set in /boot/extlinux/extlinux.conf in the line beginning with “fdt”

fdt /boot/dtb/freescale/imx8mp-tqma8mpql-mba8mp-ras314-lvds.dtb

To load the LVDS devicetree restart the system.

If HDMI and LVDS are connected at the same time, the HDMI monitor is primarily selected as the output device.

RTC

Set the hardware clock to the actual time and date use the following commands:

date -s MMDDhhmmCCYY.ss
hwclock -w

SPI

The MBa8MP-RAS314 has one SPI interface, it is routed to header X1 and can be tested with a loopback test.

SPI Overview

Interface linux filesystem
SPI3 /dev/spidev3.0

Loopback Test SPI Interface

The loopback test requires a bridge between SPI_MOSI and SPI_MISO:

  • SPI3: bridge between X1_20 (ECSPI3_MISO) and X1_19 (ECSPI3_MOSI)
echo -n -e "\x01\x0F" | spi-pipe -d <spi interface> -s 10000000 | hexdump
(e.g. echo -n -e "\x01\x0F" | spi-pipe -d /dev/spidev3.0 -s 10000000 | hexdump)

Temperature Sensors

The MBa8MP-RAS314 has one temperature sensor, which is located on the TQMa8MPxL SOM.

Device I²C Address
TQMa8MPxL 0x1B

Read TQMa8MPxL Temperature Sensor

cat /sys/devices/platform/soc@0/30800000.bus/30a20000.i2c/i2c-0/0-000001b/hwmon/hwmon2/temp1_in

Read CPU internal Temperature Sensor
The i.MX8MPxL CPU has an internal TMU that supports two thermal zones, both can be read by the commands below:

Thermal zone0

cat /sys/devices/virtual/thermal/thermal_zone0/temp

Thermal zone1

cat /sys/devices/virtual/thermal/thermal_zone1/temp
The temperature is shown in millidegrees Celsius.

USB

With lsusb you can see all connected usb devices. To mount a partition of an usb stick you can excute mount /dev/<partition> <mount dir> (e.g. mount /dev/sdb1 /mnt). This will mount the first partition of sdb to /mnt. To unmount the device execute umount <mount dir> (e.g. umount /mnt).

User LED

The MBa8MP-RAS314 has two user LEDs, the behavior of these LEDs can be selected by several triggers.

User LED Overview

Reference LED name color linux filesystem
V2 green: green /sys/class/leds/green:
V3 yellow: orange /sys/class/leds/yellow:

User LED Location

The user LED's are located in /sys/devices/platform/gpio-leds/leds/.
To change the behaviour of a specific LED, the value in the file trigger must be overwritten.

The following values are valid:

For example set the trigger of “green:” to heartbeat

echo heartbeat > green:

SSH Connection

In order to access the MBa8MP-RAS314 via SSH, use the terminal and ssh command under linux or a terminal program like PuTTY under Windows. SSH requires an IP address whether via DHCP or static IP configration or the target hostname has to be used. By default the hostname is configured to mba8mpxl-ras314.

and connect to the starter kit with the IP that was assigned to the starter kit by the dhcp client, or in the terminal using

ssh root@mba8mpxl-ras314

When the system is started for the first time, the password “1234” must be used. Afterwards, in the Armbian setup, you can then set your own password.

If several MBa8MPxL-RAS314 boards with the same name are connected to the same network, connection problems may occur using SSH if they are not accessed via the IP address.

The file /etc/ssh/sshd_config is used to configure the SSH service. To be able to login with a password as user root change the following lines in the Authentication section

PermitRootLogin prohibit-password

to

PermitRootLogin yes 

and

#PasswordAuthentication yes

to

PasswordAuthentication yes

After altering the SSH configuration, the SSH service must be restarted to apply the new configuration:

systemctl restart sshd.socket

To setup a password for a user, execute the command passwd <username>, e.g. passwd root for the default user root, and set your password. Afterwards execute the login command to login the user with the new password.

Copy image from SD Card to eMMC

You can copy the Armbian image from the SD card to the eMMC using the Armbian Configuration.
To access the Armbian Configuration, enter the following into the terminal:

sudo armbian-config

After the Armbian Config opens up you have to navigate with the arrow keys (→↑↓←) and confirm with Enter (↩)

  1. Select System and security settings and confirm with Ok.
  2. Select the item Install to/update boot loader and confirm again with Ok.
  3. Now select Boot from eMMC - system on eMMC at point 2 and confirm with Ok.
  4. Confirm the warning with “Yes”.
  5. Choose ext4 as filesystem type for eMMC and confirm by pressing Ok one last time.

The system now copies the image from the SD card to the eMMC.

  • Last modified: 2023/11/03 09:43