cancel

How to develop or test products supported by Yocto Linux? EBOX-IMX8MM Development and Test Process Record

May 21, 2021

EB-IMX8MM-VESA EB-IMX8MM-DINRAIL1

The NXP i.MX8M Mini ARM Cortex-A53 processor has been widely incorporated into IPC development projects. However, ICOP has built an entire system around the i.MX8M Mini that encompasses a great build and quality product like the Panel PC and Box PC.

The EBOX-IMX8MM is an ARM-based EBOX offered by ICOP. that is ready to be implemented into a wide range of products. The EBOX has a line of features including being fanless, having a small footprint, and a premium aluminum cover. The EBOX also has standard VESA and DIN Rail mounting options and supports a wide temperature range from -40 to 80 °C bolstering its industrial usage options. This ARM Cortex A-53 processor features rich I/O and equipped with GPU and VPU, capable of Audio and HDMI with high-performance processing while being optimized for low-power consumption. Buyers can also select the pre-installed OS of Android 9 &Yocto Linux when placing the order.

 


 

EBOX-IMX8MM:

 

System Specifications
Processor NXP i.MX8M Mini Quad-core 1.6 GHz ARM Cortex-A53 processor
Memory 1GB to 4GB LPDDR4 onboard
HDMI HDMI 1.3 (MAX.1920 x 1080 pixels)
Ethernet RJ45 x2 (Intel I1210 GbE x1/CPU GbE x1)
USB USB 2.0 x3 (Front x2 + Rear x1)
HD Audio Mic-in & Line-out (WM8960)
SD card slot SD Slot x1 (Internal slot Optional)
Extension I/F 8GB to 64GB eMMC MLC/SLC onboard
Extension I/F WiFi 802.11b/g/n & BT4.1 Combo 2.4G (Broadcom 43438)
RS-232 D-Sub 9-pin connector x2 or x4 ports
RS-485 D-Sub 9-pin connector x2 ports
Power requirement DC +12V~+36V
Dimensions 115 x 115 x 35mm/DIN Rail Support (Optional)
Net Weight 700g
Operation Temperature 0 ~ +60℃/-40 ~ +80℃
Certifications CE, FCC, VCCI
OS Support Android 9, Yocto, Mainline Linux Kernel Support

 


 

Package box dimension 240 x 220 x 170mm, includes:

  • EBOX-IMX8MM x 1pcs
  • 22.5W Power supply x 1pcs
  • Rubber pads sticker x 1pcs
  • VESA screw x 4pcs
  • Protection Paperboard box
EB-IMX8MM-Package1

 

 

 


 

EBOX-IMX8MM Diagram:

EB-IMX8MM-FrontView EB-IMX8MM-RearView.png EB-IMX8MM-SideView

*Black aluminum cover is attached to the processor as a heatsink with the fins providing greater heat transfer.

 


 

It’s been through plenty of verifications and tests to meet the highest satisfaction.

EB-IMX8MM-production

 


 

Tiny Devices, BIG Applications.

EB-IMX8MM-Industrial EB-IMX8MM-Automotive EB-IMX8MM-Technologies EB-IMX8MM-SmartHome EB-IMX8MM-SmartCity

(For the detailed application info, please click the NXP applications reference link.)

 


 

 


 

Recipe for building the Yocto Linux for EBOX-IMX8MM-2G

 

This section will talk about the Recipe for building the Yocto Linux for EBOX-IMX8MM-2G.
Contact info@icop.com.tw for files and resources to build the Yocto Linux recipe for the EBOX-IMX8MM-2G.

You can also check the compiling method from NXP: IMXLXYOCTOUG.pdf

 

Suggested O/S: Ubuntu 18.04 or later.

To avoid errors while building the SDL, please refer to the local.conf.

#PACKAGECONFIG_append_pn-qemu-native = “sdl”
#PACKAGECONFIG_append_pn-nativesdk-qemu=”sdl”

 

Storage: Please make sure the capacity of your storage device is larger than 300GB.

RAM: Please make sure your physical memory + swap capacity is larger than 16GB.

 


