iWave iW-RainboW-G27M Linux User Manual

I.mx8 quad max development platform
Hide thumbs Also See for iW-RainboW-G27M:
Table of Contents

Advertisement

iW-RainboW-G27M Linux User Manual
iW-RainboW-G27M
i.MX8 Quad Max Development platform
Linux User Guide
REL 1.0
iWave Systems Technologies Pvt. Ltd.
Page 1 of 60

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the iW-RainboW-G27M and is the answer not in the manual?

Questions and answers

Summary of Contents for iWave iW-RainboW-G27M

  • Page 1 Linux User Manual iW-RainboW-G27M i.MX8 Quad Max Development platform Linux User Guide REL 1.0 iWave Systems Technologies Pvt. Ltd. Page 1 of 60...
  • Page 2 If you are not the intended recipient (or authorized to receive for the recipient), you are hereby notified that any disclosure, copying distribution or use of any of the information contained within this document is STRICTLY PROHIBITED. Thank you. “iWave Systems Tech. Pvt. Ltd.” REL 1.0 iWave Systems Technologies Pvt.
  • Page 3 (including liability to any person by reason of negligence) will be accepted by iWave Systems, its subsidiaries or employees for any direct or indirect loss or damage caused by omissions from or inaccuracies in this document.
  • Page 4: Table Of Contents

    Linux User Manual Table of Contents INTRODUCTION ............................7 Purpose ................................7 Scope ................................. 7 List of Acronyms ..............................7 BOARD SUPPORT PACKAGE........................... 9 BSP Driver details .............................. 9 2.1.1 BSP Supported Features ..........................9 2.1.2 Driver Source description ..........................9 2.1.3 Device tree source description ........................
  • Page 5 Linux User Manual 4.2.2 SD/MMC Test .............................. 34 4.2.3 SATA Test ..............................34 4.2.4 Ethernet Test ............................... 35 4.2.5 USB Test ..............................38 Environment variables settings ........................39 4.3.1 EMMC boot ..............................39 4.3.2 Standard SD boot ............................39 4.3.3 SATA boot ..............................
  • Page 6 Linux User Manual List of Figures Figure 1: Boot device memory layout ..........................24 Figure 2: Platform Detection ............................26 Figure 3: Binary Programming Succeed .......................... 26 Figure 4: OTG device detection on Host PC ........................43 Figure 5: Yocto Touch calibration Icon ..........................52 Figure 6: Yocto Touch calibration ...........................
  • Page 7: Introduction

    1. INTRODUCTION Purpose The purpose of this document is to help the software engineer to program and test the iW-RainboW-G27M-QM Linux development platform and this will also guide to configure the Linux development environment in the Host PC and build the board support package.
  • Page 8 Linux User Manual Acronyms Abbreviations UART Universal Asynchronous Receiver/Transmitter Universal Serial Bus USB OTG USB On The Go REL 1.0 iWave Systems Technologies Pvt. Ltd. Page 8 of 60...
  • Page 9: Board Support Package

    BSP Driver details This section explains about the features supported, the device driver details and path of the device drivers and device tree details in the iW-RainboW-G27M-QM BSP. 2.1.1 BSP Supported Features Refer the Software release note for the supported features in the BSP.
  • Page 10 Linux User Manual File Path Description drivers/usb/host/ehci-sysfs.c drivers/usb/host/ehci-pci.c EHCI driver source file drivers/usb/host/ehci.h EHCI header file drivers/usb/host/ehci-platform.c EHCI Platform driver source file USB3.0 Host drivers/usb/host/xhci-hcd.c drivers/usb/host/xhci-hub.c XHCI host driver source file drivers/usb/host/xhci-pci.c drivers/usb/host/xhci-ring.c drivers/usb/host/xhci.c XHCI driver source file drivers/usb/host/xhci.h XHCI header file drivers/usb/host/xhci-platform.c...
  • Page 11 Linux User Manual File Path Description drivers/mxc/gpu- viv/hal/kernel/arch/gc_hal_kernel_context.c Hardware-specific driver code for GC2000, GC880, GC400T, drivers/mxc/gpu- and GC320 viv/hal/kernel/arch/gc_hal_kernel_context.h drivers/mxc/gpu- viv/hal/kernel/arch/gc_hal_kernel_hardware.c drivers/mxc/gpu- viv/hal/kernel/arch/gc_hal_kernel_recorder.c Ethernet drivers/net/ethernet/freescale/fec_main.c Ethernet LAN controller driver source file drivers/net/ethernet/freescale/fec.h Ethernet LAN controller driver header file drivers/net/phy/at803x.c...
  • Page 12: Device Tree Source Description

    Linux User Manual 2.1.3 Device tree source description This section explains about the device tree source code configuration and organization for iW-RainboW-G27M-QM platform. The device tree source codes will be available in below path of the Linux kernel. ~/arch/arm64/boot/dts/freescale/...
  • Page 13: Bsp Yocto Compilation

    A Linux host PC with latest version (ex. Ubuntu version 14.04). • Root permission on the Development Host. • Cross compiler package for iW-RainboW-G27M-QM. 2.2.2 Host setup • This document assumes that Ubuntu PC is used. Not a requirement, but the packages may be named differently and the method of installing them may be different.
  • Page 14: Setting Up The Repo Utility

    Linux User Manual 2.2.4 Setting up the repo utility Repo is a tool built on top of Git that makes it easier to manage projects that contain multiple repositories, which do not need to be on the same server.
  • Page 15: Cross-Compiler Build

    • This sets up the recipes that are used to build the project. • To configure the yocto source for iW-RainboW-G27M-QM platform, execute the below command. $DISTRO=fsl-imx-x11 MACHINE=imx8qm_iwg27m source fsl-setup-release.sh -b build_imx8qm • The EULA is required to be accepted for the first time. After that, the acceptance is logged and EULA acceptance is not required again.
  • Page 16: Yocto Build

    Rename the binary files as mentioned below fsl-image-validation-imx-imx8qm_iwg27m-<date&time>.rootfs.tar.bz2 --> rootfs.tar.bz2 Image--4.9.51-r0-fsl-imx8qm-iwg27m-lpddr4-arm2-<date&time>.dtb --> fsl-imx8qm-iwg27m.dtb Image--4.9.51-r0-imx8qm_iwg27m-<date&time>.bin --> Image imx-boot-imx8qm_iwg27m-sd.bin-flash --> flash.bin • Refer the BINARY PROGRAMMING section to program the binaries to iW-RainboW-G27M-QM platform. REL 1.0 iWave Systems Technologies Pvt. Ltd. Page 16 of 60...
  • Page 17: U-Boot

    Linux User Manual 2.2.8 U-boot This section provides the detailed information and process for building the u-boot binary image. • Open a terminal window and change the directory to yocto setup path. $cd ~/<path to iwg27-release-bsp>/iwg27-release-bsp/ • To setup environment build path, execute the below command. This is required only once on switching of every new terminal window.
  • Page 18: Linux Kernel

    Linux User Manual 2.2.9 Linux kernel This section provides the detailed information and process for building the kernel images. • Open a terminal window and change the directory to yocto setup path. $cd ~/<path to iwg27-release-bsp>/iwg27-release-bsp/ • To setup environment build path, execute the below command. This is required only once on switching of every new terminal window.
  • Page 19: Bsp Standalone Compilation

    BSP Standalone compilation Yocto can be used to extract and build the u-boot source/ linux kernel source. The following steps will help to build the u-boot source code / linux kernel directly for iW-RainboW-G27M-QM platform. • Before compiling the source code cross compiler should be installed to “/opt” directory of host machine if it is not present.
  • Page 20 Linux User Manual • Copy the scfw patch file to current directory. host@host/<directory>~$cp /<path_to_iW-RainboW-G27M-QM-RX.X-RELX.X-Linux4.9.51- YoctoMorty_Deliverables>/iW-RainboW-G27M-QM-RX.X-RELX.X-Linux4.9.51- YoctoMorty_Deliverables/Source-Code/SCFW/Code/PATCH000-iW-PRFHZ-SC-01-RX.X-RELX.X- Linux4.9.51_SCFW_Basic_Customization.patch . • Change the directory to scfw_export_mx8qm. host@host/<Directory>~$cd scfw_export_mx8qm • To apply the patch file, execute the below command. host@host/<directory>/scfw_export_mx8qm~$patch -Np1 < ../PATCH000-iW-PRFHZ-SC-01-RX.X- RELX.X-Linux4.9.51_SCFW_Basic_Customization.patch...
  • Page 21: U-Boot

    ARCH=arm64 host@host/<Directory>/uboot-iwg27m~$export LDFLAGS=”” host@host/<Directory>/uboot-iwg27m~$source /opt/fsl-imx-x11/4.9.51-mx8-beta/environment- setup-aarch64-poky-linux • To configure for iWave-G27M-QM platform, execute the below command. host@host/<directory>/uboot-iwg27m~$make imx8qm_iwg27m_defconfig • To compile the kernel module drivers and kernel image, execute the below commands. host@host/<Directory>/uboot-iwg27m~$make • After successful compilation, u-boot binaries will be created in below path.
  • Page 22: Imx-Boot

    Linux User Manual 2.3.3 imx-boot • Copy the imx-boot folder to current directory. host@host/<directory>~$cp –rf /<path_to_iW-RainboW-G27M-QM-RX.X-RELX.X-Linux4.9.51- YoctoMorty_Deliverables>/iW-RainboW-G27M-QM-RX.X-RELX.X-Linux4.9.51- YoctoMorty_Deliverables/Source-Code/imx-boot/imx-boot . • Change the directory to u-boot source code directory. host@host/<directory>~$cd /<path to imx-boot source>/imx-boot • Make sure to copy the below mentioned binaries to the “imx-boot/iMX8QM/” folder scfw_tcm.bin...
  • Page 23: Linux Kernel

    ~$export ARCH=arm64 host@host/<Directory>/linux-iwg27m~$source /opt/fsl-imx-x11/4.9.51-mx8-beta/environment- setup-aarch64-poky-linux host@host/<Directory>/linux-iwg27m~$export LDFLAGS=”” • To configure the kernel for iW-RainboW-G27M-QM, execute the below command. host@host/<Directory>/linux-iwg27m~$make iw_rainbowg27m_linux_defconfig • To compile the kernel module drivers and kernel image, execute the below commands. host@host/<Directory>/linux-iwg27m~$make • After successful compilation, kernel image (Image) and device tree (.dtb) will be created in the below path respectively.
  • Page 24: Binary Programming

    3. BINARY PROGRAMMING MFG –Tool Programming This section explains the step by step procedure to flash the binaries using MFG tool. 3.1.1 Requirements To program the binaries for iW-RainboW-G27M-QM platform, following Items are required: • eMMC/ SATA • Binary files (flash.bin, Image, fsl-imx8qm-iwg27m.dtb, rootfs.tar.bz2) •...
  • Page 25: Mfg-Tool

    Debug UART Setting and Powering ON iW-RainboW-G27M in iW-RainboW-G27D-i.MX8QM_SMARC_DevKit- QuickStartGuide-REL1.0 document to connect debug UART and power ON procedure. • Use USB type A to micro B cable to connect the iW-RainboW-G27M-QM platform with host PC via USB OTG port. •...
  • Page 26: Figure 2: Platform Detection

    Linux User Manual • The MFG Application will open and will display the current operation in status text box. • If the platform is detected, the "HID-compliant device" message will be displayed in the status box. Figure 2: Platform Detection •...
  • Page 27: Limitations

    Linux User Manual 3.1.5 Limitations • MFG tool supports to program the binaries for only one device at a time. • This application does not support USB 3.0 host port. • If MFG tool v2.0 application is executed on Windows7, when it runs in the “updater” phase, a popup message will be shown to ask whether disk should be formatted.
  • Page 28: Manual Sd Card Programming

    Host PC (Linux) for manual binary programming 3.2.2 SD Card Partition This chapter describes the steps to partition an SD card to program the binaries and boot the iW-RainboW-G27M- QM platform. Refer this section only if a New Standard SD card is used.
  • Page 29 Linux User Manual • Press 'p' to create primary partition. Give 1 as partition number. Then give first cylinder as ‘7’(Based on the total cylinders we have to change the size) Because first 7 cylinders is for flash.bin purpose and Last cylinder as half of displayed size (e.g.
  • Page 30 Linux User Manual • List out partition types in SD. Press 'p' to view. Below message will be displayed Command (m for help): p Disk /dev/sdb: 1021 MB, 1021837312 bytes 31 heads, 62 sectors/track, 1038 cylinders Units = cylinders of 1922 * 512 = 984064 bytes...
  • Page 31: Binary Programming

    Linux User Manual 3.2.3 Binary Programming • Insert SD card using SD card reader to the PC. Execute mount command to see the attached nodes and mount points. $mount • SD card may attach to the dev nodes either sdb/sdc/sdd/sde. Assume the SD card is attached to /dev/sdb node.
  • Page 32: U-Boot Testing And Boot Configuration

    SATA • Connect debug UART with host PC and Power ON the iW-RainboW-G27M-QM platform. Refer the sections Debug UART Setting and Powering ON iW-RainboW-G27D in iW-RainboW-G27D-i.MX8QM_SMARC_DevKit- QuickStartGuide-REL1.0 document to connect debug UART and power ON procedure. Note: Refer the section On Board Switches in iW-RainboW_G27D_i.MX8QM_SMARC_Devkit-HardwareUserGuide- REL0.2 document for boot media device selection in Table-4.
  • Page 33: Basic Device Tests

    Standard SD, eMMC • SATA • Ethernet Note: To know about the procedure for connecting the peripherals to iW-RainboW-G27M-QM platform, refer iW- RainboW_G27D_i.MX8QM_SMARC_Devkit-HardwareUserGuide-REL0.2 document. 4.2.1 RAM Test • In iW-RainboW-G27M-QM platform RAM physical address is from 0x10000000 to 0x3FFFFFFF. •...
  • Page 34: Sd/Mmc Test

    Linux User Manual 4.2.2 SD/MMC Test • Initialize the particular SD/eMMC device by the below command. iWave-G27 >mmc dev <SD slot No> • The SD/eMMC static slot numbers are below. eMMC Standard SD • To display the SD/eMMC device information, execute the below.
  • Page 35: Ethernet Test

    >mdio read FEC0 0x4 0x0 • To write any register to Ethernet PHY device, execute the below command. iWave-G27 >mdio write <busname> <phyaddr> <reg> <value> • To set the Ethernet speed as 1000Mbps and full duplex, execute the below command.
  • Page 36 Linux User Manual • To set the Ethernet speed as 1000Mbps and half duplex, execute the below command. iWave-G27 >mdio write <busname> <phyaddr> 0x0 0x0040 • To set the Ethernet speed as 100Mbps and full duplex, execute the below command.
  • Page 37 Linux User Manual TFTP server • Create the tftp configuration file and insert the following content. $sudo nano /etc/xinetd.d/tftp service tftp protocol = udp prot = 69 socket_type = dgram wait= yes user = <user_name> server = /usr/sbin/in.tftpd server_args = /tftpboot -s...
  • Page 38: Usb Test

    Example iWave-G27 >usb dev 0 • To read from the USB storage device, execute the below command iWave-G27 >usb read <RAM address> <starting block> <count> Example iWave-G27 >usb read 0x80280000 0x100 0x10 • To write to the USB storage device, execute the below command iWave-G27 >usb write <RAM address>...
  • Page 39: Environment Variables Settings

    To load the kernel and file systems from the EMMC, the environment variables should be set as shown below. iWave-G27 > setenv bootargs_mmc 'setenv bootargs ${bootargs_base} root=/dev/mmcblk0p2 rootwait rootfstype=ext4 rw' iWave-G27 > setenv bootcmd_mmc 'run bootargs_mmc;mmc dev 0;fatload mmc 0 ${loadaddr} ${kernel};fatload mmc 0 ${fdt_addr} ${fdt_file};booti ${loadaddr} - ${fdt_addr}' iWave-G27 > setenv bootcmd 'run bootcmd_mmc' iWave-G27 >saveenv •...
  • Page 40: Sata Boot

    4.3.4 TFTP & NFS boot Kernel image (Image), device tree binaries (.dtb) and rootfs (file systems) can be loaded through TFTP and NFS respectively. But the iW-RainboW-G27M-QM’s boot loader (u-boot) should be loaded from boot media. • To load the kernel and file systems using the TFTP and NFS, the environment variables should be set as shown below.
  • Page 41: Linux Peripheral Testing

    Linux User Manual 5. LINUX PERIPHERAL TESTING This part of the document explains about testing the peripherals in Linux OS level for iW-RainboW-G27M-QM platform. • Connect debug UART with host PC and Power ON the iW-RainboW-G27M-QM platform. Refer the sections Debug UART Setting and Powering ON iW-RainboW-G27M in iW-RainboW-G27D-i.MX8QM_SMARC_DevKit-...
  • Page 42: Sd/Emmc/Usb Host/ Usb Otg (As Host)/ Sata Test

    Linux User Manual 5.1.1 SD/eMMC/USB host/ USB OTG (as host)/ SATA test • The Standard SD / eMMC / USB (Host) / USB OTG (as Host) / USB Type C (as Host) / SATA will mount in below mentioned directories.
  • Page 43: Figure 4: Otg Device Detection On Host Pc

    $1: Linux File-Backed Storage • Then the files and folders from iW-RainboW-G27M-QM platform’s eMMC will be displayed on Windows Host PC as shown in the figure below. Figure 4: OTG device detection on Host PC •...
  • Page 44: Network Devices Test

    • Ethernet2 • Wi-Fi • • Bluetooth Testing device Requirements To test the Network devices supported by iW-RainboW-G27M-QM platform, following Items are required. • Two Ethernet connection • CAN cable • Wi-Fi – Bluetooth module(In built) REL 1.0 iWave Systems Technologies Pvt. Ltd.
  • Page 45: Ethernet Test

    Linux User Manual 5.2.1 Ethernet Test This section explains how to test the Ethernet with different speed (10/100/1000Mbps) and duplex (half/full) in the iW-RainboW-G27M platform. • Connect the Ethernet cable and to enable the Ethernet device, execute the below command.
  • Page 46 Execute the below command to check the current Ethernet network speed and duplex settings. root@imx8qm_iwg27m~$ethtool eth0 Note: The Max. Speed 1000Mbps can be set only if the iW-RainboW-G27M platform is connected in the 1000Mbps network. File transfer using TFTP server •...
  • Page 47: Can Test

    CAN device with the G27M platform then user has to take care of the particular CAN device application part • Connect the iW-RainboW-G27M platform CAN port to another iW-RainboW-G27M-QM platform’s CAN port (it may be either can0 or can1 port).
  • Page 48: Wi-Fi Test

    Linux User Manual 5.2.3 Wi-Fi Test This section explains how to test the Wilc3000 Wi-Fi module in iW-RainboW-G27M-QM platform. • To enable the Wi-Fi device, execute the below command. root@imx8qm_iwg27m~$ ifconfig wlan0 up root@imx8qm_iwg27m~$ ifconfig eth0 Link encap:Ethernet HWaddr 00:01:02:03:04:05...
  • Page 49: Bluetooth Test

    64 bytes from **********: icmp_seq=1 ttl=64 time=0.206 ms 64 bytes from **********: icmp_seq=2 ttl=64 time=0.160 ms 5.2.4 Bluetooth Test This section explains how to test the Bluetooth in the iW-RainboW-G27M platform. • To download the firmware, execute the following commands.
  • Page 50 Linux User Manual • Get surrounding devices addresses and classes by executing below command. root@ root@imx8qm_iwg27m~$ hcitool inq Inquiring ... XX:XX:XX:XX:XX:XX clock offset: 0x6354 class: 0x5a0204 • To get the info about a scanned device, execute the below command.
  • Page 51: Display Devices Test

    To test the display devices supported by iW-RainboW-G27M-QM platform, following Items are required. • MIPI Display panel. 5.3.1 Brightness Test This section explains how to test the backlight brightness of MIPI Display in the iW-RainboW-G27M-QM platform using following commands. • To see the actual brightness set, execute below command.
  • Page 52: Usb Hid Devices

    Linux User Manual 5.4.1 USB HID Devices Mouse • Insert the USB Mouse in iW-RainboW-G27M-QM platform USB slot. The following message will be displayed in command prompt. usb 2-1.1: new low speed USB device number 4 using fsl-ehci input:...
  • Page 53: Figure 6: Yocto Touch Calibration

    Linux User Manual • Calibrate the touch screen as mentioned below screen. Figure 6: Yocto Touch calibration • Click on any of the icon in the Yocto Home screen to test touch. Figure 7: Yocto home screen REL 1.0 iWave Systems Technologies Pvt.
  • Page 54: Rtc Test

    Linux User Manual RTC Test The given BSP supports the built-in RTC. This section explains how to test RTC in the iW-RainboW-G27M platform. • To list out the date options, execute the below command. root@root@imx8qm_iwg27m~$ date --help BusyBox v1.20.2 () multi-call binary.
  • Page 55: Uart Test

    The given BSP supports the UART with different baud rates. This section explains how to test the UART in the iW- RainboW-G27M platform. • Connect the iW-RainboW-G27M’s data UART port with serial port of host PC using serial cable. • The supported UART devices and its nodes are listed below, UART 0 - /dev/ ttyLP0 (LPUART0) UART 4 - /dev/ ttyLP4 (LPUART4 &...
  • Page 56: Pcie Device Test

    00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01) 01:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02) WDOG Test The given BSP supports the built-in WDOG. This section explains how to test WDOG in the iW-RainboW-G27M platform. •...
  • Page 57: Audio Test

    Linux User Manual 5.9.1 Audio Test The given BSP supports the SGTL5000 audio devices. This section explains how to test SGTL5000 audio codecs in the iW-RainboW-G27M platform. • To list the available audio interfaces, execute the below command. root@root@imx8qm_iwg27m~$ aplay -l •...
  • Page 58: Gstreamer Test

    Linux User Manual 5.9.2 Gstreamer Test The given BSP supports the Gstreamer framework. This section explains how to play a multimedia file using Gstreamer framework in the iW-RainboW-G27M platform. • To play a video file using gplay, execute the below command.
  • Page 59: Appendix

    Refer the section Power-ON SMARC Development Platform in iW-RainboW-G27D-i.MX8QM_SMARC_Devkit- QuickStartGuide-REL1.0 for iW-RainboW-G27M-QM platform power ON procedure 2. How to connect the Debug port of iW-RainboW-G27M-QM with host PC / What are the settings to be done in host side to connect the debug port of iW-RainboW-G27M-QM platform? Refer the section Debug Port Setting in iW-RainboW-G27D-i.MX8QM_SMARC_Devkit-QuickStartGuide-REL1.0...
  • Page 60 Linux User Manual REL 1.0 iWave Systems Technologies Pvt. Ltd. Page 60 of 60...

Table of Contents