Overview
Online Support
FAQ
  Atmel Series  (29) TOP10
  MYS-SAM9X5 (3)
  MYS-SAM9G45 (1)
  MYD-SAM9X5 (7)
  MYD-SAM9X5-V2 (2)
  MYD-JA5D2X (0)
  MYD-SAMA5D3X (11)
  MYD-SAMA5D3X-C (0)
  MYD-JA5D4X (0)
  MYC-SAM9X5 (4)
  MYC-SAM9X5-V2 (1)
  MYC-JA5D2X (0)
  MYC-SAMA5D3X (0)
  MCC-SAMA5D3X-C (0)
  MYC-JA5D4X (0)
  NXP Series  (23) TOP10
  MYS-6ULX (4)
  MYD-Y6ULX (3)
  MYD-Y6ULX-HMI (1)
  MYD-IMX28X (2)
  MYD-LPC435X (2)
  MYD-LPC185X (1)
  MYD-LPC1788 (0)
  MYC-Y6ULX (4)
  MYC-IMX28X (0)
  i.MX 6UL/6ULL (6)
  TI Series  (24) TOP10
  MYD-AM335X (12)
  MYD-AM335X-Y (0)
  MYD-AM335X-J (0)
  MYD-C437X (0)
  MYD-C437X-PRU (5)
  Rico Board (6)
  MYC-AM335X (1)
  MCC-AM335X-Y (0)
  MCC-AM335X-J (0)
  MYC-C437X (0)
  Xilinx Series  (20) TOP10
  Z-turn Board (9)
  Z-turn Lite (2)
  MYD-C7Z010/20 (0)
  MYD-C7Z015 (7)
  MYD-Y7Z010/007S (0)
  MYC-C7Z010/20 (0)
  MYC-C7Z015 (0)
  MYC-Y7Z010/007S (0)
  HMI Solutions  (0) TOP10
  MYD-Y6ULX-CHMI (0)
  MY-EVC5100S-HMI (0)
  Others  (1) TOP10
  MY-WF003U (1)
 
  Home >  Support > NXP Series > i.MX 6UL/6ULL
 
Part Five: Protocols and tools associated with applications
 
Question
Part Five: Protocols and tools associated with applications
5.1 How to add database, FTP, sqlite3 or other applications in Yocto?
5.2 How to modify "rc.local" in Yocto?
5.3 How to generate ubi file system in Yocto?
5.4 How to compile .c file using the cross-compiler toolchain?
5.5 How to modify default GPIO voltage in the source code of uboot?
5.6 How to modify the debug serial port to another?
5.7 How to set a permanent MAC address while Linux generates random MAC addresses?
5.8 Is there a SN in the system of every MYC-Y6ULX CPU Module?
5.9 How to set static IP address?
Answer

5. Protocols and tools associated with applications

5.1 How to add database, FTP, sqlite3 or other applications in

Yocto?              

A: Refer to the Yocto source code which MYIR provides. Below is the directory in QT file system which we will modify.

Add vsftpd, ftp, sqlite3 in “sources/meta-myir-imx6ulx/recipes-fsl/images/fsl-image-qt5.bbappend”

Example code:

DESCRIPTION = "Freescale Image - Adds Qt5"

LICENSE = "MIT"

inherit populate_sdk_qt5

require recipes-fsl/images/fsl-image-qt5-validation-imx.bb

IMAGE_FEATURES += "package-management ssh-server-dropbear "

IMAGE_INSTALL += " \

    imx-kobs \

    tslib \

    tslib-calibrate \

    tslib-conf \

    tslib-tests \

    memtester \

    bzip2 \

    gzip \

    canutils \

    dosfstools \

    mtd-utils \

    mtd-utils-ubifs \

    ntpdate \

    vlan \

    tar \

    net-tools \

    ethtool \

    evtest \

    i2c-tools \

    iperf3 \

    iproute2 \

    iputils \

    udev-extraconf \

    iperf \

    openssl \

    v4l-utils \

    alsa-utils \

    ppp \

    ppp-quectel \

    sqlite3 \

    libmodbus \

    libxml2 \

    dbus \

    openobex \

    hostapd \

    iptables \

    vsftpd \

    openobex \

    myir-rc-local \

${@base_contains("MACHINE", "mys6ull14x14", "rtl8188eu-driver", "", d)} \