Steps for building Yocto Linux recipe for EBOX-IMX8MM-2G:

 

  1. Install Host packages:
    Essential Yocto Project host packages:
    $ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat libsdl1.2-dev

    i.MX layers host packages for a Ubuntu 12.04 or 14.04 host setup are:
    $ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html \ docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \ libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop \ asciidoc

     

  2. Installing the repo utility:
    Create the bin folder in the home directory:
    $ mkdir ~/bin (this step may not be needed if the bin folder already exists)
    
        $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    
        $ chmod a+x ~/bin/repo

     

  3. Add the following line to the .bashrc file to make sure the ~/bin folder is in the PATH.
    export PATH=~/bin:$PATH

     

  4. Ensure the git is properly set up be the commands below:
    $ git config --global user.name "Your Name"
    
        $ git config --global user.email "Your Email"
    
        $ git config –list

     

  5. Download the i.MX Yocto Project Community BSP recipe layers:
    $ mkdir imx-yocto-bsp
      
    $ cd imx-yocto-bsp
    
        $ repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b \ imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml
    
        $ repo sync

     

  6. Unzip the Recipe for building Yocto Linux to the file ‘imx-yocto-bsp’

     

  7. Create the setup environment by the command below (filename is variable)
    $ DISTRO=fsl-imx-xwayland MACHINE=dm395b source fsl-setup-release.sh -b \ build-dmp
    please input “y” when the EULA confirmation pops out.

     

  8. Edit conf/local.conf file and add the content below to the bottom:
    CORE_IMAGE_EXTRA_INSTALL += “chromium-ozone-wayland”
    
        IMAGE_INSTALL_append += “\
    
        openssh-sftp-server \
    
            ppp \
    
            rng-tools \
    
            glibc-gconv-utf-16 \
    
            expand-rootfs \
    
        “

     

  9. Edit conf/bblayers.conf file and add the content below to the bottom:
    BBLAYERS += “${BSPDIR}/sources/meta-custom-dmp

     

  10. Run the command below.
    $ bitbake fsl-image-qt5-validation-imx

     


 

After finishing the steps above, the system will begin downloading and installing the source code, patching the file, and compiling.

 


 

Install Images by UUU

 

After implementing bitbake fsl-image-qt5-validation-imx, an image file will be generated and stored in the file under build-dmp/tmp/deploy/images/dm395b.

In the build-dmp/tmp/deploy/images/dm395b file, the files below will be needed for image restoration.

  1. fsl-image-qt5-validation-imx-dm395b.sdcard.bz2
  2. imx-boot-dm395b-sd.bin-flash_evk

 

Input command to get the image file fsl-image-qt5-validation-imx-dm395b.sdcard (In this file, there are packaged kernel and rootfs):

$ bzip2 -d fsl-mage-qt5-validation-imx-dm395b.sdcard.bz2

 

To download the UUU.auto sample, please contact info@icop.com.tw.

 

If you have a requirement to change the file name, please follow the steps below to change your file name (You could choose not to change the file name).

SDP: boot -f XXX.bin-flash_evk

SDPU: write -f XXX.bin-flash_evk -offset 0x57c00

SDPS: boot -f XXX.bin-flash_evk

SDPV write -f XXX.bin-flash_evk -skipspl

FB: flash bootloader XXX.bin-flash_evk

XXX.bin-flash_evk = imx-boot-dm395b-sd.bin-flash_evk



FB: flash -raw2sparse all XXX.image

XXX.image = fsl-mage-qt5-validation-imx-dm395b.sdcard

 

After you have set the file name, input the command below to install Yocto Linux.

uuu uuu.auto

 


 

Test and Use an Interface. (Bluetooth A2DP, Ethernet, UART, WiFi, SPK-OUT)

 

After building the Yocto Linux and installing the image from UUU, the functions can start to be tested.

Contents


Bluetooth A2DP function test:

Initialized the Bluetooth module

# hciattach /dev/ttymxc0 bcm43xx 3000000 flow -t 30

Turn on the Bluetooth function controller

# bluetoothct1

Turn on Bluetooth

[bluetooth] #power on

Check the status of Bluetooth function.

[bluetooth] # show

To test Bluetooth A2DP playback, the Pulse audio control module has to be loaded. In order to simplify the operation, turn on another terminal (terminal2) and load the control module to it.

# pulseaudio –D

In the meantime, the Bluetoothctl will load more control modules. Scan Bluetooth in the terminal1.

[bluetooth] # scan on

Stop scanning after you have seen your Bluetooth device.

[bluetooth] # scan off

Connect to the Bluetooth device. (Ex: Bluetooth headphone or speaker)

[bluetooth] # connect BT-addr

Check the terminal to see whether A2DP is supported after connecting the Bluetooth device.

# pactl info

Start to play music for testing.

