MYiR MYD-Y6ULX Linux Manual de usuario


1.1
1.2
1.3
1.4
1.4.1
1.4.2
1.4.3
1.4.3.1
1.4.3.2
1.5
1.5.1
1.5.2
1.5.3
1.5.4
1.5.5
1.5.6
1.5.7
1.5.8
1.5.9
1.5.10
1.5.11
1.5.12
1.5.13
1.5.14
1.6
1.6.1
1.6.2
1.6.3
1.7
1.7.1
1.7.2
1.8
Table of Contents
Preface
1 Software Resource
2 Deploy Development Environment
3 Build Linux System
3.1 U-Boot
3.2 Linux Kernel
3.3 Build Filesystem
3.3.1 Yocto build Linux system
3.3.2 Yocto build SDK package
4 Linux Application Development
4.1 Test LCD
4.2 Test TouchPanel
4.3 Test Ethernet
4.4 Test GPIO-KEY
4.5 Test GPIO-LED
4.6 Test USB Host
4.7 Test USB Device
4.8 Test RS485
4.9 Test RS232
4.10 Test CAN bus
4.11 Test Audio
4.12 Test Camera
4.13 Test WiFi
4.14 Test 4G LTE
5 QT Application Development
5.1 Install QtCreator
5.2 Config QtCreator
5.3 Test Qt exapmle
6 Update System
6.1 USB Update Method
6.2 SD Card Method
AppendixA
2

MYD-Y6ULX Linux Development Guide
This document introduce the MYD-Y6ULX development board about Linux compile and deploy, interface usage on baseboard, Qt application development etc.
Version History
Version Description Date
V1.0 Initialize version 2017.10.09
V1.1 Add MYD-Y6UL board 2018.01.15
Hardware Version
This document suit list:
MYD-Y6ULL
MYD-Y6UL
3

1 Software Resource
MYD-Y6ULX series boards support the Linux kernel version 4.1.15, and provided with rich hardware resource and software resource.
Below is MYD-Y6ULX software resource table:
Categary Name Description Source
Bootloader U-boot u-boot.imx will boot chip to work YES
Linux kernel Linux 4.1.15 Based on official version imx_4.1.15_2.0.0_ga YES
Driver USB Host USB Host YES
Driver USB OTG USB OTG driver YES
Driver I2C I2C bus driver YES
Driver Ethernet 10/100Mbps ethernet driver YES
Driver MMC MMC/SDIO/TF Card YES
Driver LCD Supports 4.3inch and 7.0 inch YES
Driver RTC Read/write real date time YES
Driver Touch Panel Supports Capacity and Resistive touch panel YES
Driver USART Serial port driver YES
Driver LED GPIO LED YES
Driver KEY GPIO KEY YES
Driver Audio WM8904 codec driver YES
Driver CAN bus CAN bus driver YES
Driver RS485 RS485 bus driver YES
Driver Camera OV2659 driver YES
Driver WiFi module USI module(BCM43362 chip) use SDIO driver YES
Driver LTE module(Optional) 4G module(Quectl EC20) use USB driver YES
FileSystem Yotcto rootfs Based Yocto build filesystem(include Qt 5.6 package) YES
FileSystem Yotcto rootfs Based Yocto build filesystem(Full command line package) YES
Application GPIO KEY Reads the GPIO key code value demo YES
Application GPIO LED Operate the GPIO LED demo YES
Application NET Uses TCP/IP Sokect API, support Client and Server demo YES
Application RTC Read/write real date time demo YES
Application RS232 Read/write RS232 port demo YES
Application Audio Audio play/capture demo YES
Application Framebuffer LCD test program YES
Toolchain Cross compiler Linaro GCC 4.9 Hardfloat BINARY
Toolchain Cross compiler Yocto GCC 5.3 Hardfloat BINARY
Table1-1 Software Resource
4

2 Deploy Development Environment
You need to install the Linux Operation System on your host PC.Recommend to use the Ubuntu 16.04 64bit distribution, and connect the network.Next steps we will install
some packages from internet.
Connect development board with PC
1. PC use USB to TLL cable with DEBUG port(JP1) on board.
2. Open serial program with exist serial device
PC serial port configure parameters:
Baudrate: 115200
Data bit: 8bit
Parity: None
Stop bit: 1bit
Flow control: Disable
Figure2-1 MYC-Y6ULX top view
Figure2-2 MYD-Y6ULX top view
The core moudle of MYD-Y6ULX series boards has two models, MYC-Y6UL and MYC-Y6ULL.
Install necessary software packages
sudo apt-get install build-essential git-core libncurses5-dev flex bison \
texinfo zip unzip zlib1g-dev gettext u-boot-tools g++ xz-utils mtd-utils \
gawk diffstat gcc-multilib
Build work directory
Create a working directory to facilitate the creation of an unified environment variable path. Copy the product CD-ROM source code to the working directory, while setting the
DEV_ROOT variable to enable the follow-up step path accessed.
mkdir -p ~/MYD-Y6ULX-devel
export DEV_ROOT=~/MYD-Y6ULX-devel
cp -r <DVDROM>/02-Images $DEV_ROOT
cp -r <DVDROM>/03-Tools $DEV_ROOT
cp -r <DVDROM>/04-Source $DEV_ROOT
Configure toolchain
Linaro toolchain : gcc version 4.9.3 20141031 (prerelease) (Linaro GCC 2014.11)
Yocto toolchain: gcc version 5.3.0 (GCC)
There are two cross compile toolchains, one is support by Linaro.Another built by Yocto.Recommend you use Yocto toolchain to build all source code.
Linaro Toolchain
cd $DEV_ROOT/
tar -xvjf 03-Tools/Toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.tar.xz
export PATH=$PATH:$DEV_ROOT/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin
export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm
Check if the toolchain is correct using below command.You have setup correct environment on current SHELL when you get version infomation.If you want it always
available, you need to modify your shell config file.
$ arm-linux-gnueabihf-gcc --version
arm-linux-gnueabihf-gcc (Linaro GCC 2014.11) 4.9.3 20141031 (prerelease)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5

