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
|