# gat-launch-1.0 playbin uri=file:///path

 


 

Ethernet test:

Use the PING command to test network connections.

# ping –c 10 www.google.com

iPerf3 network bandwidth test. Normally, when testing the network by iPerf3, you will need to prepare a server-side and client-side to test the iPerf3 simultaneously.
First, start iPerf3 on the server-side.

# Server-side

# iperf3 –s

Secondly, start iPerf3 on the client-side.

# Client-side

# iperf3 –c SERVER IP

The SERVER_IP on the client-side should be set to the server-side’s IP or device name.
When iPerf3 is testing, both server-side and client-side will display the data (testing results shown below):

 


 

UART Overview:

There are 4x UART on the EBOX-IMX8MM with default settings below:

UART1 is connected to the WLAN/Bluetooth module

UART2 is connected to the console function

UART3 is connected to the J19 connector on the board

UART3 is connected to the J21 connector on the board.

If the EBOX does not have WLAN or Bluetooth, UART1 will be connected to the J15 connector.

 

UART naming under Linux:

UART 1: /dev/ttymxc0

UART 2: /dev/ttymxc1

UART 3: /dev/ttymxc2

UART 4: /dev/ttymxc3

 

Put the UART testing tool file in the root file of Linux (Contact info@icop.com.tw for the testing tool)

 

Testing UART3:

# ./linux-serial-test –p /dev/ttymxc2 –o 5 –i 6 –c

Testing UART4:

# ./linux-serial-test –p /dev/ttymxc3 –o 5 –i 6 –c

 


 

Wi-Fi Function Test:

To connect SSID, turn off wlan0 with the command below:

# ifconfig wlan0 down

Connect to the SSID and input the SSID password:

# iwconfig wlan0 essid “SSID” key “SSIDPASSWORD”

Turn on wlan0:

# ifconfig wlan0 up

Request IP address from DHCP server:

# udhcpc –i wlan0

Use the PING command to test network connections:

# ip=$(ifconfig wlan0 | grep “inet addr” | cut –f 1 –d B | sed ‘s/inet addr://g’);ping –c 5 S $ip www.google.com.tw

 


 

Headphone SPK-OUT Test:

Plug in cable and use path below:

# gst-launch-1.0 playbin uri=file:///path audio-sink=alsasink

The path can be WAV, MP3, FLAC, etc.
After inputting the file, audio should be playing from Headphone or SPK-OUT.

If you need to set PCM volume (Audio decoder’s main volume), the range can be set between 0 to 127.

# amixer set Headphone 80

 


 

Recording Test:

Plug the MIC into the MIC-IN connector and input the command below to start recording. After recording is finished, it will generate an audio file named test.wav:

# arecord –D hw:0, 0 –r 48000 –c 2 –f S16_LE test.wav

Play test.wav with the command below:

# aplay test.wav

 


 

Restoring Yocto Linux to eMMC on EBOX-IMX8MM-2G

 

If the product cannot boot up, please use the following steps to restore Yocto Linux to the eMMC of the EBOX-IMX8MM-2G.

Contents

 


 

Restore Yocto Linux via Linux host PC to the EBOX-IMX8MM-2G

  • Tools needed to restore the image onto the eMMC:

    1. Recovery image with UUU burning software (contact info@icop.com.tw for detailed information)
      • 1GB RAM version
      • 2GB RAM version
    2. A 64-bit Linux host O/S on a PC (Virtual Machine not recommended)
    3. USB Cable to connect the host PC to the EBOX-IMX8MM-2G
  • Write the image to the eMMC on the EBOX-IMX8MM-2G:

    1. Find SW1 on the EBOX-IMX8MM-2G and change the settings to Serial Download Mode according to the photo below:
      Find the SW1
    2. Please turn on the host PC and unzip the image file to it.
    3. Connect the USB cable to the host PC without connecting to the EBOX.
    4. Open a terminal on the host PC and access the location where the image file is and input “sudo ./uuu uuu.auto“; “Wait for known USB Device to Appear”
      put the image file on terminal
    5. Connect the USB cable (Micro USB) to the EBOX-IMX8MM-2G to trigger the serial download mode to restore the image from the host PC.
    6. After completing the restore process, the image will be shown on the host PC:
      After the restore process
    7. Remove the USB (Micro USB) on the EBOX-IMX8MM-2G (Power off) and set the SW1 to Internal boot as shown below:
      Remove the USB and set the SW1 to Internal boot
    8. Power on the EBOX-IMX8MM-2G to show Yocto Linux booting.
      Yocto Linux booting
    9. Pressing any key on boot will access the U-boot mode.
      access the U-boot mode

 


 