Yocto Toolchain
Yocto provide two kinds toolchain, one is low-level development toolchain meta-toolchain, another is application development toolchain.The low-level toolchain likes
Linaro.The another used for application development, include more third-party libaries and header files.The MYD-Y6ULX also supports two kinds, those files are list below.
Toolchain file name Description
myir-imx-fb-glibc-x86_64-fsl-image-qt5-cortexa7hf-neon-toolchain-4.1.15-2.0.1.sh toolchain for fsl-image-qt5 system image, icludes Qt5 libraries
myir-imx-fb-glibc-x86_64-core-image-base-cortexa7hf-neon-toolchain-4.1.15-2.0.1.sh toolchain for core-image-base system image, without any graphics libraries
myir-imx-fb-glibc-x86_64-meta-toolchain-cortexa7hf-neon-toolchain-4.1.15-2.0.1.sh meta-toolchain
Yocto toolchain distribute SDK package type. You need install the toolchain SDK package, then use it. Below is install method:
Run shell script as normal user.It will request you to input install path, default is under "/opt" directory.Then you will reuquest to set permission to directory. You can use
"source" or "." to load toolchain environment to current shell when your installation finish.
Below example intall the toolchain into '/opt/myir-imx6ulx-fb/4.1.15-2.0.1' directory.
$ ./myir-imx-fb-glibc-x86_64-fsl-image-qt5-cortexa7hf-neon-toolchain-4.1.15-2.0.1.sh
Freescale i.MX Release Distro SDK installer version 4.1.15-2.0.1
================================================================
Enter target directory for SDK (default: /opt/myir-imx-fb/4.1.15-2.0.1): /opt/myir-imx6ulx-fb/4.1.15-2.0.1
Do You are about to install the SDK to "/opt/myir-imx6ulx-fb/4.1.15-2.0.1". Proceed[Y/n]? Y
[sudo] password for kevinchen:
Extracting SDK..................................................
................................................................
...............done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you ne
ed to source the environment setup script e.g.
$ . /opt/myir-imx6ulx-fb/4.1.15-2.0.1/environment-setup-cortexa7hf-neon-poky-linux-gnueabi
Check the toolchain SDK is correct after installation.Using the "source" command to load environment file to shell and check the compiler version.
source /opt/myir-imx6ulx-fb/4.1.15-2.0.1/environment-setup-cortexa7hf-neon-poky-linux-gnueabi
arm-poky-linux-gnueabi-gcc --version
arm-poky-linux-gnueabi-gcc (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
According the steps, you can install the low-level toolchain meta-toolcahin.Please input different path to store the toolchain, otherwize it will cover existing files in same
directory.
6

3 Build Linux System
This chapter introduces how to build components of Linux system. The MYD-Y6ULX includes below parts:
U-Boot: First level bootloader.
Linux Kernel: Linux kernel 4.1.15 and drivers suit for MYD-Y6ULX board.
Yocto: An open source collaboration project that provides templates, tools and methods to help you create custom Linux-based system for embedded products
regardless of the hardware architecture.
These software are locating in 04-Source directory.Some packages use ID number in file name.
Before compile u-boot and Linux kernel source code, you need install meta-toolchain and load the environment variables into current shell.
7

3.1 Compiling U-Boot
Enter Bootloader directory, extract U-boot source tar source package:
cd $DEV_ROOT/04-Source
tar -xvf MYiR-iMX-uboot.tar.gz
cd MYiR-iMX-uboot
Compiling:
make distclean
make <config>
make
The option value is different boot mode. The MYD-Y6ULX supports two boot modes.
Boot Mode Config file
MYD-Y6ULL NAND Flash myd_y6ull_14x14_nand_defconfig
MYD-Y6ULL eMMC Flash myd_y6ull_14x14_emmc_defconfig
MYD-Y6ULX NAND Flash myd_y6ul_14x14_nand_defconfig
MYD-Y6ULX eMMC Flash myd_y6ul_14x14_emmc_defconfig
U-Boot SD boot mode will search and execute a script file "boot.scr" when U-Boot booting up. It used to change boot type in temporary.Next is use TFTP to download
zImage and dtb to boot system as example. Using mkimage tool through "myd-y6ull-boot-mmc0-tftp.txt" to generate the "boot.scr" file as example. The mkimage tool
source code is locating in "U-Boot/tools" directory. It will be compiled after U-Boot compiled.
cat myd-y6ull-boot-mmc0-tftp.txt
setenv mmcroot '/dev/mmcblk0p2 rootwait rw rootdelay=5 mem=256M'
run mmcargs
tftpboot 0x83000000 zImage
tftpboot 0x84000000 myd-y6ull-gpmi-weim.dtb
bootz 0x83000000 - 0x84000000
./tool/mkimage -A arm -T script -O linux -d myd-y6ull-boot-mmc0-tftp.txt boot.scr
8

3.2 Linux Kernel
Enter Kernel directory, extract it:
cd $DEV_ROOT/04-Source
tar -xvf MYiR-iMX-Linux.tar.gz
cd MYiR-iMX-Linux
Compiling:
make distclean
make myd_y6ulx_defconfig
make zImage dtbs
When the compilation is done, the kernel image file zImage is generated in the 'arch/arm/boot' directory, and the DTB file is generated in the 'arch/arm/boot/dts'
directory.
DTB File Description
myd-y6ull-14x14-gpmi-weim.dtb MYD-Y6ULL NAND boot
myd-y6ull-14x14-emmc.dtb MYD-Y6ULL eMMC boot
myd-y6ul-14x14-gpmi-weim.dtb MYD-Y6UL NAND boot
myd-y6ul-14x14-emmc.dtb MYD-Y6UL eMMC boot
The MYD-Y6ULX Micro SD slot is connected to mmc0 controller.So, all dtb files is enabled the mmc0 controller by default.
About SD card boot mode, the U-Boot default find the myd-y6ull-14x14-evk-gpmi-weim.dtb file.
When you build kernel complete, the version tag will changed automatically.If you driver load with module type, you should recompile driver module.
make modules
After compile completation, it will be installed specify path:
mkdir ../target-kernel
make INSTALL_MOD_PATH=../target-kernel modules_install
Then you can package the target-kernel directory and extract it into /lib directory on file system of MYD-Y6ULX board.
9

3.3 Build File System
The Linux platform has many open source tools to build filesystem.These tools has some features to help developer build filesystem more easier in system build or
customize it.Recently, some are more populator Buildroot, Yocto, OpenEmbedded etc.The Yocto project support more powerful and system method to build a linux system
to suit your product.
Yocto not only a build tool for file system, it also has full workflow to build and maintain under Linux. It makes platform developer and application developer working
together under same framework. And resolve non-united and non-manage on the legacy develop way.
Yocto is an open source "umbrella" project.It means has more sub-projects.Yocto just containe all other projects and support an reference build system "Poky". The Poky
project will guide developer how to use, build, embedded Linux system.It has Bitbake, OpenEmbedded-Core, BSP package and more kinds of software packages and config
files.Through Poky to build different requirment system, eg: the minimal system core-image-minimal, include GUI system fsl-image-gui, include Qt5 graphics system fsl-
image-qt5.
NXP i.MX6UL/i.MX6ULL support build file to apply on Yocto project.These files will build a customization system by NXP.We also provide config files to support MYD-Y6ULX
series boards.This will help developer to build Linux system that can be programming to MYD-Y6ULX series boards.
Yocto has more rich development resource, help engineers to learn and customization the system. This document can't cover full usage on Yocto.We recommend developer
to build system after reading these documents.
Yocto Project Quick start
Bitback User Manual
Yocto Project Reference Manual
Yocto Project Development Manual
Yocto Project Complete Documentation Set
10
Otros manuales para MYD-Y6ULX Linux
1
Tabla de contenidos
Otros manuales de Placa madre de MYiR

MYiR
MYiR MYD-Y7Z010/007S Manual de usuario

MYiR
MYiR MYD-Y7Z010S Manual de usuario

MYiR
MYiR MYD-C7Z010/20 Manual operacional

MYiR
MYiR MYD-Y6ULX Linux Manual de usuario

MYiR
MYiR MYD-C8MMX Manual de usuario

MYiR
MYiR MYD-AM335X Manual de usuario

MYiR
MYiR MYS-6ULX-IOT Manual de usuario

MYiR
MYiR MYD-JX8MX Series Manual de usuario
Manuales populares de Placa madre de otras marcas

Telit Wireless Solutions
Telit Wireless Solutions SL869-3DR Manual de usuario

Gigabyte
Gigabyte GA-9IVDT Manual de usuario

Texas Instruments
Texas Instruments ADS8372EVM Manual de usuario

Commell
Commell MS-C73 Manual de usuario

IBT Technologies
IBT Technologies MB860 Manual de usuario

Nvidia
Nvidia TEGRA DG-04927-001_V01 Manual de usuario