Below is the file we need to modify in core-base file system:

sources/meta-myir-imx6ulx/recipes-core/images/core-image-base.bbappend

Then build the file system referring to the development manual, the new file system would include these applications.

5.2 How to modify “rc.local” in Yocto?

A: The dictionary of rc.local:

sources/meta-myir-imx6ulx/recipes-myir/myir-rc-local/myir-rc-local/rc.local.etc

Example code:

#!/bin/sh -e

#

# rc.local

#

# This script is executed at the end of each multiuser runlevel.

# Make sure that the script will "exit 0" on success or any other

# value on error.

#

# In order to enable or disable this script just change the execution

# bits.

#

# By default this script does nothing.

# demo start

export TSLIB_TSDEVICE=/dev/input/event1

#ts_calibrate && ts_test &

export TSLIB_TSDEVICE=/dev/input/event1

export TSLIB_CONFFILE=/etc/ts.conf

export TSLIB_CALIBFILE=/etc/pointercal

export TSLIB_PLUGINDIR=/usr/lib/ts

export TSLIB_CONSOLEDEVICE=none

export QT_QPA_FB_TSLIB=1

export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event1

#add command to display the real time

date

exit 0

5.3 How to generate ubi file system in Yocto?

Example code:

+++ b/sources/meta-myir-imx6ulx/conf/distro/include/myir-imx-base.inc
@@ -15,7 +15,14 @@ LOCALCONF_VERSION = "1"
 IMX_DEFAULT_DISTRO_FEATURES = "largefile opengl ptest multiarch bluez"
 IMX_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot"
 IMX_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
-IMAGE_FSTYPES = "tar.bz2 tar.xz ext4 sdcard"
+IMAGE_FSTYPES = "tar.bz2 tar.xz ext4 sdcard ubi"
+
+# Use the expected value of the ubifs filesystem's volume name in the kernel
+UBI_VOLNAME = "rootfs"
+# The biggest NANDs on current modules are 256MB.
+# This sums up to 2048 LEBs available for the ubifs (-c)
+MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 2048"
+UBINIZE_ARGS = "-m 2048 -p 128KiB -s 2048 -O 2048"

5.4 How to compile .c file using the cross-compiler

toolchain?

A: Please refer to “$CC  -o test test.c”.

5.5 How to modify default GPIO voltage in the source code of uboot?

A: File to modify: uboot/board/myir/myd_y6ull/myd_y6ull.c.

Example code:

      /* WiFi Reset */

       gpio_direction_output(IMX_GPIO_NR(4, 16) , 0);

       udelay(3000);

       gpio_direction_output(IMX_GPIO_NR(4, 16) , 1);

       /* LCD Power */

       imx_iomux_v3_setup_multiple_pads(lcd_pwr_pads, ARRAY_SIZE(lcd_pwr_pads));

       gpio_direction_output(IMX_GPIO_NR(3, 4) , 1);

       /* LTE module */

       imx_iomux_v3_setup_multiple_pads(lte_pwr_pads, ARRAY_SIZE(lte_pwr_pads));

       /* LTE wakeup */

       gpio_direction_output(IMX_GPIO_NR(5, 8) , 1);

       /* LTE power */

       gpio_direction_output(IMX_GPIO_NR(5, 5) , 1);

       /* LTE reset */

       gpio_direction_output(IMX_GPIO_NR(4, 14) , 1);

       udelay(150000);

       gpio_direction_output(IMX_GPIO_NR(4, 14) , 0);

5.6 How to modify the debug serial port to another?

A: Modify the source code of uboot by modifying “bootargs=console=ttymxc0”of environment variables, modify “ttymx0” to the code of another serial port.

5.7 How to set a permanent MAC address while Linux generates random MAC addresses?

A: We may buy MAC from IEE and program it into fuse of chip, fuse can be programmed only once. Attention please, program it improperly may affect booting.

5.8 Is there a SN in the system of every MYC-Y6ULX CPU Module?

A: No preset SN in it.

5.9 How to set static IP address?

A: File to modify: /etc/network/interfaces.

Example code (below IP is for reference only):

# Wired or wireless interfaces

auto eth0

auto eth1

iface eth1 inet dhcp

iface eth0 inet static

address 192.168.30.122

netmask 255.255.255.0

getway 192.168.30.1