Restore Yocto Linux via Win10 host PC to the EBOX-IMX8MM-2G

  • Tools needed to restore image to the eMMC:

    1. Recovery image with the UUU burning software (contact info@icop.com.tw for detailed info)
      • 1GB RAM version
      • 2GB RAM version
    2. Windows 10 host OS on PC (Virtual Machine not recommended)
    3. USB cable to connect the host PC to the EBOX-IMX8MM-2G
  • Write the image to the eMMC on the EBOX-IMX8MM-2G:

    1. Find SW1 on the EBOX-IMX8MM-2G and change the settings to Serial Download Mode according to the photo below:
      Find the SW1
    2. Please turn on the host PC and unzip the image file to it.
    3. Connect the USB cable to the host PC without connecting to the EBOX.
    4. Open a terminal on the host PC and access the location where the image file is and input “uuu.exe uuu.auto” ; “Wait for known USB Device to Appear”.
      put the image file on terminal
    5. Connect the USB cable (Micro USB) to the EBOX-IMX8MM-2G to trigger the serial download mode to restore the image from the host PC.
    6. After completing the restore process, the image will be shown on the host PC:
      After the restore process
    7. Remove the USB (Micro USB) on the EBOX-IMX8MM-2G (Power off) and set the SW1 to Internal boot as shown below:
      Remove the USB and set the SW1 to Internal boot
    8. Power on the EBOX-IMX8MM-2G to show Yocto Linux booting.
      Yocto Linux booting
    9. Pressing any key on boot will access the U-boot mode.
      access the U-boot mode

 


 

Recovering Yocto Linux on the eMMC under UBOOT Mode

 

Recovering Yocto Linux on the eMMC under UBOOT Mode

  • Tools needed to restore image to the eMMC:

    1. Recovery eMMC image with the UUU burning software (contact info@icop.com.tw for detailed info)
      • 1GB RAM version
      • 2GB RAM version
    2. Windows 10 host OS on PC (Virtual Machine not recommended)
    3. USB cable to connect the host PC to the EBOX-IMX8MM-2G
    4. Cable to connect the console between host PC and the EBOX-IMX8MM-2G (USB to RS-232)
  • Write the image to the eMMC on the EBOX-IMX8MM-2G:

    1. Please turn on the host PC and unzip the image file to it.
    2. Connect the host PC and the EBOX-IMX8MM-2G via console cable (console function on ICOP’s device is on COM2).
    3. Connect the USB to micro USB to the host PC, but not connect to EBOX-IMX8MM.
    4. Open PUTTY on the host PC and set the Serial line at the correct location. Location can be found under the device manager:
      PUTTY on the host PC
       
    5. Open a terminal on the host PC and access the location where the image file is and input “uuu.exe uuu.auto”; “Wait for known USB Device to Appear”
      put the image file and input
    6. Go back to PUTTY and connect the USB cable (Micro USB) to EBOX-IMX8MM-2G to boot up and press any key while booting up to access the UBOOT mode and type “fastboot usb0”
      fastboot
    7. You will see the terminal on the PC starting to restore the image.
      starts to restore the image
    8. After restoration is done, boot up EBOX-IMX8MM-2G to see Yocto Linux running.
      Yocto Linux booting

 


 

If you completed all the steps in the previous section, then congratulations!

Depending on what your primary interests are with the Yocto Project, you could consider any of the following: (The source of the reference link: https://www.yoctoproject.org/docs/2.4.2/yocto-project-qs/yocto-project-qs.html)

  • Visit the Yocto Project Web Site: The official Yocto Project website contains information on the entire project. Visiting this site is a good way to familiarize yourself with the overall project.
  • Look Through the Yocto Project Development Tasks Manual: This manual contains procedural information grouped to help you get set up, work with layers, customize images, write new recipes, work with libraries, and use QEMU. The information is task-based and spans the breadth of the Yocto Project.
  • Learn About Board Support Packages (BSPs): If you want to learn about BSPs, see the Yocto Project Board Support Packages (BSP) Developer's Guide. This manual also provides an example BSP creation workflow. See the "Developing a Board Support Package (BSP)" section.

 

For more info and sample requests, please write to info@icop.com.tw, call your nearest ICOP Branch, or contact our Worldwide Official Distributor.

Δ