DESK-MX6UL-L/pdf

From DAVE Developer's Wiki
Jump to: navigation, search



History[edit | edit source]

DESK-MX6UL-L History
Version Issue Date Notes Refers to

1.0.1

Jun 2021 First DESK release AXEL ULite SOM
SDV04
SBC Lynx SBC
2.0.0 Mar 2022 DESK-MX6UL-L update to NXP 5.10.35 AXEL ULite-top.pngAXEL ULite SOM
SDV04-Carrier-C1R.jpgSDV04
SBC Lynx-top.pngSBC Lynx SBC


General Information[edit | edit source]

Release Notes[edit | edit source]

DAVE Embedded Systems adds to the Linux BSP from NXP the customization required to support the SOC platform. For this reason most of the documentation provided by NXP remains valid for the DESK development kit.

However, some customization is required, in particular at bootloader and linux kernel levels.

The following table reports the DESK releases information.

DESK version
Release number 3.0.0
Release type Major
Status Released
Release date Mar 2022
Release notes Ver 3.0.0
Product support AXEL ULite
MVM (distro version) Ubuntu 20.04
U-Boot version 2021.04-desk-mx6ul-l-3.0.0
Linux version 5.10.35-desk-mx6ul-l-3.0.0
Drivers

SPI NOR Flash (boot)
NAND
UART debug (2-wire)
USB Host
SD/MMC1
LCD
Splash screen

RTC
RS232
RS485
Audio
I2C
SPI
ConfigID

Manufacturer BSP version lf-5.10.35-2.0.0
Graphic libraries Qt 5.15.2
Build System Yocto hardknott (3.3)

DESK-MX6UL-L 3.0.0[edit | edit source]

200px-Emblem-important.svg.png

New MVM must be installed for using DESK-MX6UL-L-3.0.0. The VM is available for download on DAVE's XELK Reserved Area for registered users.

Release notes:

  • Major change to NXP BSP 5.10.35
  • Updated U-Boot and kernel versions
  • Updated Yocto version
  • Updated Qt version

Known Issues[edit | edit source]

The following table reports the known limitations of this DESK release:

Issue Description
Qt5 linuxfb not working platform linuxfb is not present on desk-image-qt5 image target
Linux kernel xconfig make xconfig does not work

Downloadable binary images[edit | edit source]

All binary images for DESK-MX6UL-L are hosted on DAVE Embedded System mirror server. There you can find a sub directory for each version of this development kit.

U-Boot performs 2-stage bootloader providing two files: SPL and u-boot.img. Both two files must be stored into SD card using dd command.

A summary of images with a brief description can be found into the table below:

Image DESK-MX6UL-L 1.0.1
Platform SDV04 - SDV0400011C2R SBC Lynx - SXUB4000I3R
Carrier Board ConfigID 003a 002f
LCD panel Ampire 800 x 480 7" LVDS 262K colors N.A.
SPL SPL SPL
u-boot.img u-boot.img u-boot.img
Linux kernel uImage
Device tree imx6ul-axelulite-cb003a.dtb imx6ul-lynx-som0013-cb002f.dtb
root file system dave-image-devel

DESK-MX6UL-L 1.0.1[edit | edit source]

200px-Emblem-important.svg.png

New MVM must be installed for using DESK-MX6UL-L-1.0.1. The VM is available for download on DAVE's XELK Reserved Area for registered users.

Release notes:

  • Major change to NXP BSP 4.14.98
  • Updated U-Boot and kernel versions
  • Updated Yocto version
  • Updated Qt version

Known Issues[edit | edit source]

The following table reports the known limitations of this DESK release:

Issue Description
Qt5 linuxfb not working platform linuxfb is not present on desk-image-qt5 image target
Linux kernel xconfig make xconfig does not work

Downloadable binary images[edit | edit source]

All binary images for DESK-MX6UL-L are hosted on DAVE Embedded System mirror server. There you can find a sub directory for each version of this development kit.

U-Boot performs 2-stage bootloader providing two files: SPL and u-boot.img. Both two files must be stored into SD card using dd command.

A summary of images with a brief description can be found into the table below:

Image DESK-MX6UL-L 1.0.1
Platform SDV04 - SDV0400011C2R SBC Lynx - SXUB4000I3R
Carrier Board ConfigID 003a 002f
LCD panel Ampire 800 x 480 7" LVDS 262K colors N.A.
bootscript boot.scr
SPL SPL SPL
u-boot.img u-boot.img u-boot.img
Linux kernel uImage
Device tree imx6ul-axelulite-cb003a.dtb imx6ul-lynx-som0013-cb002f.dtb
root file system dave-image-devel

Release types[edit | edit source]

DESK release type can be:

  • Major, when substantial changes are applied to the BSP (eg: major kernel version upgrades) or to the development kit (eg: new features, build system updates, ..). This usually means that a new DVDK is created for the DESK release
  • Maintenance, when minor updates and bug fixes are introduced. This usually means that the DVDK remains the same provided with the previous major version, and only an update of the source tree repositories (and the tftp binaries) is required

As an example, DESK 1.1.0 is a maintenance release, so it provides the DVDK released with the 1.0.0 major release; customers can easily upgrade to the 1.1.0 release by updating the software components as described in Synchronizing git repositories.

Supported platforms[edit | edit source]

The following table reports the supported platforms in this DESK release:

Platform Description
SBC Lynx Single Board Computer using the i.MX6UL SOC
SDV04 Single Board Computer using AXEL_ULite SOM as Evaluation Kit


Virtual Machine[edit | edit source]

DESK-MX6UL-L contains all the required software and documentation to start developing Linux application on the AXEL ULite platform. In particular, DESK-MX6UL-L provides a virtual machine, called DVDK, with the following features:

  • VirtualBox virtual machine (.OVA archive)
  • based on Lubuntu 16.04 LTS (64-bit version)
  • pre-installed VirtualBox Guest Additions
  • LXDE desktop environment
  • boot disk with the distro and pre-configured basic Linux services:
    • TFTP: with base directory /srv/tftp/
    • NFS: configured through the /etc/exports file
  • secondary disk containing source code and tools:
    • bootloader (u-boot) source tree cloned from DAVE Embedded Systems public git repository
    • Linux kernel source tree cloned from DAVE Embedded Systems public git repository
    • external pre-built toolchain
    • Yocto BSP for AXEL ULite SOM
  • pre-installed Yocto-based root file systems with setup scripts, makefiles, example applications, ...
  • administrator account (dvdk) with autologin. Please note that the user account credentials are provided with the development kit (you can find them in the README file contained in the sw/dvdk folder of the kit distribution)
    • user: dvdk
    • password: dvdk

Please note that u-boot and kernel source trees are derived from the official trees released by NXP/Freescale; these trees have been customized to add support for the AXEL ULite SOM.

Guest Addictions[edit | edit source]

Guest Addictions installation may fail if the VirtualBox version is different from the VM linux kernel version.

In case of VBox error message:

Error: kernel headers not found

as suggested here, install the correct kernel header using the following command:

sudo apt-get install linux-headers-`uname -r`

and the run the Guest Addictions install

dvdk@vagrant:/media/dvdk/VBox_GAs_6.1.18$ sudo ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.18 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.1.16 of VirtualBox Guest Additions...
update-initramfs: Generating /boot/initrd.img-4.4.0-197-generic
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel 
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 4.4.0-197-generic.
update-initramfs: Generating /boot/initrd.img-4.4.0-197-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
VirtualBox Guest Additions: Running kernel modules will not be replaced until 
the system is restarted
dvdk@vagrant:/media/dvdk/VBox_GAs_6.1.18$ 

Host setup[edit | edit source]

As stated previously, AXEL ULite SOM host tools are based on a Managed Virtual Machine. As indicated here, microSD card delivered along with AXEL ULite Evaluation Kit includes basic version of MVM that is the default option.

Please follows the README file on the SD card to extract the *.ova archive and to install the MVM.

It is also worth remembering that access to git repositories is required to download target source code. To enable it, please refer to this page.

MVM can be downloaded here. For accessing DESK Reserved area please contact our helpdesk support channel

To install it, please refer to this page.



ConfigID and UniqueID[edit | edit source]

ConfigID[edit | edit source]

ConfigID is a new feature of DAVE Embedded Systems products. Its main purpose is providing an automatic mechanism for the identification of the product model and configuration.

With ConfigID, we aim at:

  • completing the hardware configuration information that the software can't normally auto-detect (i.e. RAM chip version,...), implementing a dedicated reliable detect procedure
  • when required, overriding the auto-detected hardware configuration information

When implemented, this mechanism allows for:

  • initializing in the proper way the hardware platform, based on the specific features and parameters of the product, using a common software base (eg: a typical case is the SDRAM controller parameters, which must be configured by U-Boot depending on the particular memory chip, which can be different for the various SOM models)
  • getting the complete hardware configuration (combining ConfigID with the information collectable at runtime) of a product deployed on the field

In simple words, model identification means the capability of reading a numerical code, stored in an available device (SOC's OTP , I2C EEPROM, 1-wire memories, protected NOR flash, etc.)

There are two ConfigIDs:

  • SOM ConfigID: which reflects the characteristics of the SOM (stored on the SOM itself)
  • Carrier Board (CB) ConfigID: which reflects the characteristics of the carrier board that hosts the SOM (stored on the carrier board itself and read by the SOM at boot time)

UniqueID[edit | edit source]

An additional attribute is UniqueID, which is a read-only code which univocally identifies a single product and is used for traceability.


200px-Emblem-important.svg.png

It is worth remembering that ConfigID and UniqueID are independent from product serial number.

Customer's action[edit | edit source]

DAVE Embedded Systems recommends to be up-to-date with Official SOM's BSPs for taking advantages of ConfigID/UniqueId features: this is the only required action.

  • ConfigID advantage: to allow U-Boot bootloader to be executed only with the correct configuration (if the U-Boot loaded is not the proper one, it may stop execution avoiding incorrect behaviour)
  • UniqueID advantage: to trace univocally each individual SOMs and, in turn, all the on-the-field equipments

ConfigID values[edit | edit source]

ConfigID is a N-bit (typically N>8) signed integer, that can have the following values:

  • < 0: error
    • -1: not initialized
  • = 0: ConfigID legacy
    • for prototypes (ConfigID not yet defined) or for products manufactured before the introduction of the ConfigID feature
  • > 0: valid ConfigID
    • values are reported accordingly with the specific product table

Hardware implementations of the ConfigID[edit | edit source]

The following paragraphs briefly describe the available solutions for storing the ConfigID.

OTP on the SOC[edit | edit source]

Some SOCs provides programmable OTPs (eg. for security, MAC address, boot modes, etc). Usually, some of these are general purpose registers and can be managed by the user.

This is the ideal implementation, because:

  • ConfigID is stored in the most important component of the SOM
  • the component that hosts the ConfigID is NOT optional
  • typically, a very selective lock can be forced. In general, for reliability and/or security reasons, OTP areas used to store ConfigIDs may be locked during the manufacturing process.

OTP 1-wire memory[edit | edit source]

This implementation requires a 1-wire memory chip.

I2C Eeprom[edit | edit source]

This implementation requires connecting an EEPROM to an I2C bus of the SOC. Moreover, routing a write protect pin to the SOM connector is required.

NOR Flash SPI[edit | edit source]

This implementation requires a NOR flash connected to the SPI bus of the SOC.

DAVE Embedded Systems' hardware implementation[edit | edit source]

DAVE's SOCs implement the ConfigID feature depending on hardware Capabilities of the SOCs. The following list shows the priority used for its implementation:

  1. OTPs
    1. example: AXEL family processor (i.MX6) implements ConfigID using processor's OTP
    2. AXEL uses GP1 eFuse register to store ConfigID
  2. NOR Flash SPI
    1. example: DIVA family processor (AM335x) implements ConfigID using NOR SPI (if present)
    2. DIVA and BORA use the first 32bytes OTP block on NOR SPI to store ConfigID (and its CRC32), UniqueID (and its CRC32)
  3. I2C Eeprom
    1. example: DIVA family processor (AM335x) or BORA Lite processor (ZYNQ) implements ConfigID using I2C Eeprom when NOR SPI is not present (module boots from NAND or SD)
    2. DIVA and BORA use the first 32bytes on I2C EPROM to store ConfigID (and its CRC32), UniqueID (and its CRC32)
  4. 1-wire
    1. example: latest XELK, DIVELK, BELK Carrier Boards implement CB ConfigID using the onboard 1-wire device (DS2431)

Software implementation[edit | edit source]

U-Boot[edit | edit source]

u-boot integrates the software routines for reading and displaying the ConfigID: hereunder an example of SOM ConfigID at startup:

U-Boot 2013.04-00010-gcb05b30 (Jun 26 2015 - 12:49:26)-xelk-2.1.0

CPU:   Freescale i.MX6Q rev1.5 at 792 MHz
CPU:   Temperature 47 C, limits (-40 C, 125 C), calibration data: 0xc0
Reset cause: POR
Environment: SPI Flash
I2C:   ready
DRAM:  2 GiB
Now running in RAM - U-Boot at: 8ff35000
NAND:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected S25FL256S with page size 64 KiB, total 32 MiB
In:    serial
Out:   serial
Err:   serial
Power: found PFUZE100 (devid=10, revid=21)
SOM ConfigID#: 00000003
SOM UniqueID#: df646299:0b0579d4

For accessing these information on Linux procfs, the device tree must be modified (using u-boot fdt command): for example:

DIVA# setenv fdtfixup 'fdt addr ${fdtaddr}; run fdtfixup_configid'
DIVA# setenv fdtfixup_configid 'fdt set / som_configid ${som_configid#}; fdt set / som_uniqueid ${som_uniqueid#}; fdt set / cb_configid ${cb_configid#}; fdt set / cb_uniqueid ${cb_uniqueid#}'
Linux[edit | edit source]

It is possible to read the ConfigID/UniqueID via procfs; for example:

root@axel-lite:~# cat /proc/device-tree/som/configid && echo
00000003
root@axel-lite:~# cat /proc/device-tree/som/uniqueid && echo
df646299:0b0579d4
root@axel-lite:~#

Legacy device tree, has a sightly different procfs structure:

root@axel-lite:~# cat /proc/device-tree/som_configid && echo
00000003
root@axel-lite:~# cat /proc/device-tree/som_uniqueid && echo
df646299:0b0579d4
root@axel-lite:~#

A real case example of ConfigID benefit[edit | edit source]

The ConfigID benefit is clear when:

  • there is a number of products deployed on the field
  • the products deployed on the field needs a SW update

The ideal scenario is that all products are equal and there are no differences on the Bill Of Material (BOM):

In this case there are no problems to deploy a new SW update on the field: all products have the same HW configuration, then the same SW configuration.

Unfortunately, this is an ideal scenario. The reality is that:

  • component obsolescence
  • product shortage
  • second source strategies

force to have an on-the-field different version of product (with same functionalities but with different HW configuration) which doesn't permit to realize what proposed in the ideal case.


200px-Emblem-important.svg.png

The usage of the ConfigID technique, allows the running SW to identify the underlying HW configuration and automatically adapt the BSP (i.e. the driver layer) to properly use the HW subsystems: this, maintaining the overall product features identical to the final User point-of-view.

With a scenario, like the one described above, if you would like to update the SW you need to implement a strategy for understanding what platform version is going to be updated. The Config ID is used exactly for this goal.

The ConfigID provides to the software update routine the information on which product version is so the update can be adapted to the exact product version.

In this way, you can distribute one single version of the software update which will automatically adapt itself to the currently running platform.

How to handle After Sales with Config ID[edit | edit source]

One of the mos common questions about Config ID is how to handle the Config ID issue. Below is described with an example how to handle it.

This product is returned from the field with a problem on the display:

Config ID A

After Sales Dept analizes the product and decide to substitute the display. The problem is that the existing display is not available - because of is End Of Life (EOL) - and it is required to move to a different display: in the product a different Config ID will be written because of the 2 displays requires a dedicated SW version and cannot be distinguished automatically during the startup. The final result is to have the similar product:

Config ID B

As indicated, the new display requires a different Config ID (from A to B) so it can be updated with an easy software routine before start the SW update. This Config ID update routine can be implemented in manufacturing facility typically using a dedicated USB pen drive which modify the saved ConfigID to the new one depending on the storage memory in use



ConfigID[edit | edit source]

This article describes how the ConfigID is implemented in the products supported by the DESK-MX6UL-L Linux Kit.

AXEL ULite[edit | edit source]

As AXEL ULite is a system-on-module (SOM), the typical mechanism described here is used.

Moreover, a system is composed of the combination of a SOM and a carrier board. In this case, two ConfigIDs are used to identify the actual board configuration like it was a SOM+carrier board system.

For the sake of simplicity, the first ConfigID is denoted as SOM ConfigID, while the second one is denoted as CB ConfigID:

...
SOM ConfigID#: 00000014
SOM UniqueID#: ee6ac309:171411d4
CB ConfigID#: 0000003a
CB UniqueID#: 00000000:00000000
Board: MX6UL AXEL ULite rev.A on SDV04
...

Generally speaking:

  • SOM ConfigID is used to identify the configuration of the basic features of the SOM
  • CB ConfigID is used to identify the peripherals and the I/O interfaces.


200px-Emblem-important.svg.png

NXP silicon manufacturer guarantees that processors UIDs (a.k.a. SOM UniqueID# on DESK-MX6UL-L) to be unique over the whole MX6UL family



Booting from NFS[edit | edit source]

This configuration is very helpful during the software development (both for kernel and applications). The kernel image is downloaded via TFTP while the root file system is remotely mounted via NFS from the host. It is assumed that the development host:

  • is connected with the target host board through an Ethernet LAN
  • exports the directory containing the root file system for the target through the NFS server
  • runs a TFTP server.
  • has a proper subnet IP address

net_nfs configuration[edit | edit source]

DESK-MX6UL-L Virtual Machine is properly configured for the TFTP and NFS debug.

In any case, some variables has to be configured on the target and the VM itself has to be configured for respect to the network environment.

Host (Virtual Machine) configuration[edit | edit source]

The DESK-MX6UL-L Virtual Machine has the tftp and nfs services already running. Optionally, their configuration has to be changed according to the network configuration where the target is connected to.

Check and properly configure the items the following chapters: network adapter, nfs server

network adapter[edit | edit source]

The network adpater should be configured in bridge mode in order to allow the target to get the files from the VM


Network-bridge.png


then, modify the network interfaces configuration using the netplan configuration file, for example (sse Ubuntu network configuration):

dvdk@vagrant:~$ cat /etc/netplan/01-netcfg.yaml 
network:
  version: 2
  ethernets:
    eth0:
      dhcp4: false
      addresses:
        - 192.168.0.125/24
      gateway4: 192.168.0.254
      nameservers:
          addresses: [8.8.8.8, 1.1.1.1]
dvdk@vagrant:~$ 

and restart it:

dvdk@vagrant:~$ sudo netplan apply
dvdk@vagrant:~$ 

Check or re-configure the Host IP address

dvdk@vagrant:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:b1:28:5d brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.125/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:feb1:285d/64 scope link 
       valid_lft forever preferred_lft forever
dvdk@vagrant:~$ 

nfs server[edit | edit source]

The NFS server should exports the correct file system directory (in our example)

dvdk@vagrant:~$ cat /etc/exports 
/home 0.0.0.0/0.0.0.0(rw,async,no_root_squash,no_subtree_check,crossmnt)
dvdk@vagrant:~$ 

otherwise, change its configuration and then restart the nfs server:

dvdk@vagrant:~$ sudo /etc/init.d/nfs-kernel-server restart
[sudo] password for dvdk: 
 * Stopping NFS kernel daemon                                                                                                                                                                                                         [ OK ] 
 * Unexporting directories for NFS kernel daemon...                                                                                                                                                                                   [ OK ] 
 * Exporting directories for NFS kernel daemon...                                                                                                                                                                                     [ OK ] 
 * Starting NFS kernel daemon                                                                                                                                                                                                         [ OK ] 
dvdk@vagrant:~$ 

Target configuration[edit | edit source]

The IP address for server and target should be configured: an example (for a network subnet 192.168.0.x)

=> setenv serverip 192.168.0.125
=> setenv ipaddr 192.168.0.90
  • serverip is the IP address of the host machine running the tftp/nfs server
  • ipaddr is the IP address of the target

The kernel and device tree files has to be selected

=> setenv bootfile /tftpboot/desk-mx-l/desk-mx6ul-l-1.0.0_uImage
=> setenv fdtfile /tftpboot/desk-mx-l/desk-mx6ul-l-1.0.0_imx6ul-lynx-som0013-cb002f.dtb

finally, the root file system directory on the Virtual Machine should be configured for let the kernel to find the INIT

=> setenv rootpath /home/dvdk/desk-mx-l/rfs/desk-mx6ul-l/

To run this configuration just issue the net_nfs command which firstly download the kernel and device tree using the tftp protocol

U-Boot SPL 2018.03-desk-mx6ul-l-1.0.1 (Apr 20 2021 - 12:44:32 +0200)
SOM ConfigID#: 00000013
Trying to boot from MMC1


U-Boot 2018.03-desk-mx6ul-l-1.0.1 (Apr 20 2021 - 12:44:32 +0200), Build: desk-mx6ul-l-1.0.1

CPU:   Freescale i.MX6UL rev1.2 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 43C
Reset cause: POR
I2C:   ready
DRAM:  512 MiB
Relocating to 9ff4f000, new gd at 9df4eeb0, sp at 9df4ee90
PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11
NAND:  1024 MiB
MMC:   FSL_SDHC: 0
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc0 is current device (SD)
SOM ConfigID#: 00000013
SOM UniqueID#: e933585d:0f2f21d4
CB ConfigID#: 0000002f
CB UniqueID#: 00000000:00000000
Board: MX6UL SBC Lynx
Net:   FEC0
Warning: FEC0 (eth0) using random MAC address - 7a:f5:7c:86:e3:ac

Normal Boot
Hit ENTER within 3 seconds to stop autoboot
=> run net_nfs
Using FEC0 device
TFTP from server 192.168.0.125; our IP address is 192.168.0.90
Filename 'desk-mx-l/desk-mx6ul-l-1.0.0_uImage'.
Load address: 0x80800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##############
         585 KiB/s
done
Bytes transferred = 7056696 (6bad38 hex)
Using FEC0 device
TFTP from server 192.168.0.125; our IP address is 192.168.0.90
Filename 'desk-mx-l/desk-mx6ul-l-1.0.0_imx6ul-lynx-som0013-cb002f.dtb'.
Load address: 0x83000000
Loading: #######
         546.9 KiB/s
done
Bytes transferred = 34211 (85a3 hex)
FDT: override 'som_uniqueid' with 'e933585d:0f2f21d4'
FDT: override 'cb_uniqueid' with '00000000:00000000'
## Booting kernel from Legacy Image at 80800000 ...
   Image Name:   Linux-4.14.98-desk-mx6ul-l-1.0.0
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    7056632 Bytes = 6.7 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Loading Kernel Image ... OK
   reserving fdt memory region: addr=83000000 size=9000
   Using Device Tree in place at 83000000, end 8300bfff
Modify /soc/aips-bus@02000000/bee@02044000:status disabled
ft_system_setup for mx6

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.98-desk-mx6ul-l-1.0.0 (jenkins@xenialbakery) (gcc version 7.3.0 (GCC)) #1 SMP PREEMPT Mon Apr 12 13:06:54 CEST 2021
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Freescale i.MX6 UltraLite LYNX Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 16 pages/cpu @9fbcf000 s35596 r8192 d21748 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.125:/home/dvdk/desk-mx-l/rfs/desk-mx6ul-l/,v3,tcp ip=192.168.0.90:192.168.0.125::255.255.255.0:lynx:eth0:off panic=1 fec_mac= console=ttymxc0,115200 vmalloc=400M mtdparts=gpmi-nand:2M(nand-SPL),6M(nand-uboot),1M(nand-env1),1M(nand-env2),1M(nand-fdt),1M(nand-spare),8M(nand-kernel),4M(nand-splash),-(nand-ubi);spi0.0:64k(spi-SPL),960k(spi-uboot),256k(spi-env1),256k(spi-env2),512k(spi-dtb),8M(spi-kernel),4M(spi-splash),-(spi-free)
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 505116K/524288K available (9216K kernel code, 662K rwdata, 2556K rodata, 1024K init, 426K bss, 19172K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xa0800000 - 0xff800000   (1520 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
[    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
[    0.000000]     modules : 0x7f000000 - 0x7fe00000   (  14 MB)
[    0.000000]       .text : 0x80008000 - 0x80a00000   (10208 kB)
[    0.000000]       .init : 0x80d00000 - 0x80e00000   (1024 kB)
[    0.000000]       .data : 0x80e00000 - 0x80ea58f8   ( 663 kB)
[    0.000000]        .bss : 0x80eae730 - 0x80f19048   ( 427 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] Switching to timer-based delay loop, resolution 333ns
[    0.000017] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[    0.000059] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[    0.003068] Console: colour dummy device 80x30
[    0.003126] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[    0.003167] pid_max: default: 32768 minimum: 301
[    0.003446] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.003482] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.004713] CPU: Testing write buffer coherency: ok
[    0.005302] /cpus/cpu@0 missing clock-frequency property
[    0.005341] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.040538] Setting up static identity map for 0x80100000 - 0x80100060
[    0.060541] Hierarchical SRCU implementation.
[    0.100783] smp: Bringing up secondary CPUs ...
[    0.100824] smp: Brought up 1 node, 1 CPU
[    0.100851] SMP: Total of 1 processors activated (6.00 BogoMIPS).
[    0.100870] CPU: All CPU(s) started in SVC mode.
[    0.102452] devtmpfs: initialized
[    0.118845] random: get_random_u32 called from bucket_table_alloc+0x114/0x23c with crng_init=0
[    0.119329] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.119922] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.119977] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.120319] pinctrl core: initialized pinctrl subsystem
[    0.122467] NET: Registered protocol family 16
[    0.123341] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.131145] cpuidle: using governor menu
[    0.146216] vdd3p0: supplied by regulator-dummy
[    0.147452] cpu: supplied by regulator-dummy
[    0.148621] vddsoc: supplied by regulator-dummy
[    0.168907] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.168941] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.171853] imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[    0.174945] imx rpmsg driver is registered.
[    0.255208] vgaarb: loaded
[    0.256647] SCSI subsystem initialized
[    0.262856] usbcore: registered new interface driver usbfs
[    0.263013] usbcore: registered new interface driver hub
[    0.263231] usbcore: registered new device driver usb
[    0.265540] i2c i2c-0: IMX I2C adapter registered
[    0.265589] i2c i2c-0: can't use DMA, using PIO instead.
[    0.266643] Linux video capture interface: v2.00
[    0.266805] pps_core: LinuxPPS API ver. 1 registered
[    0.266828] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.266886] PTP clock support registered
[    0.268580] MIPI CSI2 driver module loaded
[    0.268990] Advanced Linux Sound Architecture Driver Initialized.
[    0.270559] Bluetooth: Core ver 2.22
[    0.270674] NET: Registered protocol family 31
[    0.270700] Bluetooth: HCI device and connection manager initialized
[    0.270741] Bluetooth: HCI socket layer initialized
[    0.270773] Bluetooth: L2CAP socket layer initialized
[    0.270852] Bluetooth: SCO socket layer initialized
[    0.283043] clocksource: Switched to clocksource mxc_timer1
[    0.283288] VFS: Disk quotas dquot_6.6.0
[    0.283432] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.304798] NET: Registered protocol family 2
[    0.306182] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.306313] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.306474] TCP: Hash tables configured (established 4096 bind 4096)
[    0.306687] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.306754] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.307088] NET: Registered protocol family 1
[    0.328254] RPC: Registered named UNIX socket transport module.
[    0.328290] RPC: Registered udp transport module.
[    0.328310] RPC: Registered tcp transport module.
[    0.328330] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.332910] Bus freq driver module loaded
[    0.336018] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.357713] NFS: Registering the id_resolver key type
[    0.357791] Key type id_resolver registered
[    0.357814] Key type id_legacy registered
[    0.357913] ntfs: driver 2.1.32 [Flags: R/W].
[    0.358766] fuse init (API version 7.26)
[    0.372952] io scheduler noop registered
[    0.372988] io scheduler deadline registered
[    0.373486] io scheduler cfq registered (default)
[    0.373518] io scheduler mq-deadline registered
[    0.373540] io scheduler kyber registered
[    0.374817] imx-weim 21b8000.weim: Driver registered.
[    0.380420] imx-sdma 20ec000.sdma: Falling back to user helper
[    0.390475] mxs-dma 1804000.dma-apbh: initialized
[    0.395891] pfuze100-regulator 0-0008: Full layer: 1, Metal layer: 1
[    0.396686] pfuze100-regulator 0-0008: FAB: 0, FIN: 0
[    0.396715] pfuze100-regulator 0-0008: pfuze3000 found.
[    0.420815] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.424628] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 21, base_baud = 5000000) is a IMX
[    1.136528] console [ttymxc0] enabled
[    1.141708] 2024000.serial: ttymxc7 at MMIO 0x2024000 (irq = 22, base_baud = 5000000) is a IMX
[    1.152381] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 58, base_baud = 5000000) is a IMX
[    1.162520] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 59, base_baud = 5000000) is a IMX
[    1.177058] imx sema4 driver is registered.
[    1.182468] [drm] Initialized vivante 1.0.0 20120216 for platform:Vivante GCCore on minor 0
[    1.191086] [drm] Initialized vivante 1.0.0 20120216 on minor 0
[    1.220062] brd: module loaded
[    1.241103] loop: module loaded
[    1.251977] random: fast init done
[    1.262824] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xd3
[    1.269278] nand: AMD/Spansion S34ML08G1
[    1.273292] nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.281269] gpmi-nand 1806000.gpmi-nand: mode:4 ,failed in set feature.
[    1.288014] Scanning device for bad blocks
[    1.932505] random: crng init done
[    2.523810] 9 cmdlinepart partitions found on MTD device gpmi-nand
[    2.530038] Creating 9 MTD partitions on "gpmi-nand":
[    2.535215] 0x000000000000-0x000000200000 : "nand-SPL"
[    2.542653] 0x000000200000-0x000000800000 : "nand-uboot"
[    2.550399] 0x000000800000-0x000000900000 : "nand-env1"
[    2.557857] 0x000000900000-0x000000a00000 : "nand-env2"
[    2.565334] 0x000000a00000-0x000000b00000 : "nand-fdt"
[    2.572591] 0x000000b00000-0x000000c00000 : "nand-spare"
[    2.580220] 0x000000c00000-0x000001400000 : "nand-kernel"
[    2.588089] 0x000001400000-0x000001800000 : "nand-splash"
[    2.595842] 0x000001800000-0x000040000000 : "nand-ubi"
[    2.636516] gpmi-nand 1806000.gpmi-nand: driver registered.
[    2.647294] m25p80 spi0.0: s25fl256s1 (32768 Kbytes)
[    2.652326] 8 cmdlinepart partitions found on MTD device spi0.0
[    2.658409] Creating 8 MTD partitions on "spi0.0":
[    2.663320] 0x000000000000-0x000000010000 : "spi-SPL"
[    2.670626] 0x000000010000-0x000000100000 : "spi-uboot"
[    2.678045] 0x000000100000-0x000000140000 : "spi-env1"
[    2.685454] 0x000000140000-0x000000180000 : "spi-env2"
[    2.692714] 0x000000180000-0x000000200000 : "spi-dtb"
[    2.700224] 0x000000200000-0x000000a00000 : "spi-kernel"
[    2.707722] 0x000000a00000-0x000000e00000 : "spi-splash"
[    2.715284] 0x000000e00000-0x000002000000 : "spi-free"
[    2.722616] spi_imx 2008000.ecspi: probed
[    2.728453] libphy: Fixed MDIO Bus: probed
[    2.733598] CAN device driver interface
[    2.738109] flexcan 2090000.flexcan: 2090000.flexcan supply xceiver not found, using dummy regulator
[    2.749101] flexcan 2090000.flexcan: device registered (reg_base=a099c000, irq=24)
[    2.759546] fec 2188000.ethernet: 2188000.ethernet supply phy not found, using dummy regulator
[    3.284059] pps pps0: new PPS source ptp0
[    3.289388] libphy: fec_enet_mii_bus: probed
[    3.306637] fec 2188000.ethernet eth0: registered PHC device 0
[    3.314997] usbcore: registered new interface driver asix
[    3.320566] usbcore: registered new interface driver ax88179_178a
[    3.327020] usbcore: registered new interface driver cdc_ether
[    3.332986] usbcore: registered new interface driver cdc_eem
[    3.338987] usbcore: registered new interface driver net1080
[    3.344928] usbcore: registered new interface driver cdc_subset
[    3.350998] usbcore: registered new interface driver zaurus
[    3.356897] usbcore: registered new interface driver cdc_ncm
[    3.362691] usbcore: registered new interface driver cdc_mbim
[    3.368547] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.375200] ehci-pci: EHCI PCI platform driver
[    3.380508] usbcore: registered new interface driver cdc_wdm
[    3.386456] usbcore: registered new interface driver usb-storage
[    3.395184] usbmisc_imx 2184800.usbmisc: 2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
[    3.407348] usb_otg1_vbus: supplied by SWBST
[    3.439240] usb_otg2_vbus: supplied by SWBST
[    3.447845] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    3.452985] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    3.483099] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    3.489135] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.496098] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.503415] usb usb1: Product: EHCI Host Controller
[    3.508331] usb usb1: Manufacturer: Linux 4.14.98-desk-mx6ul-l-1.0.0 ehci_hcd
[    3.515550] usb usb1: SerialNumber: ci_hdrc.1
[    3.521368] hub 1-0:1.0: USB hub found
[    3.525438] hub 1-0:1.0: 1 port detected
[    3.544738] input: 20cc000.snvs:snvs-powerkey as /devices/soc0/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
[    3.560856] snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-rtc-lp as rtc0
[    3.570568] i2c /dev entries driver
[    3.580606] IR NEC protocol handler initialized
[    3.585402] IR RC5(x/sz) protocol handler initialized
[    3.590491] IR RC6 protocol handler initialized
[    3.595111] IR JVC protocol handler initialized
[    3.599672] IR Sony protocol handler initialized
[    3.604363] IR SANYO protocol handler initialized
[    3.609096] IR Sharp protocol handler initialized
[    3.613924] IR MCE Keyboard/mouse protocol handler initialized
[    3.619790] IR XMP protocol handler initialized
[    3.628803] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
[    3.636234] Bluetooth: HCI UART driver ver 2.3
[    3.640729] Bluetooth: HCI UART protocol H4 registered
[    3.646005] Bluetooth: HCI UART protocol BCSP registered
[    3.651708] Bluetooth: HCI UART protocol LL registered
[    3.658163] sdhci: Secure Digital Host Controller Interface driver
[    3.664497] sdhci: Copyright(c) Pierre Ossman
[    3.669023] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.676846] sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO
[    3.693113] ci_hdrc ci_hdrc.0: there is a vbus glitch
[    3.743583] mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
[    3.801199] mmc0: host does not support reading read-only switch, assuming write-enable
[    3.815510] mmc0: new high speed SDHC card at address 59b4
[    3.822630] mmcblk0: mmc0:59b4 USDU1 14.9 GiB
[    3.839776]  mmcblk0: p1 p2
[    3.903139] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
[    3.922141] caam 2140000.caam: ERA source: CCBVID.
[    3.934780] caam 2140000.caam: device ID = 0x0a16030000000000 (Era 8)
[    3.941283] caam 2140000.caam: job rings = 3, qi = 0, dpaa2 = no
[    3.949372] caam_jr 2141000.jr0: Entropy delay = 3200
[    4.015423] caam_jr 2141000.jr0: Instantiated RNG4 SH0.
[    4.076166] caam_jr 2141000.jr0: Instantiated RNG4 SH1.
[    4.108598] caam algorithms registered in /proc/crypto
[    4.120572] caam_jr 2141000.jr0: registering rng-caam
[    4.126870] caam 2140000.caam: caam pkc algorithms registered in /proc/crypto
[    4.136562] platform caam_sm: blkkey_ex: 8 keystore units available
[    4.143394] platform caam_sm: 64-bit clear key:
[    4.147981] platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
[    4.153816] platform caam_sm: 64-bit black key:
[    4.158396] platform caam_sm: [0000] ea 7c 2a 3c 7d 2f d2 c7
[    4.164236] platform caam_sm: [0008] 33 49 46 7a 30 73 26 8f
[    4.169932] platform caam_sm: 128-bit clear key:
[    4.174703] platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
[    4.180402] platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f
[    4.186269] platform caam_sm: 128-bit black key:
[    4.190932] platform caam_sm: [0000] 3b 02 06 05 9b 44 d8 9a
[    4.196733] platform caam_sm: [0008] 92 05 c4 26 2f 22 fe 63
[    4.202430] platform caam_sm: 192-bit clear key:
[    4.207139] platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
[    4.212838] platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f
[    4.218580] platform caam_sm: [0016] 10 11 12 13 14 15 16 17
[    4.226391] platform caam_sm: 192-bit black key:
[    4.231052] platform caam_sm: [0000] 54 bf 35 b6 79 69 05 f3
[    4.236803] platform caam_sm: [0008] 32 7f 40 92 c9 86 e4 c6
[    4.242503] platform caam_sm: [0016] 5a e1 06 b3 cd ef e0 7c
[    4.248243] platform caam_sm: [0024] 7e b7 19 b9 45 66 ff 83
[    4.254043] platform caam_sm: 256-bit clear key:
[    4.258853] platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
[    4.266791] platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f
[    4.275602] platform caam_sm: [0016] 10 11 12 13 14 15 16 17
[    4.281444] platform caam_sm: [0024] 18 19 1a 1b 1c 1d 1e 1f
[    4.287341] platform caam_sm: 256-bit black key:
[    4.292132] platform caam_sm: [0000] 9a 35 bc d7 bb 81 1a 61
[    4.298029] platform caam_sm: [0008] b0 0f 8f e8 9e f7 17 d4
[    4.303933] platform caam_sm: [0016] 56 c8 b3 e1 51 fb a0 35
[    4.309761] platform caam_sm: [0024] 40 f8 ef e7 b1 ae 99 6b
[    4.315654] platform caam_sm: 64-bit unwritten blob:
[    4.320791] platform caam_sm: [0000] 00 00 00 00 00 00 00 00
[    4.327759] platform caam_sm: [0008] 00 00 00 00 00 00 00 00
[    4.334734] platform caam_sm: [0016] 00 00 00 00 00 00 00 00
[    4.340439] platform caam_sm: [0024] 00 00 00 00 00 00 00 00
[    4.346196] platform caam_sm: [0032] 00 00 00 00 00 00 00 00
[    4.351895] platform caam_sm: [0040] 00 00 00 00 00 00 00 00
[    4.357647] platform caam_sm: [0048] 00 00 00 00 00 00 00 00
[    4.363398] platform caam_sm: [0056] 00 00 00 00 00 00 00 00
[    4.369096] platform caam_sm: [0064] 00 00 00 00 00 00 00 00
[    4.374835] platform caam_sm: [0072] 00 00 00 00 00 00 00 00
[    4.380529] platform caam_sm: [0080] 00 00 00 00 00 00 00 00
[    4.386264] platform caam_sm: [0088] 00 00 00 00 00 00 00 00
[    4.391953] platform caam_sm: 128-bit unwritten blob:
[    4.397084] platform caam_sm: [0000] 00 00 00 00 00 00 00 00
[    4.402779] platform caam_sm: [0008] 00 00 00 00 00 00 00 00
[    4.408516] platform caam_sm: [0016] 00 00 00 00 00 00 00 00
[    4.414251] platform caam_sm: [0024] 00 00 00 00 00 00 00 00
[    4.419946] platform caam_sm: [0032] 00 00 00 00 00 00 00 00
[    4.425751] platform caam_sm: [0040] 00 00 00 00 00 00 00 00
[    4.431513] platform caam_sm: [0048] 00 00 00 00 00 00 00 00
[    4.437265] platform caam_sm: [0056] 00 00 00 00 00 00 00 00
[    4.442963] platform caam_sm: [0064] 00 00 00 00 00 00 00 00
[    4.448708] platform caam_sm: [0072] 00 00 00 00 00 00 00 00
[    4.456517] platform caam_sm: [0080] 00 00 00 00 00 00 00 00
[    4.462217] platform caam_sm: [0088] 00 00 00 00 00 00 00 00
[    4.467963] platform caam_sm: 196-bit unwritten blob:
[    4.473102] platform caam_sm: [0000] 00 00 00 00 00 00 00 00
[    4.478798] platform caam_sm: [0008] 00 00 00 00 00 00 00 00
[    4.484596] platform caam_sm: [0016] 00 00 00 00 00 00 00 00
[    4.490463] platform caam_sm: [0024] 00 00 00 00 00 00 00 00
[    4.498419] platform caam_sm: [0032] 00 00 00 00 00 00 00 00
[    4.507299] platform caam_sm: [0040] 00 00 00 00 00 00 00 00
[    4.513238] platform caam_sm: [0048] 00 00 00 00 00 00 00 00
[    4.519090] platform caam_sm: [0056] 00 00 00 00 00 00 00 00
[    4.525031] platform caam_sm: [0064] 00 00 00 00 00 00 00 00
[    4.530891] platform caam_sm: [0072] 00 00 00 00 00 00 00 00
[    4.536827] platform caam_sm: [0080] 00 00 00 00 00 00 00 00
[    4.542690] platform caam_sm: [0088] 00 00 00 00 00 00 00 00
[    4.548619] platform caam_sm: 256-bit unwritten blob:
[    4.553938] platform caam_sm: [0000] 00 00 00 00 00 00 00 00
[    4.560816] platform caam_sm: [0008] 00 00 00 00 00 00 00 00
[    4.567840] platform caam_sm: [0016] 00 00 00 00 00 00 00 00
[    4.573602] platform caam_sm: [0024] 00 00 00 00 00 00 00 00
[    4.579297] platform caam_sm: [0032] 00 00 00 00 00 00 00 00
[    4.585038] platform caam_sm: [0040] 00 00 00 00 00 00 00 00
[    4.590732] platform caam_sm: [0048] 00 00 00 00 00 00 00 00
[    4.596467] platform caam_sm: [0056] 00 00 00 00 00 00 00 00
[    4.602162] platform caam_sm: [0064] 00 00 00 00 00 00 00 00
[    4.607896] platform caam_sm: [0072] 00 00 00 00 00 00 00 00
[    4.613632] platform caam_sm: [0080] 00 00 00 00 00 00 00 00
[    4.619326] platform caam_sm: [0088] 00 00 00 00 00 00 00 00
[    4.625414] platform caam_sm: 64-bit black key in blob:
[    4.630687] platform caam_sm: [0000] 02 ec ef 04 5a 5d d0 d8
[    4.636447] platform caam_sm: [0008] 5c 56 96 08 cb 8a 58 49
[    4.642147] platform caam_sm: [0016] 5e 92 53 a3 7a 1f 52 35
[    4.647897] platform caam_sm: [0024] d6 8b 9f ba 70 fa 14 63
[    4.653639] platform caam_sm: [0032] bd 52 c4 d8 9d 2d 79 e7
[    4.659335] platform caam_sm: [0040] cd 5d e3 14 a9 a1 4d e6
[    4.665070] platform caam_sm: [0048] 64 e5 de c6 71 ac 9e e7
[    4.670766] platform caam_sm: [0056] 00 00 00 00 00 00 00 00
[    4.676502] platform caam_sm: [0064] 00 00 00 00 00 00 00 00
[    4.682198] platform caam_sm: [0072] 00 00 00 00 00 00 00 00
[    4.687947] platform caam_sm: [0080] 00 00 00 00 00 00 00 00
[    4.693685] platform caam_sm: [0088] 00 00 00 00 00 00 00 00
[    4.699374] platform caam_sm: 128-bit black key in blob:
[    4.704765] platform caam_sm: [0000] ee 0b f0 19 94 a7 bf 8d
[    4.710461] platform caam_sm: [0008] 70 d7 b0 45 5d ce 13 9c
[    4.716196] platform caam_sm: [0016] d4 8d ac 98 27 db cf aa
[    4.721891] platform caam_sm: [0024] 6e f4 41 b8 e8 71 25 7c
[    4.727624] platform caam_sm: [0032] ee 39 41 2c be c4 20 e0
[    4.733357] platform caam_sm: [0040] 05 4c 11 27 2c 5a a0 3c
[    4.739053] platform caam_sm: [0048] bf c9 0e d5 bd 9a 50 8f
[    4.744784] platform caam_sm: [0056] d9 be 78 a3 69 a3 2f 19
[    4.750478] platform caam_sm: [0064] 00 00 00 00 00 00 00 00
[    4.756208] platform caam_sm: [0072] 00 00 00 00 00 00 00 00
[    4.761903] platform caam_sm: [0080] 00 00 00 00 00 00 00 00
[    4.767634] platform caam_sm: [0088] 00 00 00 00 00 00 00 00
[    4.773363] platform caam_sm: 192-bit black key in blob:
[    4.778712] platform caam_sm: [0000] 76 a1 b8 39 1c b5 50 d0
[    4.784450] platform caam_sm: [0008] 2c a3 78 e9 2c c4 33 98
[    4.790145] platform caam_sm: [0016] 41 26 ca d7 5d a6 1b cf
[    4.795880] platform caam_sm: [0024] c3 b6 ab 48 a6 3c 0f 2f
[    4.801575] platform caam_sm: [0032] 09 88 f1 0e 00 4c 1c d8
[    4.807310] platform caam_sm: [0040] 2b 6f c0 7b a5 61 36 e4
[    4.813005] platform caam_sm: [0048] 75 fd 36 b4 74 93 b7 d3
[    4.818754] platform caam_sm: [0056] 82 cb 29 fa 4b 57 96 06
[    4.824498] platform caam_sm: [0064] 5a ec 6e 80 3a 18 76 f3
[    4.830192] platform caam_sm: [0072] 00 00 00 00 00 00 00 00
[    4.835923] platform caam_sm: [0080] 00 00 00 00 00 00 00 00
[    4.841617] platform caam_sm: [0088] 00 00 00 00 00 00 00 00
[    4.847341] platform caam_sm: 256-bit black key in blob:
[    4.852690] platform caam_sm: [0000] 08 68 07 2a 8f f7 98 19
[    4.858423] platform caam_sm: [0008] 22 ea 84 88 4a 34 0b 15
[    4.864164] platform caam_sm: [0016] 0f 4a d4 91 96 ce 3a 10
[    4.869859] platform caam_sm: [0024] 59 25 01 fc d5 76 aa 14
[    4.875596] platform caam_sm: [0032] 1c 24 47 da 40 61 1e 6f
[    4.881292] platform caam_sm: [0040] 26 22 25 5f 6d 1b cb 6c
[    4.887028] platform caam_sm: [0048] d8 fc 7b b6 cb a4 f7 2b
[    4.892724] platform caam_sm: [0056] c2 69 83 61 7e ce 57 ee
[    4.898457] platform caam_sm: [0064] cd 48 87 4b 42 38 e6 f3
[    4.904192] platform caam_sm: [0072] b1 7f 6f 8a bb 0e 59 29
[    4.909887] platform caam_sm: [0080] 00 00 00 00 00 00 00 00
[    4.915617] platform caam_sm: [0088] 00 00 00 00 00 00 00 00
[    4.921560] platform caam_sm: restored 64-bit black key:
[    4.926976] platform caam_sm: [0000] d6 43 66 a9 65 43 cc fd
[    4.932678] platform caam_sm: [0008] 81 30 02 f0 57 52 7a 0f
[    4.938415] platform caam_sm: restored 128-bit black key:
[    4.943893] platform caam_sm: [0000] 3b 02 06 05 9b 44 d8 9a
[    4.949589] platform caam_sm: [0008] 92 05 c4 26 2f 22 fe 63
[    4.955320] platform caam_sm: restored 192-bit black key:
[    4.960756] platform caam_sm: [0000] 54 bf 35 b6 79 69 05 f3
[    4.966492] platform caam_sm: [0008] 32 7f 40 92 c9 86 e4 c6
[    4.972189] platform caam_sm: [0016] e7 02 74 89 3a 43 22 e5
[    4.977928] platform caam_sm: [0024] 6f 94 ee 3b a0 0d e4 7b
[    4.983661] platform caam_sm: restored 256-bit black key:
[    4.989095] platform caam_sm: [0000] 9a 35 bc d7 bb 81 1a 61
[    4.994829] platform caam_sm: [0008] b0 0f 8f e8 9e f7 17 d4
[    5.000524] platform caam_sm: [0016] 56 c8 b3 e1 51 fb a0 35
[    5.006262] platform caam_sm: [0024] 40 f8 ef e7 b1 ae 99 6b
[    5.012561] caam-snvs 20cc000.caam-snvs: can't get snvs clock
[    5.018588] caam-snvs 20cc000.caam-snvs: violation handlers armed - non-secure state
[    5.027919] usbcore: registered new interface driver usbhid
[    5.033637] usbhid: USB HID core driver
[    5.053976] NET: Registered protocol family 10
[    5.070956] Segment Routing with IPv6
[    5.074995] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    5.082374] NET: Registered protocol family 17
[    5.087008] can: controller area network core (rev 20170425 abi 9)
[    5.093497] NET: Registered protocol family 29
[    5.098009] can: raw protocol (rev 20170425)
[    5.102307] can: broadcast manager protocol (rev 20170425 t)
[    5.108092] can: netlink gateway (rev 20170425) max_hops=1
[    5.114246] Bluetooth: RFCOMM TTY layer initialized
[    5.119197] Bluetooth: RFCOMM socket layer initialized
[    5.124705] Bluetooth: RFCOMM ver 1.11
[    5.128513] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.133933] Bluetooth: BNEP filters: protocol multicast
[    5.139213] Bluetooth: BNEP socket layer initialized
[    5.144264] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    5.150234] Bluetooth: HIDP socket layer initialized
[    5.155388] 8021q: 802.1Q VLAN Support v1.8
[    5.160707] rfkill_gpio bt_rfkill: bt_rfkill device registered.
[    5.167104] Key type dns_resolver registered
[    5.225327] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[    5.238273] imx_thermal 2000000.aips-bus:tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C
[    5.250678] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-02 00:22:46 UTC (87766)
[    5.364419] Micrel KSZ8081 or KSZ8091 2188000.ethernet-1:03: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=2188000.ethernet-1:03, irq=POLL)
[    5.379853] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.484212] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    8.503432] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.533460] IP-Config: Complete:
[    8.536967]      device=eth0, hwaddr=7a:f5:7c:86:e3:ac, ipaddr=192.168.0.90, mask=255.255.255.0, gw=255.255.255.255
[    8.547711]      host=lynx, domain=, nis-domain=(none)
[    8.552929]      bootserver=192.168.0.125, rootserver=192.168.0.125, rootpath=
[    8.561684] wilink-wl-en: disabling
[    8.565415] usb_otg1_vbus: disabling
[    8.569041] ALSA device list:
[    8.572109]   No soundcards found.
[    8.687222] VFS: Mounted root (nfs filesystem) on device 0:13.
[    8.706486] devtmpfs: mounted
[    8.715426] Freeing unused kernel memory: 1024K
[    9.672106] systemd[1]: System time before build time, advancing clock.
[    9.801075] systemd[1]: systemd 237 running in system mode. (-PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)
[    9.824291] systemd[1]: Detected architecture arm.

Welcome to NXP i.MX Release Distro 4.14-sumo (sumo)!

[    9.882609] systemd[1]: Set hostname to <desk-mx6ul-axelulite>.
[   11.083579] systemd[1]: File /lib/systemd/system/systemd-journald.service:35 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[   11.100999] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[   13.555698] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[   13.595145] systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
[   13.634523] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[   13.676246] systemd[1]: Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[   13.718935] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
[  OK  ] Listening on Network Service Netlink Socket.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket.
         Starting udev Coldplug all Devices...
         Mounting Kernel Debug File System...
         Starting Journal Service...
[  OK  ] Reached target Swap.
         Mounting Temporary Directory (/tmp)...
[  OK  ] Reached target Paths.
         Starting Remount Root and Kernel File Systems...
         Starting Apply Kernel Variables...
         Mounting Kernel Configuration File System...
         Mounting FUSE Control File System...
[  OK  ] Mounted Kernel Debug File System.
[   14.827586] systemd[1]: Mounted Temporary Directory (/tmp).
[  OK  ] Mounted Temporary Directory (/tmp).
[   14.953992] systemd[1]: Started Remount Root and Kernel File Systems.
[  OK  ] Started Remount Root and Kernel File Systems.
[   14.983736] systemd[1]: Started Apply Kernel Variables.
[  OK  ] Started Apply Kernel Variables.
[   15.014976] systemd[1]: Mounted Kernel Configuration File System.
[  OK  ] Mounted Kernel Configuration File System.
[   15.054657] systemd[1]: Mounted FUSE Control File System.
[  OK  ] Mounted FUSE Control File System.
[   15.095111] systemd[1]: Starting Create Static Device Nodes in /dev...
         Starting Create Static Device Nodes in /dev...
[   15.743694] systemd[1]: Started Create Static Device Nodes in /dev.
[  OK  ] Started Create Static Device Nodes in /dev.
[   15.779524] systemd[1]: Starting udev Kernel Device Manager...
         Starting udev Kernel Device Manager...
[   15.833591] systemd[1]: Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems (Pre).
[   15.900540] systemd[1]: Mounting /var/volatile...
         Mounting /var/volatile...
[  OK  ] Reached target Containers.
[  OK  ] Mounted /var/volatile.
         Starting Load/Save Random Seed...
[  OK  ] Reached target Local File Systems.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
         Starting Network Service...
[   17.010346] systemd-journald[145]: Received request to flush runtime journal from PID 1
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Network Service.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
         Starting Network Name Resolution...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Started Network Name Resolution.
[   21.273370] imx-sdma 20ec000.sdma: loaded firmware 3.4
[  OK  ] Found device /dev/ttymxc0.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Reached target Network.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on RPCbind Server Activation Socket.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Started dnf-automatic-install timer.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Started dnf-automatic-notifyonly timer.
[  OK  ] Listening on dropbear.socket.
[  OK  ] Started dnf-automatic timer.
[  OK  ] Started dnf-automatic-download timer.
[  OK  ] Started dnf makecache timer.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started Job spooling tools.
         Starting RPC Bind Service...
[  OK  ] Started Getty on tty1.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Serial Getty on ttymxc0.
[  OK  ] Reached target Login Prompts.
         Starting Network Time Service (one-shot ntpdate mode)...
[  OK  ] Started Target Communication Framework agent.
         Starting Telephony service...
[  OK  ] Started Xinetd A Powerful Replacement For Inetd.
         Starting Avahi mDNS/DNS-SD Stack...
[  OK  ] Started Periodic Command Scheduler.
         Starting System Logging Service...
         Starting Login Service...
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Daily rotation of log files.
[  OK  ] Reached target Timers.
[  OK  ] Started RPC Bind Service.
[  OK  ] Started Network Time Service (one-shot ntpdate mode).
         Starting Load/Save RF Kill Switch Status...
[  OK  ] Started NFS status monitor for NFSv2/3 locking..
[  OK  ] Started Telephony service.
[  OK  ] Started Load/Save RF Kill Switch Status.
[  OK  ] Started Login Service.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.

NXP i.MX Release Distro 4.14-sumo desk-mx6ul-axelulite ttymxc0

desk-mx6ul-axelulite login: root
root@desk-mx6ul-axelulite:~#

Development[edit | edit source]

Synchronizing the repository[edit | edit source]

In DESK-MX6UL-L, the following source trees are clones of the correspondent DAVE Embedded Systems git repositories:

Component GIT Remote
U-Boot git@git.dave.eu:desk-mx-l/u-boot-imx.git
Linux kernel git@git.dave.eu:desk-mx-l/linux-imx.git
Yocto BSP git@git.dave.eu:desk-mx-l/desk-mx-l-bsp.git

For more information about the access to these repositories, please refer to this link.

Access to DAVE Embedded Systems' git repositories is granted to development kit's owners only. Please refer to this page for detailed instructions on how to get access.

Instructions[edit | edit source]

The components listed in the table above can be kept in sync and up to date with DAVE Embedded Systems' repositories.

Once the git account has been enabled, the developer can:

  • clone the repository with the git clone <git_remote_repository> command
  • synchronize a source tree entering the repository directory and launching the git fetch origin command.

Please note that git fetch doesn't merge the commits on the current branch. To do that, the developer should run the git merge command or replace the fetch-merge process with a single git pull command. Please note that the recommended method is the fetch-merge process. For further information on Git, please refer to the official Git Documentation



Building U-Boot[edit | edit source]

Quick reference[edit | edit source]

Repository Information
URL git@git.dave.eu:desk-mx-l/u-boot-imx.git
stable branch desk-mx6ul-l-3.0.0
stable tag desk-mx6ul-l-3.x.x

U-Boot defconfigs
Platform SOM ConfigID CB ConfigID defconfig
SDV04 - 0x0000003a mx6uldesk_axelulite_defconfig
SBC Lynx 0x00000013 0x0000002f mx6uldesk_lynx_defconfig

Instructions[edit | edit source]

It is assumed that the development environment has been set up properly as described here.

  • start the Linux development VM and login into the system
  • open a terminal window and cd into U-Boot source code
cd ~/desk-mx-l/u-boot
  • in case of needs you can update your local repository with the following git command
git pull
  • configure the build environment
source ~/desk-mx-l/desk-mx6ul-l-3.0.0_env.sh
  • enter the source tree directory and run the following commands:

for the AXEL Ulite EVK

make mx6uldesk_axelulite_defconfig
make

for the SBC platform:

make mx6uldesk_lynx_defconfig
make

NOTE: this is the default configuration suitable for latest <SOM> target.

The former command selects the default DESK-MX6UL-L configuration suitable for latest <SOM> targets (for additional defconfig please refer to the U-Boot defconfigs table above), while the latter builds the U-Boot binary image files (SPL and u-boot.img).

Binary files can be copied to the tftp root directory /tftpboot/desk-mx-l/ with the following command:

cp SPL u-boot.img /tftpboot/desk-mx-l/

Please refer to this page for more information on how to update the bootloader on your board.




Building Linux[edit | edit source]

Quick reference[edit | edit source]

Repository Information
URL git@git.dave.eu:desk-mx-l/linux-imx.git
stable branch desk-mx6ul-l-3.x.x
stable tag desk-mx6ul-l-3.0.0

Build Information
defconfig imx_v7_desk_defconfig
Kernel binary UIMAGE_LOADADDR=0x80008000 uImage
Device trees Platform DTB
SBC Lynx imx6ul-lynx-som0013-cb002f.dtb
SDV04 imx6ul-axelulite-cb003a.dtb
imx6ul-axelulite-cb006c.dtb

Instructions[edit | edit source]

It is assumed that the development environment has been set up properly as described here.

  • start the Linux development VM and login into the system
  • open a terminal window and cd into Linux kernel source code
cd ~/desk-mx-l/linux
  • in case of needs you can update your local repository with the following git command
git pull
  • configure the build environment
source ~/desk-mx-l/desk-mx6ul-l-3.0.0_env.sh
  • enter the source tree directory and run the following commands:
make imx_v7_desk_defconfig
make UIMAGE_LOADADDR=0x80008000 uImage imx6ul-lynx-som0013-cb002f.dtb imx6ul-axelulite-cb003a.dtb imx6ul-axelulite-cb006c.dtb

NOTE: this is the default configuration suitable for latest target.

The former command selects the default DESK-MX6UL-L configuration, while the latter builds the kernel binary image with the required u-boot header and the kernel device tree.

Default Linux kernel configuration can be changed by using the standard menuconfig, xconfig, or gconfig make target. Subsequent builds just require uImage make target to update the binary image. Once the build process is complete, the kernel binary image is stored into the arch/arm/boot/uImage file. Both this file and the kernel device tree can be copied to the tftp root directory /tftpboot/desk-mx-l/ with the following commands:

cp arch/arm/boot/uImage /tftpboot/desk-mx-l/
cp arch/arm/boot/dts/*.dtb /tftpboot/desk-mx-l/

Usually, kernel modules are installed with make modules_install command, but this method installs the modules into the /lib/modules directory of you MVM, which is not what you want.

A better way to deploy kernel modules while cross-compiling is

  • generate a .tar.gz archive
  • install this archive into the target root file system

User can create such an archive, for example, using the following commands:

make modules
mkdir modules-install
make INSTALL_MOD_PATH=modules-install modules_install

cd modules-install && tar cvzf ../modules.tar.gz . && cd ..

Now copy modules.tar.gz into the target root file system and install them as root with the following command

tar xvzf modules.tar.gz -C /


Building the Yocto BSP[edit | edit source]

Quick reference[edit | edit source]

Repository Information
Repository BSP Manifest Yocto BSP Layer
URL git@git.dave.eu:desk-mx-l/desk-mx-l-bsp.git git@git.dave.eu:desk-mx-l/meta-desk-mx.git
stable branch hardknott hardknott
stable tag desk-mx6ul-l-3.0.0 desk-mx6ul-l-3.0.0
Build targets
Name Description
dave-image-devel This image include tools for development/debugging
desk-image-qt5 This image include a Qt5 graphic backend on framebuffer

Introduction[edit | edit source]

As known, in addition to a bootloader and the o.s. kernel, an embedded Linux system needs a root file system to operate. The root file system must contain everything needed to support the Linux system (applications, settings, data, etc.). The root file system is the file system that is contained on the same partition on which the root directory is located. The Linux kernel, at the end of its startup stage, mounts the root file system on the configured root device and finally launches the /sbin/init, the first user space process and "father" of all the other processes. For more information on the Linux filesystem, please refer to http://www.thegeekstuff.com/2010/09/linux-file-system-structure/.

DESK-MX6UL-L provides one (or more) pre-built root file system, that can be used during the evaluation/development/deployment cycle. For instance, the root file system included in the dave-image-devel image is suited for the development phase, since it provides a relatively rich set of packages including tools and libraries used to debug the application code. The pre-built root file systems are located here: /home/dvdk/<target_name>/rfs/<kit_name>.

Besides the pre-built root file systems, DAVE also provides a rich repository containing pre-built applications and libraries. These packages can be easily installed on the target by using the dnf tool. Please refer to this section for more details.

To generate the supported root file systems, the build of the Yocto BSP has to be run. The output of this process is an image containing the U-Boot binary file, the Linux kernel image, and the selected root file system image. The following sections describe in detail how to execute this operation.

For more general information regarding the Yocto build system, please refer the dedicated category page.

How to build the Yocto BSP images including the U-Boot binary file, the Linux kernel image, and the target root file system image[edit | edit source]

200px-Emblem-important.svg.png

The following procedure requires the access to the DAVE Embedded Systems' git repositories. The access to such repositories is granted to development kit's owners only. Please refer to this page for detailed instructions on how to get it.

200px-Emblem-important.svg.png

This process requires a lot of hardware resources in terms of disk storage, RAM, and processing power. For this reason, it also is recommended to consider the use of a physical machine. For more details on this topic, please refer to the NXP documentation on this BSP, i.e. the i.MX Yocto Project User's Guide, which talks about the hosto setup for the Yocto build system.

Initialize the build environment[edit | edit source]

Before running the build, the environment must be initialized properly.

DESK-MX6UL-L Yocto BSP uses git-repo tool to fetch all the required git repositories.

To install it, please use the following commands:

dvdk@vagrant:~/desk-mx-l$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo-1 > repo
dvdk@vagrant:~/desk-mx-l$ chmod a+x repo
dvdk@vagrant:~/desk-mx-l$ ./repo init -u git@git.dave.eu:desk-mx-l/desk-mx-l-bsp.git -b refs/tags/desk-mx6ul-l-3.0.0
dvdk@vagrant:~/desk-mx-l$ ./repo sync -c

Running the build[edit | edit source]

Please note that even the basic root file system requires a few hours to build on a mid/hi range desktop (4-6 cores, 8-12 GiB RAM) also depending on your Internet connection speed (all sources are fetched from the network). Nearly 80GiB of disk space is required for the build. The process may be slowed down significantly since the performances of a virtual machine are reduced if compared to the physical hardware. Thus, it's recommended to check the hardware capabilities of the host system and, when building with Yocto is required, to consider the following options:

  • Migrating the build system to a physical machine
  • Assuming that the host system has the required resources, extending the hardware capabilities of the default MVM (e.g. adding more cores and disk space).

Once completed the initialization phase, developers can launch the Yocto image build process with the following commands:

dvdk@vagrant:~/desk-mx-l$ DISTRO=fsl-imx-fb MACHINE=desk-mx6ul-axelulite source desk-setup-release.sh -b build-fb
dvdk@vagrant:~/desk-mx-l/build-fb$ bitbake desk-image-qt5

Where <target-image-name> is one of the images listed in here.

Once the build process is completed, the resulting files (the U-Boot binaries, the Linux kernel image, the device tree blob, the .tar.gz compressed root file system image, etc.) will be available in build-fb/tmp/deploy/images/desk-mx6ul-axelulite using the environment prepared as stated above.

Generating the SDKs[edit | edit source]

After creating an image as described in the previous version, the corresponding SDK can be generated by issuing the following command:

bitbake <target-image-name> -c populate-sdk

Again, replace <target-image-name> with one of the images listed in here.

Building additional packages[edit | edit source]

To build additional packages the user must first enter the directory where the desk-setup-release.sh is placed and source it

dvdk@vagrant:~/desk-mx-l$ DISTRO=fsl-imx-fb MACHINE=desk-mx6ul-axelulite source desk-setup-release.sh -b build-fb

And then can run any of the bitbake command.

dvdk@vagrant:~/desk-mx-l/build-fb$ bitbake memtester

The resulting packages (the default format is rpm) can be found inside build/tmp/deploy/rpm.

dvdk@vagrant:~/desk-mx-l/build-fb$ ls -l tmp/deploy/rpm/cortexa7hf_neon/memtester-*
-rw-r--r-- 4 dvdk dvdk 13213 Feb 25 12:43 tmp/deploy/rpm/cortexa9t2hf_neon/memtester-4.5.0-r0.cortexa9t2hf_neon.rpm
-rw-r--r-- 4 dvdk dvdk 28049 Feb 25 12:43 tmp/deploy/rpm/cortexa9t2hf_neon/memtester-dbg-4.5.0-r0.cortexa9t2hf_neon.rpm
-rw-r--r-- 4 dvdk dvdk  6049 Feb 25 12:43 tmp/deploy/rpm/cortexa9t2hf_neon/memtester-dev-4.5.0-r0.cortexa9t2hf_neon.rpm
-rw-r--r-- 4 dvdk dvdk  8973 Feb 25 12:43 tmp/deploy/rpm/cortexa9t2hf_neon/memtester-doc-4.5.0-r0.cortexa9t2hf_neon.rpm
-rw-r--r-- 4 dvdk dvdk 12977 Feb 25 12:43 tmp/deploy/rpm/cortexa9t2hf_neon/memtester-src-4.5.0-r0.cortexa9t2hf_neon.rpm


How to create a bootable SD card[edit | edit source]

200px-Emblem-important.svg.png

The procedure described here was tested with a virtual machine such as the MVM. The USB controller of the MVM should be enabled by default. If you are using Linux-based distribution and are having trouble detecting a USB device in virtual machine, please make sure your user belongs to the vboxusers group.


This article shows how to create a bootable microSD for the DESK-MX6UL-L Release Notes kit by using a simple bash script.
Note: Note: Starting from DESK-MX6UL-L 1.0.1 release the support for the SPL has been introduced in U-Boot. Previous versions of this script will no longer produce a fully functional and bootable microSD card.

The procedure has been tested on a MVM released with DESK-MX6-L 3.0.0 release with

  • a 16 GB microSD card [1]
  • a USB SD card reader
  • the binary files delivered along with the DESK-MX6UL-L 3.0.0

The resulting card is partitioned as depicted here below:

  • bootable partition (mmcblk0p1, vfat) containing:
    • binary images (U-Boot and kernel images)
  • root file system partition (mmcblk0p2, ext3)
    • root file system binaries and init scripts

The script - named mksd.sh - can be realized with the following code:

#!/bin/bash

if [[ -z $1 || -z $2 || -z $3 || -z $4 || -z $5 ]]
then
	echo "$0 Usage:"
	echo "	$0 <device> <u-boot.img> <SPL> <binaries directory> <rootfs tar.bz2>"
	echo "	Example: $0 /dev/sdc u-boot.img SPL binaries/ rootfs.tar.bz2"
	exit
fi

if [ "$(whoami)" != "root" ]
then
	echo "you must be root to run this script!"
	exit
fi

if ! [[ -b $1 ]]
then
	echo "$1 is not a valid block device!"
	exit
fi

if ! [[ -e $2 ]]
then
	echo "Incorrect u-boot.img location!"
	exit
fi

if ! [[ -e $3 ]]
then
	echo "Incorrect SPL location!"
	exit
fi

if ! [[ -d $4 ]]
then
	echo "Incorrect Binaries location!"
	exit
fi

if ! [[ -f $5 ]]
then
	echo "Incorrect rootfs location!"
	exit
fi

DRIVE=$1
if [[ "$DRIVE" == *"mmcblk"* ]]
then
	echo "You're using a mmc device, I need to fix partition names"
	PART="p"
else
	PART=""
fi
UBOOT=$2
SPL=$3
BINARIES=$4
RFS=$5

echo "All data on "$DRIVE" now will be destroyed! Continue? [y/n]"
read ans
if ! [ $ans == 'y' ]
then
	exit
fi

echo "[Partitioning $1...]"

dd if=/dev/zero of=$DRIVE bs=1024 count=1024

SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`

echo DISK SIZE - $SIZE bytes

CYLINDERS=`echo $SIZE/255/63/512 | bc`

# check if we're running an old (e.g. 2.20.x) or new (e.g. 2.24.x) sfdisk
sfdisk --help | grep -- -H

if [ "$?" -eq "0" ]
then
	{
		echo 40,1380,0x0c,*
		echo 1420,,83,-
	} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
else
{
    echo 16M,8176M,0x0c,*
    echo 8192M,,83,-
} | sfdisk $DRIVE
fi

partprobe


echo "[Making filesystems...]"
mkfs.vfat -F 32 -n BOOT "$DRIVE$PART"1 #> /dev/null
mkfs.ext3 -F -L ROOTFS "$DRIVE$PART"2 #> /dev/null

echo "[Copying files...]"

binaries_dir=${BINARIES%/}
mount "$DRIVE$PART"1 /mnt
cp -av --no-preserve=ownership $binaries_dir/* /mnt/
umount "$DRIVE$PART"1

echo "[Extracting rfs (this may take a while...)]"
mount "$DRIVE$PART"2 /mnt
tar jxf $RFS -C /mnt > /dev/null
chmod 755 /mnt
umount "$DRIVE$PART"2

echo "[Programming SPL]"
dd if=$SPL of=$DRIVE bs=512 seek=2 conv=fsync

echo "[Programming u-boot.img]"
dd if=$UBOOT of=$DRIVE bs=1k seek=69 conv=fsync

echo "[Done]"

Here is an example that shows how to use this script. We use here files delivered with DESK-MX6UL-L 3.0.0 release. Before invoking the script, the following files has to be renamed in order to make them compatible with the default U-Boot environment variables:

  • bootscript: boot.scr
  • splash image: splash_image.bmp
  • Linux kernel: desk-mx6ul-l-3.0.0_uImage
  • Device tree blob: desk-mx6ul-l-3.0.0_imx6ul-axelulite-cb003a.dtb.

We will copy them into ~/desk-mx-l/desk directory. Needed binary files can be found on MVM in the following location:

dvdk@vagrant:~$ ll /tftpboot/desk-mx-l/
total 12180
drwxr-xr-x 2 dvdk root    4096 Feb 27 18:54 ./
drwxr-xr-x 3 dvdk root    4096 Feb 27 18:52 ../
-rw-r--r-- 1 dvdk root   32441 Feb 27 18:54 desk-mx6ul-l-3.0.0_imx6ul-axelulite-cb003a.dtb
-rw-r--r-- 1 dvdk root   31479 Feb 27 18:54 desk-mx6ul-l-3.0.0_imx6ul-axelulite-cb006c.dtb
-rw-r--r-- 1 dvdk root   32518 Feb 27 18:54 desk-mx6ul-l-3.0.0_imx6ul-lynx-som0013-cb002f.dtb
-rw-r--r-- 1 dvdk root   44032 Feb 27 18:52 desk-mx6ul-l-3.0.0_mx6uldesk_axelulite_spi_SPL
-rw-r--r-- 1 dvdk root  600280 Feb 27 18:52 desk-mx6ul-l-3.0.0_mx6uldesk_axelulite_spi_u-boot.img
-rw-r--r-- 1 dvdk root   44032 Feb 27 18:52 desk-mx6ul-l-3.0.0_mx6uldesk_axelulite_SPL
-rw-r--r-- 1 dvdk root  600280 Feb 27 18:52 desk-mx6ul-l-3.0.0_mx6uldesk_axelulite_u-boot.img
-rw-r--r-- 1 dvdk root   44032 Feb 27 18:52 desk-mx6ul-l-3.0.0_mx6uldesk_lynx_spi_SPL
-rw-r--r-- 1 dvdk root  564844 Feb 27 18:52 desk-mx6ul-l-3.0.0_mx6uldesk_lynx_spi_u-boot.img
-rw-r--r-- 1 dvdk root   44032 Feb 27 18:52 desk-mx6ul-l-3.0.0_mx6uldesk_lynx_SPL
-rw-r--r-- 1 dvdk root  564244 Feb 27 18:52 desk-mx6ul-l-3.0.0_mx6uldesk_lynx_u-boot.img
-rw-r--r-- 1 dvdk root   44032 Feb 27 18:52 desk-mx6ul-l-3.0.0_mx6uldesk_lynx_usb_SPL
-rw-r--r-- 1 dvdk root  457216 Feb 27 18:52 desk-mx6ul-l-3.0.0_mx6uldesk_lynx_usb_u-boot.img
-rw-r--r-- 1 dvdk root 8189464 Feb 27 18:54 desk-mx6ul-l-3.0.0_uImage
dvdk@vagrant:~$ ll ~/desk-mx-l/desk-mx6ul-l-3.0.0_boot.scr
-rw-rw-r-- 1 dvdk dvdk 936 Feb 28 07:36 /home/dvdk/desk-mx-l/desk-mx6ul-l-3.0.0_boot.scr
dvdk@vagrant:~$ cp /tftpboot/desk-mx-l/desk-mx6ul-l-3.0.0_uImage ~/desk-mx-l/desk/desk-mx6ul-l-3.0.0_uImage
dvdk@vagrant:~$ cp /tftpboot/desk-mx-l/desk-mx6ul-l-3.0.0_imx6ul-axelulite-cb003a.dtb ~/desk-mx-l/desk/desk-mx6ul-l-3.0.0_imx6ul-axelulite-cb003a.dtb
dvdk@vagrant:~$ cp /tftpboot/desk-mx-l/splash_image.bmp ~/desk-mx-l/desk/
dvdk@vagrant:~$ cp ~/desk-mx-l/desk-mx6ul-l-3.0.0_boot.scr ~/desk-mx-l/desk/boot.scr

You can now run the script, by passing the following parameters:

  • Device file of the microSD card (/dev/sdb in the example)
  • U-Boot image
  • SPL
  • Path of the directory containing the bootscript file, the Linux kernel image, and the device tree blob files
  • Archive of the target's root file system (compressed as .tar.bz2 file).
dvdk@vagrant:~/desk-mx-l$ sudo ./desk-mx6ul-l-3.0.0_mksd.sh /dev/sdb /tftpboot/desk-mx-l/desk-mx6ul-l-3.0.0_mx6uldesk_axelulite_u-boot.img /tftpboot/desk-mx-l/desk-mx6ul-l-3.0.0_mx6uldesk_axelulite_SPL ~/desk-mx-l/desk ./rfs/desk-mx6ul-l-3.0.0_dave-image-devel-desk-mx6ul.tar.bz2 
All data on /dev/sdb now will be destroyed! Continue? [y/n]
y
[Partitioning /dev/sdb...]
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 2.05358 s, 511 kB/s
DISK SIZE - 15931539456 bytes
Checking that no-one is using this disk right now ... OK

Disk /dev/sdb: 14.86 GiB, 15931539456 bytes, 31116288 sectors
Disk model: Transcend       
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

>>> Created a new DOS disklabel with disk identifier 0x3adbf72f.
/dev/sdb1: Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 8 GiB.
/dev/sdb2: Created a new partition 2 of type 'Linux' and of size 6.9 GiB.
/dev/sdb3: Done.

New situation:
Disklabel type: dos
Disk identifier: 0x3adbf72f

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sdb1  *       32768 16777215 16744448    8G  c W95 FAT32 (LBA)
/dev/sdb2       16777216 31116287 14339072  6.9G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
[Making filesystems...]
mkfs.fat 4.1 (2017-01-24)
mke2fs 1.45.5 (07-Jan-2020)
Creating filesystem with 1792384 4k blocks and 448800 inodes
Filesystem UUID: 3f65294a-899d-417c-9092-e8bf209ec6b2
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

[Copying files...]
'/home/dvdk/desk-mx-l/desk/boot.scr' -> '/mnt/boot.scr'
'/home/dvdk/desk-mx-l/desk/desk-mx6ul-l-3.0.0_imx6ul-axelulite-cb003a.dtb' -> '/mnt/desk-mx6ul-l-3.0.0_imx6ul-axelulite-cb003a.dtb'
'/home/dvdk/desk-mx-l/desk/desk-mx6ul-l-3.0.0_uImage' -> '/mnt/desk-mx6ul-l-3.0.0_uImage'
'/home/dvdk/desk-mx-l/desk/splash_image.bmp' -> '/mnt/splash_image.bmp'
[Extracting rfs (this may take a while...)]
[Programming SPL]
86+0 records in
86+0 records out
44032 bytes (44 kB, 43 KiB) copied, 0.0930599 s, 473 kB/s
[Programming u-boot.img]
586+1 records in
586+1 records out
600280 bytes (600 kB, 586 KiB) copied, 1.64853 s, 364 kB/s
[Done]

[1] In case you have a different size, you'll need to change the sfdisk parameters accordingly.

bootscr[edit | edit source]

Once you got the new binaries compiled from your modified sources, they have to be installed on first SD partition preserving the original file names used into boot.scr U-Boot bootscript.

Here below there is an example on how to create a boot.scr file from the bootscript.txt for booting from SD card:

echo 'bootscript generated with command "mkimage -A ARM -T script -C none -n DESK-MX6UL -d bootscript.txt boot.scr"'

setenv desk_release 'desk-mx6ul-l-3.0.0'

if test 0x${som_configid#} = 0x00000013 && test 0x${cb_configid#} = 0x0000002f;
then
    setenv fdtfile ${desk_release}_imx6ul-lynx-som0013-cb002f.dtb
elif test 0x${cb_configid#} = 0x0000003a
then
	setenv fdtfile ${desk_release}_imx6ul-axelulite-cb003a.dtb
elif test 0x${cb_configid#} = 0x0000006c
then
	setenv fdtfile ${desk_release}_imx6ul-axelulite-cb006c.dtb
else
    echo Invalid CB! Autoreset ...
    sleep 30
	reset
fi

setenv bootfile ${desk_release}_uImage

setenv mmc_loadk 'fatload mmc ${mmcdev}:1 ${loadaddr} ${bootfile}'
setenv mmc_loadfdt 'fatload mmc ${mmcdev}:1 ${fdtaddr} ${fdtfile}'

echo Booting DESK-MX6UL via mmcboot with ${fdtfile} as device tree

run mmcboot

echo mmcboot FAILURE

and compile it using:

mkimage -A ARM -T script -C none -n DESK-MX6UL -d bootscript.txt boot.scr

Then copy the boot.scr into the <binaries_dir> directories used by the script to create the SD card.



Hello word example[edit | edit source]

Here below an example on C code displaying the classic Hello World! message on the target serial console.

This example shows how to use the arm cross-compiler using the environment configured for this purpose

Setting the cross-compiler[edit | edit source]

It is assumed that the development environment has been set up properly as described here.

  • start the Linux development VM and login into the system
  • open a terminal window and cd into your source code directory
dvdk@vagrant:~$ mkdir myproject
dvdk@vagrant:~$ cd myproject/
dvdk@vagrant:~/myproject$ vi hello.c
dvdk@vagrant:~/myproject$ cat hello.c
#include <stdio.h>

int main(){
	printf("Hello, World!\n");
	return 0;
}
  • configure the build environment
dvdk@vagrant:~/myproject$ source ~/desk-mx-l/desk-mx6ul-l-1.0.1_env.sh
  • as you can see here below, the $CC environment variable has been properly configured for using the SDK sysroot parameter:
dvdk@vagrant:~/myproject$ echo $CC
arm-poky-linux-gnueabi-gcc -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/dvdk/desk-mx-l/sdk/desk-mx6ul-l-1.0.1-toolchain/sysroots/cortexa7hf-neon-poky-linux-gnueabi
dvdk@vagrant:~/myproject$ 
  • invoke the cross-compiler for compiling your source code example: the object file obtained, is a proper ELF 32-bit for the target microprocessor
dvdk@vagrant:~/myproject$ $CC hello.c -o hello
dvdk@vagrant:~/myproject$ file hello
hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=9afa4b55f9a187d69a3a8356ea2d2afc3565cf7a, not stripped
dvdk@vagrant:~/myproject$ 

Running the example on the target[edit | edit source]

Now it is enough to copy the object file in the /home/root rfs directory and boot from nfs...

dvdk@vagrant:~/myproject$ sudo cp hello /home/dvdk/desk-mx-l/rfs/desk-mx6ul-l/home/root/
dvdk@vagrant:~/myproject$ sudo ls -la /home/dvdk/desk-mx-l/rfs/desk-mx6ul-l/home/root/
total 32
drwx------ 2 root root  4096 Jun  8 12:36 .
drwxr-xr-x 3 root root  4096 Jan 28 23:54 ..
-rwxr-xr-x 1 root root 16432 Jun  8 12:36 hello
-rw-r--r-- 1 root root  1011 Nov 25  2020 .profile
dvdk@vagrant:~/myproject$ 

on the target:

...
...
...
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Job spooling tools.
         Starting Network Time Service (one-shot ntpdate mode)...
         Starting System Logging Service...
[  OK  ] Reached target Timers.
[  OK  ] Started RPC Bind Service.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started Telephony service.
[  OK  ] Started NFS status monitor for NFSv2/3 locking..
[  OK  ] Started Network Time Service (one-shot ntpdate mode).

NXP i.MX Release Distro 4.14-sumo desk-mx6ul-axelulite ttymxc0

desk-mx6ul-axelulite login: root
root@desk-mx6ul-axelulite:~# ls -la
total 32
drwx------ 2 root root  4096 Jul  2  2021 .
drwxr-xr-x 3 root root  4096 Jun 16  2021 ..
-rw------- 1 root root    25 Jun 29  2021 .bash_history
-rwxr-xr-x 1 root root 16436 Jul  2  2021 hello
root@desk-mx6ul-axelulite:~# ./hello
Hello, World!
root@desk-mx6ul-axelulite:~#



Deployment[edit | edit source]

Booting from NAND flash[edit | edit source]

With respect to the NOR flash memories, NAND devices are known to be quite challenging with regard to the reliability. This is especially true when the NAND flash is used as the boot device. Several techniques such as wear leveling and bad block management have to be implemented to achieve an acceptable reliability.

This document provides information about the NAND device management, in order to handle it properly when it is used as the boot device on NXP i.MX6-based products.

Even though the example shown here refers to an i.MX6 UltraLite board, the approach is substantially the same across all the i.MX6 family.

The test bed used in this example consists of an i.MX6 UltraLite board equipped with a 128MB 8-bit asynchronous 1-bit ECC SLC NAND memory which is connected to the EIM bus of the SoC. The boot firmware image is the U-Boot binary files (desk-mx6ul-l-1.0.2_mx6uldesk_axelulite_nand_SPL and desk-mx6ul-l-1.0.2_mx6uldesk_axelulite_nand_u-boot.img). Its size is about 535 kB. From the point of view of MTD partitions, the boot partition for SPL is mtd0 is 2MB while the second stage partition mtd1 is 6MB.

Boot partition organization[edit | edit source]

The following image shows the organization of the boot partition.


Organization of the boot partition


The bootrom plays a major role in the boot process of any i.MX6 SoC. In case the NAND memory is the boot devices, this implies that the boot partition must be organized in order fulfill the bootrom requirements. Specifically, it contains:

  • A 1MB area (named Flash Control Block, FCB) which, in turn, includes
    • A data structure called NAND Control Block (NCB)
    • Three addresses which indicate where are located
      • The Discovered Bad Block Table (DBBT) which is the data structure used to manage the bad blocks of the NAND flash
      • The first copy of the firmware to load
      • The second (redundant) copy of the firmware to load
  • The DBBT
  • The first copy of the firmware
  • The second copy of the firmware.

For more details about the bootrom e the NAND boot process, please refer to the System Boot chapter of the Reference Manual of the specific i.MX6 Application Processor.

The following section will describe how to burn the boot partition in practice.

How to burn the boot partition[edit | edit source]

The burning of the boot partition is performed by the kobs-ng tool and the standard flash_erase and nandwrite flash utilities.

When the NAND flash is not burned yet, the product is usually configured in order to boot from a different device such as an SD card or through serial download mode. Once the Linux kernel is up and running, the kobs-ng can be run as shown in the following example:

root@desk-mx6ul-axelulite:~# kobs-ng -x -v -w desk-mx6ul-l-1.0.2_mx6uldesk_axelulite_nand_SPL
MTD CONFIG:
  chip_0_device_path = "/dev/mtd0"
  chip_1_device_path = "(null)"
  search_exponent = 2
  data_setup_time = 80
  data_hold_time = 60
  address_setup_time = 25
  data_sample_time = 6
  row_address_size = 3
  column_address_size = 2
  read_command_code1 = 0
  read_command_code2 = 48
  boot_stream_major_version = 1
  boot_stream_minor_version = 0
  boot_stream_sub_version = 0
  ncb_version = 3
  boot_stream_1_address = 0
  boot_stream_2_address = 0
  secondary_boot_stream_off_in_MB = 64
         -- We add the 1k-padding to the uboot.
.tmp_kobs_ng: verifying using key '00000000000000000000000000000000'
.tmp_kobs_ng: is a valid bootstream for key '00000000000000000000000000000000'
mtd: use new bch layout raw access mode
mtd: opening: "/dev/mtd0"
NFC geometry :
        ECC Strength       : 2
        Page Size in Bytes : 2071
        Metadata size      : 10
        ECC Chunk Size in byte : 512
        ECC Chunk count        : 4
        Block Mark Byte Offset : 2028
        Block Mark Bit Offset  : 2
====================================================
mtd: opened '/dev/mtd0' - '(null)'
mtd: max_boot_stream_size_in_bytes = 524288
mtd: boot_stream_size_in_bytes = 57344
mtd: boot_stream_size_in_pages = 28
mtd: #1 0x00100000 - 0x00180000 (0x0010e000)
mtd: #2 0x00180000 - 0x00200000 (0x0018e000)
FCB
  m_u32Checksum = 0x00000000
  m_u32FingerPrint = 0x20424346
  m_u32Version = 0x01000000
  m_NANDTiming.m_u8DataSetup = 80
  m_NANDTiming.m_u8DataHold = 60
  m_NANDTiming.m_u8AddressSetup = 25
  m_NANDTiming.m_u8DSAMPLE_TIME = 6
  m_u32PageDataSize = 2048
  m_u32TotalPageSize = 2112
  m_u32SectorsPerBlock = 64
  m_u32NumberOfNANDs = 0
  m_u32TotalInternalDie = 0
  m_u32CellType = 0
  m_u32EccBlockNEccType = 1
  m_u32EccBlock0Size = 512
  m_u32EccBlockNSize = 512
  m_u32EccBlock0EccType = 1
  m_u32MetadataBytes = 10
  m_u32NumEccBlocksPerPage = 3
  m_u32EccBlockNEccLevelSDK = 0
  m_u32EccBlock0SizeSDK = 0
  m_u32EccBlockNSizeSDK = 0
  m_u32EccBlock0EccLevelSDK = 0
  m_u32NumEccBlocksPerPageSDK = 0
  m_u32MetadataBytesSDK = 0
  m_u32EraseThreshold = 0
  m_u32Firmware1_startingPage = 512
  m_u32Firmware2_startingPage = 768
  m_u32PagesInFirmware1 = 28
  m_u32PagesInFirmware2 = 28
  m_u32DBBTSearchAreaStartAddress = 256
  m_u32BadBlockMarkerByte = 2028
  m_u32BadBlockMarkerStartBit = 2
  m_u32BBMarkerPhysicalOffset = 2048
  m_u32BCHType = 0
  m_NANDTMTiming.m_u32TMTiming2_ReadLatency = 0
  m_NANDTMTiming.m_u32TMTiming2_PreambleDelay = 0
  m_NANDTMTiming.m_u32TMTiming2_CEDelay = 0
  m_NANDTMTiming.m_u32TMTiming2_PostambleDelay = 0
  m_NANDTMTiming.m_u32TMTiming2_CmdAddPause = 0
  m_NANDTMTiming.m_u32TMTiming2_DataPause = 0
  m_NANDTMTiming.m_u32TMSpeed = 0
  m_NANDTMTiming.m_u32TMTiming1_BusyTimeout = 0
  m_u32DISBBM = 0
  m_u32BBMarkerPhysicalOffsetInSpareData = 0
  m_u32OnfiSyncEnable = 0
  m_NANDONFITiming.m_u32ONFISpeed = 0
  m_NANDONFITiming.m_u32ONFITiming_ReadLatency = 0
  m_NANDONFITiming.m_u32ONFITiming_CEDelay = 0
  m_NANDONFITiming.m_u32ONFITiming_PreambleDelay = 0
  m_NANDONFITiming.m_u32ONFITiming_PostambleDelay = 0
  m_NANDONFITiming.m_u32ONFITiming_CmdAddPause = 0
  m_NANDONFITiming.m_u32ONFITiming_DataPause = 0
  m_NANDONFITiming.m_u32ONFITiming_BusyTimeout = 0
  m_u32DISBBSearch = 0
  m_u32RandomizerEnable = 0
  m_u32ReadRetryEnable = 0
  m_u32ReadRetrySeqLength = 0
DBBT
  m_u32Checksum = 0x00000000
  m_u32FingerPrint = 0x54424244
  m_u32Version = 0x01000000
  m_u32DBBTNumOfPages = 0
Firmware: image #0 @ 0x100000 size 0xe000 - available 0x80000
Firmware: image #1 @ 0x180000 size 0xe000 - available 0x80000
-------------- Start to write the [ FCB ] -----
mtd: erasing @0:0x0-0x20000
mtd: Writing FCB0 [ @0:0x0 ] (840) *
mtd: erasing @0:0x20000-0x40000
mtd: Writing FCB1 [ @0:0x20000 ] (840) *
mtd: erasing @0:0x40000-0x60000
mtd: Writing FCB2 [ @0:0x40000 ] (840) *
mtd: erasing @0:0x60000-0x80000
mtd: Writing FCB3 [ @0:0x60000 ] (840) *
mtd_commit_bcb(FCB): status 0

-------------- Start to write the [ DBBT ] -----
mtd: erasing @0:0x80000-0xa0000
mtd: Writing DBBT0 [ @0:0x80000 ] (800) *
mtd: erasing @0:0xa0000-0xc0000
mtd: Writing DBBT1 [ @0:0xa0000 ] (800) *
mtd: erasing @0:0xc0000-0xe0000
mtd: Writing DBBT2 [ @0:0xc0000 ] (800) *
mtd: erasing @0:0xe0000-0x100000
mtd: Writing DBBT3 [ @0:0xe0000 ] (800) *
mtd_commit_bcb(DBBT): status 0

---------- Start to write the [ .tmp_kobs_ng ]----
mtd: Writting .tmp_kobs_ng: #0 @0: 0x00100000 - 0x0010e000
mtd: erasing @0:0x100000-0x120000
mtd: We write one page for save guard. *
mtd: Writting .tmp_kobs_ng: #1 @0: 0x00180000 - 0x0018e000
mtd: erasing @0:0x180000-0x1a0000
mtd: We write one page for save guard. *
root@desk-mx6ul-axelulite:~#

then the second mtd1 partition can be written using nandwrite:

root@desk-mx6ul-axelulite:~# flash_erase /dev/mtd1 0 0
Erasing 128 Kibyte @ 5e0000 -- 100 % complete
root@desk-mx6ul-axelulite:~# nandwrite -p /dev/mtd1 desk-mx6ul-l-1.0.2_mx6uldesk_axelulite_nand_u-boot.img
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
root@desk-mx6ul-axelulite:~#

In this case, the SPL boot partition–/dev/mtd0, indicated as a parameter of the command line–is 2MB. The u-boot.img partition–/dev/mtd1 is used for the second stage binary image.




Customizing the splash screen[edit | edit source]

Resources[edit | edit source]

For further details on splash screen support in U-Boot, please refer to:

Instructions[edit | edit source]

The following U-Boot environment variables are required:

  • splashimage: RAM address where the BMP image is loaded. Please note that it must be a 32-bit aligned address with a 0x2 offset (eg: 0x20000002)
  • loadsplash: comand for loading the BMP image from the storage device (e.g flash memory) to RAM. This command is automatically run by U-Boot at startup

Please note that loadsplash command will differ depends on used storage device.

Splash image in NOR SPI flash[edit | edit source]

U-Boot variables[edit | edit source]
loadsplash=run spi_loadsplash
spi_loadsplash=sf probe; sf read ${splashimage} 0xa00000 ${splashsize}
splashfile=splash_image.bmp
splashimage=0x80800000
splashsize=0x120000
loadsplashfile=tftpboot ${loadaddr} lynx/${splashfile}
spi_updatesplash=sf probe; sf erase 0xa00000 +${filesize}; sf write ${loadaddr} 0xa00000 ${filesize}
Commands[edit | edit source]

The following commands are used to store in NOR SPI flash a BMP image loaded via tftp:

run loadsplashfile
run spi_updatesplash

Splash image in NAND flash[edit | edit source]

U-Boot variables[edit | edit source]
mtdparts=mtdparts=gpmi-nand:2M(nand-SPL),6M(nand-uboot),1M(nand-env1),1M(nand-env2),1M(nand-fdt),1M(nand-spare),8M(nand-kernel),4M(nand-splash),-(nand-ubi)
loadsplash=run nand_loadsplash
nand_loadsplash=nand read ${splashimage} nand-splash ${splashsize}
splashfile=splash_image.bmp
splashimage=0x80800000
splashsize=0x120000
loadsplashfile=tftpboot ${loadaddr} lynx/${splashfile}
nand_updatesplash=nand erase.part nand-splash; nand write ${loadaddr} nand-splash ${filesize}

Please note that the NAND mtd partition for the splash image (nand-splash) is defined using the mtdparts parameter, and then referenced by the nand {erase,read,write} commands.

Commands[edit | edit source]

The following commands are used to store in NAND flash a BMP image loaded via tftp:

run loadsplashfile
run nand_updatesplash


Standalone boot[edit | edit source]

Introduction[edit | edit source]

This document was written and tested with the software/hardware combination described in the history table above. However, it contains general concepts that can be adapted on any DAVE Embedded Systems' Linux platform.


200px-Emblem-important.svg.png

The following programming examples are intended for laboratory usage or for preliminary deployment strategy.

A complete deployment strategy has to be carefully identifiyed taking into account the overall arguments like: boot speed, safe boot, recovery mechanisms, watchdog supervisor, etc.


We'll explain how to program and configure a <SOM> to boot in standalone mode, without the need of a system microSD card or an NFS server, with two options:

  • booting with NOR and NAND internal storage
    • in this configuration the primary boot images will be fetched from NOR flash storage, while the root file system will be fetched from NAND flash
  • booting with NAND only
    • in this configuration the whole system will boot without the need of a NOR flash storage, all images and the root file system will be fetched from NAND flash

Program boot images into NOR flash[edit | edit source]

U-Boot[edit | edit source]

Update to the latest U-Boot version allows usage of u-boot environment variables available.

=> run load_spl
Using FEC0 device
TFTP from server 192.168.0.13; our IP address is 192.168.0.89
Filename 'lynx/SPL'.
Load address: 0x80800000
Loading: #########
         1.8 MiB/s
done
Bytes transferred = 44032 (ac00 hex)
=> run spi_update_spl
SF: Detected is25lp256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
SF: 65536 bytes @ 0x0 Erased: OK
device 0 offset 0x400, size 0xac00
SF: 44032 bytes @ 0x400 Written: OK
=> run load_uboot
Using FEC0 device
TFTP from server 192.168.0.13; our IP address is 192.168.0.89
Filename 'lynx/u-boot.img'.
Load address: 0x80800000
Loading: #################################################################
         ##############################################
         1.8 MiB/s
done
Bytes transferred = 564844 (89e6c hex)
=> run spi_update_uboot
SF: Detected is25lp256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
SF: 589824 bytes @ 0x10000 Erased: OK
device 0 offset 0x10000, size 0x89e6c
SF: 564844 bytes @ 0x10000 Written: OK

kernel image and device tree[edit | edit source]

We assume that the following environment variables are present in U-Boot:

loadk=tftpboot ${loadaddr} ${serverip}:${bootfile}
loadfdt=tftpboot ${fdtaddr} ${serverip}:${fdtfile}
spi_updatek=sf erase 200000 800000; sf write ${loadaddr} 200000 ${filesize}
spi_updatefdt=sf erase 180000 80000; sf write ${fdtaddr} 180000 ${filesize}
spi_loadk=sf read ${loadaddr} 200000 800000
spi_loadfdt=sf read ${fdtaddr} 180000 80000
spi_nand=sf probe; run spi_loadk spi_loadfdt nandargs addcons addmisc; if run configid_fixupfdt; then bootm ${loadaddr} - ${fdtaddr}; fi
  • Update the bootfile and fdtfile environment variables to fit the filename as found inside the TFTP server.
  • Program kernel and device tree on NOR flash with the following U-Boot command
sf probe; run loadk spi_updatek loadfdt spi_updatefdt

E.g.:

=> sf probe; run loadk spi_updatek loadfdt spi_updatefdt
Using FEC0 device
TFTP from server 192.168.0.13; our IP address is 192.168.0.89
Filename 'lynx/uImage'.
Load address: 0x80800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################################
         1.9 MiB/s
done
Bytes transferred = 8189464 (7cf618 hex)
SF: 8388608 bytes @ 0x200000 Erased: OK
device 0 offset 0x200000, size 0x7cf618
SF: 8189464 bytes @ 0x200000 Written: OK
Using FEC0 device
TFTP from server 192.168.0.13; our IP address is 192.168.0.89
Filename 'lynx/imx6ul-axelulite.dtb'.
Load address: 0x83000000
Loading: #######
         1.5 MiB/s
done
Bytes transferred = 32518 (7f06 hex)
SF: 524288 bytes @ 0x180000 Erased: OK
device 0 offset 0x180000, size 0x7f06
SF: 32518 bytes @ 0x180000 Written: OK

Reboot the system and configure U-Boot to apply the new configuration

=> setenv bootcmd run spi_nand
=> saveenv

Program boot images into NAND flash[edit | edit source]

U-Boot[edit | edit source]

U-Boot on NAND flash must be programmed using NXP kobs-ng utility: this tool is required for writing the correct U-Boot image on NAND storing all information needed by bootrom to identify the NAND as a boot device.

Here below an example:

  • boot the system via SD on NFS
  • uses a rfs with kobs-ng utility available on it (e.g. DAVE's rfs provided with DESK-MX6UL-L)
  • copy the related U-Boot image file on nfs /home/root (for example)
  • execute kobs-ng passing the parameters for flashing U-Boot on NAND
root@desk-mx6ul-axelulite:~# kobs-ng -x -v -w desk-mx6ul-l-3.0.0_mx6uldesk_axelulite_SPL
MTD CONFIG:
  chip_0_device_path = "/dev/mtd0"
  chip_1_device_path = "(null)"
  search_exponent = 2
  data_setup_time = 80
  data_hold_time = 60
  address_setup_time = 25
  data_sample_time = 6
  row_address_size = 3
  column_address_size = 2
  read_command_code1 = 0
  read_command_code2 = 48
  boot_stream_major_version = 1
  boot_stream_minor_version = 0
  boot_stream_sub_version = 0
  ncb_version = 3
  boot_stream_1_address = 0
  boot_stream_2_address = 0
  secondary_boot_stream_off_in_MB = 64
	 -- We add the 1k-padding to the uboot.
.tmp_kobs_ng: verifying using key '00000000000000000000000000000000'
.tmp_kobs_ng: is a valid bootstream for key '00000000000000000000000000000000'
mtd: use new bch layout raw access mode
mtd: opening: "/dev/mtd0"
NFC geometry :
	ECC Strength       : 2
	Page Size in Bytes : 2071
	Metadata size      : 10
	ECC Chunk Size in byte : 512
	ECC Chunk count        : 4
	Block Mark Byte Offset : 2028
	Block Mark Bit Offset  : 2
====================================================
mtd: opened '/dev/mtd0' - '(null)'
mtd: max_boot_stream_size_in_bytes = 524288
mtd: boot_stream_size_in_bytes = 45056
mtd: boot_stream_size_in_pages = 22
mtd: #1 0x00100000 - 0x00180000 (0x0010b000)
mtd: #2 0x00180000 - 0x00200000 (0x0018b000)
FCB
  m_u32Checksum = 0x00000000
  m_u32FingerPrint = 0x20424346
  m_u32Version = 0x01000000
  m_NANDTiming.m_u8DataSetup = 80
  m_NANDTiming.m_u8DataHold = 60
  m_NANDTiming.m_u8AddressSetup = 25
  m_NANDTiming.m_u8DSAMPLE_TIME = 6
  m_u32PageDataSize = 2048
  m_u32TotalPageSize = 2112
  m_u32SectorsPerBlock = 64
  m_u32NumberOfNANDs = 0
  m_u32TotalInternalDie = 0
  m_u32CellType = 0
  m_u32EccBlockNEccType = 1
  m_u32EccBlock0Size = 512
  m_u32EccBlockNSize = 512
  m_u32EccBlock0EccType = 1
  m_u32MetadataBytes = 10
  m_u32NumEccBlocksPerPage = 3
  m_u32EccBlockNEccLevelSDK = 0
  m_u32EccBlock0SizeSDK = 0
  m_u32EccBlockNSizeSDK = 0
  m_u32EccBlock0EccLevelSDK = 0
  m_u32NumEccBlocksPerPageSDK = 0
  m_u32MetadataBytesSDK = 0
  m_u32EraseThreshold = 0
  m_u32Firmware1_startingPage = 512
  m_u32Firmware2_startingPage = 768
  m_u32PagesInFirmware1 = 22
  m_u32PagesInFirmware2 = 22
  m_u32DBBTSearchAreaStartAddress = 256
  m_u32BadBlockMarkerByte = 2028
  m_u32BadBlockMarkerStartBit = 2
  m_u32BBMarkerPhysicalOffset = 2048
  m_u32BCHType = 0
  m_NANDTMTiming.m_u32TMTiming2_ReadLatency = 0
  m_NANDTMTiming.m_u32TMTiming2_PreambleDelay = 0
  m_NANDTMTiming.m_u32TMTiming2_CEDelay = 0
  m_NANDTMTiming.m_u32TMTiming2_PostambleDelay = 0
  m_NANDTMTiming.m_u32TMTiming2_CmdAddPause = 0
  m_NANDTMTiming.m_u32TMTiming2_DataPause = 0
  m_NANDTMTiming.m_u32TMSpeed = 0
  m_NANDTMTiming.m_u32TMTiming1_BusyTimeout = 0
  m_u32DISBBM = 0
  m_u32BBMarkerPhysicalOffsetInSpareData = 0
  m_u32OnfiSyncEnable = 0
  m_NANDONFITiming.m_u32ONFISpeed = 0
  m_NANDONFITiming.m_u32ONFITiming_ReadLatency = 0
  m_NANDONFITiming.m_u32ONFITiming_CEDelay = 0
  m_NANDONFITiming.m_u32ONFITiming_PreambleDelay = 0
  m_NANDONFITiming.m_u32ONFITiming_PostambleDelay = 0
  m_NANDONFITiming.m_u32ONFITiming_CmdAddPause = 0
  m_NANDONFITiming.m_u32ONFITiming_DataPause = 0
  m_NANDONFITiming.m_u32ONFITiming_BusyTimeout = 0
  m_u32DISBBSearch = 0
  m_u32RandomizerEnable = 0
  m_u32ReadRetryEnable = 0
  m_u32ReadRetrySeqLength = 0
DBBT
  m_u32Checksum = 0x00000000
  m_u32FingerPrint = 0x54424244
  m_u32Version = 0x01000000
  m_u32DBBTNumOfPages = 0
Firmware: image #0 @ 0x100000 size 0xb000 - available 0x80000
Firmware: image #1 @ 0x180000 size 0xb000 - available 0x80000
-------------- Start to write the [ FCB ] -----
mtd: erasing @0:0x0-0x20000
mtd: Writing FCB0 [ @0:0x0 ] (840) *
mtd: erasing @0:0x20000-0x40000
mtd: Writing FCB1 [ @0:0x20000 ] (840) *
mtd: erasing @0:0x40000-0x60000
mtd: Writing FCB2 [ @0:0x40000 ] (840) *
mtd: erasing @0:0x60000-0x80000
mtd: Writing FCB3 [ @0:0x60000 ] (840) *
mtd_commit_bcb(FCB): status 0

-------------- Start to write the [ DBBT ] -----
mtd: erasing @0:0x80000-0xa0000
mtd: Writing DBBT0 [ @0:0x80000 ] (800) *
mtd: erasing @0:0xa0000-0xc0000
mtd: Writing DBBT1 [ @0:0xa0000 ] (800) *
mtd: erasing @0:0xc0000-0xe0000
mtd: Writing DBBT2 [ @0:0xc0000 ] (800) *
mtd: erasing @0:0xe0000-0x100000
mtd: Writing DBBT3 [ @0:0xe0000 ] (800) *
mtd_commit_bcb(DBBT): status 0

---------- Start to write the [ .tmp_kobs_ng ]----
mtd: Writting .tmp_kobs_ng: #0 @0: 0x00100000 - 0x0010b000
mtd: erasing @0:0x100000-0x120000
mtd: We write one page for save guard. *
mtd: Writting .tmp_kobs_ng: #1 @0: 0x00180000 - 0x0018b000
mtd: erasing @0:0x180000-0x1a0000
mtd: We write one page for save guard. *
</pre>

then the second <code>mtd1</code> partition can be written using ''nandwrite'':

<pre class="workstation-terminal">
root@desk-mx6ul-axelulite:~# flash_erase /dev/mtd1 0 0
Erasing 128 Kibyte @ 5e0000 -- 100 % complete 
root@desk-mx6ul-axelulite:~# nandwrite -p /dev/mtd1 desk-mx6ul-l-3.0.0_mx6uldesk_axelulite_u-boot.img 
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000

kernel image and device tree[edit | edit source]

We assume that the following environment variables are present in u-boot:

nand_updatek=nand erase.part nand-kernel; nand write ${loadaddr} nand-kernel ${filesize}
nand_updatefdt=nand erase.part nand-fdt; nand write ${fdtaddr} nand-fdt ${filesize}
nand_loadk=nand read ${loadaddr} nand-kernel
nand_loadfdt=nand read ${fdtaddr} nand-fdt
nand_nand=run nand_loadk nand_loadfdt nandargs addcons addmisc; if run configid_fixupfdt; then bootm ${loadaddr} - ${fdtaddr}; fi
  • Update the bootfile and fdtfile environment variables to fit the filename as found inside the TFTP server.
  • Program kernel and device tree on NAND flash with the following U-Boot command
run loadk nand_updatek loadfdt nand_updatefdt

E.g.:

=> run loadk nand_updatek loadfdt nand_updatefdt
Using FEC0 device
TFTP from server 192.168.0.13; our IP address is 192.168.0.89
Filename 'lynx/uImage'.
Load address: 0x80800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################################
         1.9 MiB/s
done
Bytes transferred = 8189464 (7cf618 hex)

NAND erase.part: device 0 offset 0xc00000, size 0x800000
Erasing at 0x13e0000 -- 100% complete.
OK

NAND write: device 0 offset 0xc00000, size 0x7cf618
 8189464 bytes written: OK
Using FEC0 device
TFTP from server 192.168.0.13; our IP address is 192.168.0.89
Filename 'lynx/imx6ul-axelulite.dtb'.
Load address: 0x83000000
Loading: #######
         1.8 MiB/s
done
Bytes transferred = 32518 (7f06 hex)

NAND erase.part: device 0 offset 0xa00000, size 0x100000
Erasing at 0xae0000 -- 100% complete.
OK

NAND write: device 0 offset 0xa00000, size 0x7f06
 32518 bytes written: OK

Reboot the system and configure U-Boot to apply the new configuration

=> setenv bootcmd run nand_nand
=> saveenv

Program root file system into NAND flash[edit | edit source]

  • boot the system via SD or NFS as described in the Booting from NFS
  • by default, the NAND is already partitioned to allow booting from NAND-only (see next section) and, thus, some partitions are reserved for u-boot and kernel images. Here we won't modify this default configuration. The MTD partitions can be dumped with /proc/mtd (the partition's name should be self-explanatory)
root@desk-mx6ul-axelulite:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00200000 00020000 "nand-SPL"
mtd1: 00600000 00020000 "nand-uboot"
mtd2: 00100000 00020000 "nand-env1"
mtd3: 00100000 00020000 "nand-env2"
mtd4: 00100000 00020000 "nand-fdt"
mtd5: 00100000 00020000 "nand-spare"
mtd6: 00800000 00020000 "nand-kernel"
mtd7: 00400000 00020000 "nand-splash"
mtd8: 3e800000 00020000 "nand-ubi"
mtd9: 00010000 00001000 "spi-SPL"
mtd10: 000f0000 00001000 "spi-uboot"
mtd11: 00040000 00001000 "spi-env1"
mtd12: 00040000 00001000 "spi-env2"
mtd13: 00080000 00001000 "spi-dtb"
mtd14: 00800000 00001000 "spi-kernel"
mtd15: 00400000 00001000 "spi-splash"
mtd16: 01200000 00001000 "spi-free"


200px-Emblem-important.svg.png

Please note that MTD partition index may change depending of flash device availability, flash device size, u-boot environment variables or kernel device driver load order. Always take care of looking inside /proc/mtd to match your specific layout


  • Format and initialize nand-ubi partition, which in our case is mtd8, using UBI with:
ubiformat /dev/mtd8
ubiattach -m 8
ubimkvol /dev/ubi0 -N rootfs -m

E.g.

root@desk-mx6ul-axelulite:~# ubiformat /dev/mtd8
ubiformat: mtd8 (nand), size 1048576000 bytes (1000.0 MiB), 8000 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 7999 -- 100 % complete   
ubiformat: 8000 eraseblocks have valid erase counter, mean value is 16
ubiformat: formatting eraseblock 7999 -- 100 % complete  
root@desk-mx6ul-axelulite:~# ubiattach -m 8
UBI device number 0, total 8000 LEBs (1015808000 bytes, 968.7 MiB), available 7836 LEBs (994983936 bytes, 948.8 MiB), LEB size 126976 bytes (124.0 KiB)
root@desk-mx6ul-axelulite:~# ubimkvol /dev/ubi0 -N rootfs -m
Set volume size to 994983936
Volume ID 0, size 7836 LEBs (994983936 bytes, 948.8 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
  • Now mount the UBI volume using UBIFS in a temporary directory
mkdir -p /mnt/nand
mount -t ubifs ubi0_0 /mnt/nand

E.g.:

root@desk-mx6ul-axelulite:~# mkdir -p /mnt/nand
root@desk-mx6ul-axelulite:~# mount -t ubifs ubi0_0 /mnt/nand/
root@desk-mx6ul-axelulite:~# dmesg | tail -n 7
[  201.602548] UBIFS (ubi0:0): Mounting in unauthenticated mode
[  201.602935] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 293
[  201.634481] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[  201.634523] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[  201.634550] UBIFS (ubi0:0): FS size: 992698368 bytes (946 MiB, 7818 LEBs), journal size 33521664 bytes (31 MiB, 264 LEBs)
[  201.634570] UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB)
[  201.634596] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID CBE8807E-6A37-400B-9B56-E12B4C034D9E, small LPT model
  • you can now extract the root file system into that directory
tar xvjf desk-image-qt5-desk-mx6ul-axelulite.tar.bz2 -C /mnt/nand/
  • finally, you need to cleanly umount and detach the MTD partition
umount /mnt/nand/
ubidetach -m 8

E.g.

root@desk-mx6ul-axelulite:~# umount /mnt/nand
root@desk-mx6ul-axelulite:~# ubidetach -m 8
root@desk-mx6ul-axelulite:~# dmesg | tail -n 4
[ 1154.988629] UBIFS (ubi0:0): un-mount UBI device 0
[ 1154.989082] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" stops
[ 1160.907410] ubi0: detaching mtd8
[ 1160.921595] ubi0: mtd8 is detached

You can now safely reboot or turn off the system.

In U-Boot environment check the following variable, which must contain the same MTD partition number used above

nandargs=setenv bootargs ubi.mtd=8 root=ubi0_0 rootfstype=ubifs rw


How to configure the network interfaces[edit | edit source]

For deploying an Embedded System, one of the most important configuration is the Network Interface configuration.

Once the Embedded Device is finally configured for stand-alone bootstrap, the network interface should be configured for reaching the device remotely via network connections like ssh, telnet, ftp, http, etc.

This Application Note briefly describes how it is possible to simply configure the network interfaces on systemd

Resources[edit | edit source]

For further details on network configuration, please refer - for example - to:

Examples[edit | edit source]

The following configuration assumptions are used in the paragraphs shown below:

  • IP address range of the LAN network 192.168.1.0 - 192.168.1.255
  • IP address of the gateway 192.168.1.254
  • IP address of the device 192.168.1.100

systemd[edit | edit source]

The network configuration for systemd are basically found in the /etc/systemd/network/ directory.

The most simply way for configuring the network interface is to create/edit the file /etc/systemd/network/20-eth0.network as per the following paragraphs.

For more example and usage hints on systemd, please refer to our wiki page.

Static IP address[edit | edit source]

[Match]
Name=eth0

# Prevent the interface loading if the kernel boots from nfs
KernelCommandLine=!nfsroot

[Network]
Address=192.168.1.100/24
Gateway=192.168.1.254
DNS=192.168.1.1

Dynamic IP addres (DHCP)[edit | edit source]

The network interface is configured - using a proper DHCP server on the network - by using the DHCP key in the configuration file as the following:

[Match]
Name=eth0

# Prevent the interface loading if the kernel boots from nfs
KernelCommandLine=!nfsroot

[Network]
DHCP=yes

When systemd network starts, it tries to use a DHCP server present in the network to configure the interface.

DNS[edit | edit source]

The DNS key (in the configuration file) is used only if the systemd-resolved service is enabled and the /etc/resolv.conf has a symbolic link to /run/systemd/resolve/stub-resolv.conf

ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

loopback network interface[edit | edit source]

systemd contains native implementations of various tasks that need to be executed as part of the boot process.

For example, it sets the hostname or configures the loopback network device.

Apply configuration changes[edit | edit source]

After editing the above files, changes are applied after reboot or by restarting systemd-networkd.service:

root@desk-mx6ul-axelulite:~# systemctl restart systemd-networkd.service

Peripherals[edit | edit source]

Peripheral Audio[edit | edit source]

200px-Emblem-important.svg.png

The audio peripheral is not available - as default option - on AXEL ULite EVK. Please contact Sales department for this option.

Device tree configuration[edit | edit source]

Here below an example of device tree configuration for the AXEL ULite SOM (using a special version of AXEL ULite EVK mounting option):

From imx6ul-axelulite-cb006c.dts:

        sound {
                compatible = "fsl,imx-audio-tlv320aic31xx";
                model = "axelulite-audio-tlv320aic3100";
                cpu-dai = <&sai2>;
                audio-codec = <&codec>;
                audio-routing =
                        "Speaker", "SPK",
                        "Headphone Jack", "HPL",
                        "Headphone Jack", "HPR",
                        "MIC1LP", "Line In",
                        "MIC1LM", "Line In",
                        "MIC1RP", "Mic Jack",
                        "Mic Jack", "MICBIAS";
                status = "okay";
        };

&i2c4 {
        clock-frequency = <100000>;
        pinctrl-names = "default", "recovery";
        pinctrl-0 = <&pinctrl_i2c4>;
        pinctrl-1 = <&pinctrl_i2c4_recovery>;
        recovery-gpios = <&gpio1 20 0>, <&gpio1 21 0>;
        status = "okay";

        codec: tlv320aic31xx@18 {
                compatible = "ti,tlv320aic3100";
                reg = <0x18>;
                clocks = <&clks IMX6UL_CLK_SAI2>,
                       <&clks IMX6UL_CLK_DUMMY>;
                clock-names = "mclk1", "mclk2";

		gpio-reset = <&gpio1 27 1>;
		HPVDD-supply = <&reg_3p3v>;
		SPRVDD-supply = <&reg_3p3v>;
		SPLVDD-supply = <&reg_3p3v>;
		AVDD-supply = <&reg_3p3v>;
		IOVDD-supply = <&reg_3p3v>;
		DVDD-supply = <&reg_1p8v>;
        };
...
...
&iomuxc {
        pinctrl-0 = <&pinctrl_hog_gpios>;
        imx6ul-axelulite {

        tlv320aic3x {
                pinctrl_tlv320aic3x_1: tlv320aic3x_codecgrp-1{
                        fsl,pins = <
                                MX6UL_PAD_JTAG_TDI__SAI2_TX_BCLK        0x17088
                                MX6UL_PAD_JTAG_TDO__SAI2_TX_SYNC        0x17088
                                MX6UL_PAD_JTAG_TRST_B__SAI2_TX_DATA     0x11088
                                MX6UL_PAD_JTAG_TCK__SAI2_RX_DATA        0x11088
                                MX6UL_PAD_JTAG_TMS__SAI2_MCLK           0x17088
                                MX6UL_PAD_UART3_RTS_B__GPIO1_IO27       0x130b0 /* codec reset */
                        >;
                };
        };

};

Accessing the peripheral[edit | edit source]

Access to the audio interface is provided by ALSA (Advanced Linux Sound Architecture), which consists in a kernel driver and a users space library for application developers. A set of standard tools alsa-utils can be used for simple management of the audio codec.

Linux messages at boot time[edit | edit source]

...
...
[    3.314515] imx-tlv320aic31xx sound: tlv320aic31xx-hifi <-> 202c000.sai mapping ok
...
...
[    3.545396] ALSA device list:
[    3.548401]   #0: axelulite-audio-tlv320aic3100

To list the audio sound cards just use the aplay utility:

root@desk-mx6ul-axelulite:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: axeluliteaudiot [axelulite-audio-tlv320aic3100], device 0: HiFi tlv320aic31xx-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@desk-mx6ul-axelulite:~#

Usage alsa-utils[edit | edit source]

root@desk-mx6ul-axelulite:~# aplay audio8k16S.wav 
Playing WAVE 'audio8k16S.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo


Peripheral CAN[edit | edit source]

200px-Emblem-important.svg.png

The CAN peripheral is not available on AXEL ULite EVK. This peripheral is available on the i.MX6UL standard product SBCLynx

Device tree configuration[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the AXEL ULite SOM:

From imx6ul-lynx-som0013-cb002f.dts:

&can1 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_flexcan1>;
    status = "okay";
};

From imx6ul-lynx-som0013.dtsi:

&iomuxc {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_hog_gpios>;

        imx6ul-lynx {
...
...
            pinctrl_flexcan1: flexcan1grp{
                    fsl,pins = <
                            MX6UL_PAD_LCD_DATA09__FLEXCAN1_RX       0x1b020
                            MX6UL_PAD_LCD_DATA08__FLEXCAN1_TX       0x1b020
                    >;
            };
};

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

...
...
[    3.806768] can: controller area network core
[    3.816080] can: raw protocol
[    3.819081] can: broadcast manager protocol
[    3.823309] can: netlink gateway - max_hops=1
...
...

Enable the interface and check status[edit | edit source]

root@desk-mx6ul-lynx:~# ip link set can0 type can bitrate 500000
root@desk-mx6ul-lynx:~# ifconfig can0 up
root@desk-mx6ul-lynx:~# ifconfig can0
can0: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 33

Usage with can-utils[edit | edit source]

root@desk-mx6ul-lynx:~# ip link set can0 type can bitrate 500000 triple-sampling on loopback on                                                                                                                 
root@desk-mx6ul-lynx:~# ifconfig can0 up
root@desk-mx6ul-lynx:~# candump can0 &
[1] 280
interface = can0, family = 29, type = 3, proto = 1
root@desk-mx6ul-lynx:~# cansend can0 -i 0x7ff 00 01 02 03 04 05 06 07
interface = can0, family = 29, type = 3, proto = 1
<0x7ff> [8] 00 01 02 03 04 05 06 07 
<0x7ff> [8] 00 01 02 03 04 05 06 07

Additional information[edit | edit source]

Each CAN port appears like a networking interface in the form canX where X is the port number.

Information about programming the CAN socket interface is given in the kernel tree under Documentation/networking/can.rst


Peripheral Ethernet[edit | edit source]

The ethernet interface is made available through the i.MX6UL fec interface which should be initialized on the device tree.

Device tree configuration[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the AXEL ULite SOM:

From imx6ul-axelulite.dtsi:

&fec1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet1>;
        phy-mode = "rmii";
        phy-handle = <&ethphy0>;
        status = "okay";

        mdio {
                #address-cells = <1>;
                #size-cells = <0>;

                ethphy0: ethernet-phy@3 {
                        compatible = "ethernet-phy-ieee802.3-c22";
                        reg = <3>;
                };
        };
};
...
...
&iomuxc {
...
...
                pinctrl_enet1: enet1grp {
                        fsl,pins = <
                                MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN      0x1b0b0
                                MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER      0x1b0b0
                                MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0b0
                                MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0b0
                                MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN      0x1b0b0
                                MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0
                                MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0
                                MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1  0x4001b0a8
                                MX6UL_PAD_GPIO1_IO07__ENET1_MDC         0x1b0b0
                                MX6UL_PAD_GPIO1_IO06__ENET1_MDIO        0x1b0b0
                                MX6UL_PAD_SNVS_TAMPER1__GPIO5_IO01      0x1b0b0         /* ETH_PHY_RST */
                                MX6UL_PAD_SNVS_TAMPER2__GPIO5_IO02      0x1b0b0         /* ETH_INT */
                        >;
                };

...
...
};

Accessing the peripheral[edit | edit source]

AXEL ULite SOM provides the primary network interface mapped at eth0.

Linux messages at boot time[edit | edit source]

...
...
[    2.542709] libphy: fec_enet_mii_bus: probed
[    2.550888] fec 2188000.ethernet eth0: registered PHC device 0
[   28.416349] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
...
...
[   25.277622] Micrel KSZ8081 or KSZ8091 2188000.ethernet-1:03: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=2188000.ethernet-1:03, irq=POLL)
...
...

Cable connection:

...
...
[  194.804822] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[  194.812820] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
...
...

Check the interface with ifconfig[edit | edit source]

root@desk-mx6ul-axelulite:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.4.79  netmask 255.255.255.0  broadcast 192.168.4.255
        inet6 fe80::ec4e:d7ff:fe22:686b  prefixlen 64  scopeid 0x20<link>
        ether ee:4e:d7:22:68:6b  txqueuelen 1000  (Ethernet)
        RX packets 360  bytes 87455 (85.4 KiB)
        RX errors 0  dropped 95  overruns 0  frame 0
        TX packets 134  bytes 20021 (19.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Test with iperf[edit | edit source]

root@desk-mx6ul-axelulite:~# iperf3 -t 5 -c 192.168.4.47
Connecting to host 192.168.4.47, port 5201
[  5] local 192.168.4.79 port 57824 connected to 192.168.4.47 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  11.1 MBytes  93.0 Mbits/sec    0    150 KBytes       
[  5]   1.00-2.00   sec  10.9 MBytes  91.3 Mbits/sec    0    150 KBytes       
[  5]   2.00-3.00   sec  10.8 MBytes  90.2 Mbits/sec    0    150 KBytes       
[  5]   3.00-4.00   sec  10.8 MBytes  90.7 Mbits/sec    0    150 KBytes       
[  5]   4.00-5.00   sec  10.6 MBytes  89.0 Mbits/sec    0    150 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  54.2 MBytes  90.8 Mbits/sec    0             sender
[  5]   0.00-5.02   sec  53.9 MBytes  90.0 Mbits/sec                  receiver

iperf Done.



Peripheral SD[edit | edit source]

Device tree configuration[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the AXEL ULite SOM:

From imx6ul-axelulite.dtsi:

&usdhc1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_usdhc1>;
        cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
        bus-width = <4>;
        no-1-8-v;
        keep-power-in-suspend;
        enable-sdio-wakeup;
        status = "okay";
};
...
...
&iomuxc {
...
...
        pinctrl_usdhc1: usdhc1grp {
            fsl,pins = <
                MX6UL_PAD_SD1_CMD__USDHC1_CMD       0x17059
                MX6UL_PAD_SD1_CLK__USDHC1_CLK       0x10071
                MX6UL_PAD_SD1_DATA0__USDHC1_DATA0   0x17059
                MX6UL_PAD_SD1_DATA1__USDHC1_DATA1   0x17059
                MX6UL_PAD_SD1_DATA2__USDHC1_DATA2   0x17059
                MX6UL_PAD_SD1_DATA3__USDHC1_DATA3   0x17059
                MX6UL_PAD_UART1_RTS_B__GPIO1_IO19   0x17059     /* SD1 CD */
            >;
        };
...
...
};

The USDHC interface is re-configured on carrier device tree because of the Card Detect pin (which is related to the real board hardware implementation).

Accessing the peripheral[edit | edit source]

Once initialized, the SD device is mapped to the standard /dev/mmcblk0pX block device, depending on how many partition are created on the SD card.

Linux messages at boot time[edit | edit source]

If the microSd card is inserted at boot time, the kernel - once the USDHC interface has been initialized - prints the device information and the partition detected like p1, p2, etc.:

...
...
[    3.236168] mmc0: SDHCI controller on 2190000.mmc [2190000.mmc] using ADMA
[    3.308821] mmc0: host does not support reading read-only switch, assuming write-enable
[    3.328089] mmc0: new high speed SDHC card at address aaaa
[    3.346316] mmcblk0: mmc0:aaaa SL32G 29.7 GiB 
[    3.362682]  mmcblk0: p1 p2
[    4.482459] EXT4-fs (mmcblk0p2): recovery complete
[    4.498197] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    8.414331] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
...
...

Additional information[edit | edit source]

If the root file system configuration does not automatically mount the partition, it is possible to mount the device using the following command:

root@desk-mx6ul-axelulite:~# mkdir -p /mnt/boot
root@desk-mx6ul-axelulite:~# mount /dev/mmcblk0p1 /mnt/boot/
root@desk-mx6ul-axelulite:~# ls /mnt/boot/
boot.scr  imx6ul-axelulite-cb003a.dtb  imx6ul-axelulite-cb006c.dtb  splash_image.bmp  uImage

and then the mounted partition is available on the /mnt/boot root file system directory.



Peripheral UART[edit | edit source]

Device tree configuration[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the AXEL ULite SOM:

From the Carrier imx6ul-axelulite-cb003a.dts device tree:

&uart3 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart3>;
        status = "okay";
};
...
...
&iomuxc {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_hog_gpios>;

        imx6ul-axelulite {
...
...
        uart {
                pinctrl_uart3: uart3grp {
                        fsl,pins = <
                                MX6UL_PAD_UART3_RX_DATA__UART3_DCE_RX   0x1b0b1
                                MX6UL_PAD_UART3_TX_DATA__UART3_DCE_TX   0x1b0b1
                        >;
                };
        };
...
...

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

...
...
[    0.437613] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 21, base_baud = 5000000) is a IMX
[    1.167221] console [ttymxc0] enabled
[    1.172839] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 58, base_baud = 5000000) is a IMX
...
...

Usage with stty[edit | edit source]

N.B. UART mapping respect to ttymxcX is the following one:

UART1 <-> ttymxc0
UART2 <-> ttymxc1
UART3 <-> ttymxc2
UART4 <-> ttymxc3
UART5 <-> ttymxc4
UART6 <-> ttymxc5
UART7 <-> ttymxc6
UART8 <-> ttymxc7
...


For exmaple, using a loopback HW connection (RX shortcircuited to TX on UART232 port) it is possibile to test the send and receive data using the ttymxc2 device:

root@desk-mx6ul-axelulite:~# stty -F /dev/ttymxc2 115200 -echo                                                                                                                                                          
root@desk-mx6ul-axelulite:~# cat /dev/ttymxc2 &                                                                                                                                                                         
[1] 266
root@desk-mx6ul-axelulite:~# echo "Test loopback" > /dev/ttymxc2
Test loopback

Additional information[edit | edit source]

Serial ports can be used through the standard serial programming API.

For detailed information, please refer to the Serial Programming HOWTO at Serial-Programming-HOWTO



Peripheral USB Host[edit | edit source]

The USB Host port requires to configure the USB VBUS regulator and the gpio used for enabling the 5V USB power switch.

Device tree configuration[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the AXEL ULite SOM:

From imx6ul-axelulite-cb003a.dts:

        reg_usb_otg1_vbus: regulator@2 {
                compatible = "regulator-fixed";
                reg = <2>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_usb_otg1>;
                regulator-name = "usb_otg1_vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
                gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
                enable-active-high;
        };
...
...
&usbotg1 {
        vbus-supply = <&reg_usb_otg1_vbus>;
        disable-over-current;
        dr_mode = "host";
        status = "okay";
};
...
...
&iomuxc {
        pinctrl-0 = <&pinctrl_hog_gpios>;
        imx6ul-axelulite {
...
...
                pinctrl_usb_otg1: usbotg1grp {
                        fsl,pins = <
                                MX6UL_PAD_UART1_CTS_B__GPIO1_IO18       0x10b0          /* HOST PWR */
                                MX6UL_PAD_GPIO1_IO03__GPIO1_IO03        0x10b0          /* HOST OC */
                        >;
                };
};


Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

When a USB peripheral is inserted, in the following example a memory mass storage device, the kernel recognizes the device (i.e. xlass, vendor id, product id, etc.)

root@desk-mx6ul-axelulite:~# [  564.193377] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[  564.435616] usb 1-1: New USB device found, idVendor=0951, idProduct=1665
[  564.442457] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  564.457846] usb 1-1: Product: DataTraveler 2.0
[  564.462455] usb 1-1: Manufacturer: Kingston
[  564.474290] usb 1-1: SerialNumber: 50E549C202681071F97202CB
[  564.488603] usb-storage 1-1:1.0: USB Mass Storage device detected
[  564.508986] scsi host0: usb-storage 1-1:1.0
[  565.526470] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 2.0 0000 PQ: 0 ANSI: 4
[  565.555313] sd 0:0:0:0: [sda] 15151168 512-byte logical blocks: (7.76 GB/7.22 GiB)
[  565.583739] sd 0:0:0:0: [sda] Write Protect is off
[  565.599208] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  565.637032]  sda: sda1
[  565.663492] sd 0:0:0:0: [sda] Attached SCSI removable disk

Additional information[edit | edit source]

If the root file system configuration does not automatically mount the partition, it is possible to mount the device using the following command:

root@desk-mx6ul-axelulite:~# mkdir -p /mnt/usb
root@desk-mx6ul-axelulite:~# mount /dev/sda1 /mnt/usb
[  640.717947] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@desk-mx6ul-axelulite:~#  ls -la /mnt/usb
total 6756
drwxr-xr-x 3 root root   16384 Jan  1  1970 .
drwxr-xr-x 4 root root    4096 Oct  7 16:33 ..
drwxr-xr-x 2 root root   16384 Feb 26  2020 System Volume Information
-rwxr-xr-x 1 root root 6881192 Mar 31  2020 uImage-4.14.98-xelk-5.0.0-rc2+gb0960b6
root@desk-mx6ul-axelulite:~#


Peripheral USB OTG[edit | edit source]

The USB OTG ports can be configured as Host or Device mode depending on the device tree configuration. In OTG mode they can be easily tested using the Mass Storage Gadget, which lets the device export a file as a mass storage device to the connected PC.


200px-Emblem-important.svg.png

The USB OTG peripheral is not available - as default option - on AXEL ULite EVK. Please contact Sales department for this option.
This peripheral is available on the i.MX6UL standard product SBCLynx

Device tree configuration[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the AXEL ULite SOM where USB OTG1 is configured as otg while the USB OTG2 port is configured in host mode:

From imx6ul-lynx-som0013-cb002f.dts:

		pinctrl_usb_otg2: usbotg2grp {
			fsl,pins = <
				MX6UL_PAD_ENET2_TX_DATA1__GPIO2_IO12    0x17059 /* OTG2_PWR */
				MX6UL_PAD_ENET2_TX_EN__USB_OTG2_OC       0x17059 /* OTG2_OC */
			>;
		};
	};
};

and from imx6ul-lynx-som0013.dtsi:


		pinctrl_usb_otg2: usbotg2grp {
			fsl,pins = <
				MX6UL_PAD_ENET2_TX_DATA1__GPIO2_IO12    0x17059 /* OTG2_PWR */
				MX6UL_PAD_ENET2_TX_EN__USB_OTG2_OC       0x17059 /* OTG2_OC */
			>;
		};

		pinctrl_usb_otg2_1: usbotg2grp-1 {
			fsl,pins = <
				MX6UL_PAD_UART3_CTS_B__GPIO1_IO26	0x17059 /* OTG2_PWR */
				MX6UL_PAD_UART3_RTS_B__GPIO1_IO27	0x17059 /* OTG2_OC */
			>;
		};

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

...
...
[    3.691938] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    3.700663] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.708200] usb usb2: Product: EHCI Host Controller
[    3.713101] usb usb2: Manufacturer: Linux 5.10.35-desk-mx6ul-l-3.0.0+g48931d32962e ehci_hcd
[    3.721517] usb usb2: SerialNumber: ci_hdrc.1
...
...

Usage in Host mode[edit | edit source]

When a USB peripheral is inserted, in the following example a memory mass storage device, the kernel recognizes the device (i.e. class, vendor id, product id, etc.)

[   86.792011] usb 1-1: new high-speed USB device number 3 using ci_hdrc
[   86.994587] usb 1-1: New USB device found, idVendor=0781, idProduct=5591, bcdDevice= 1.00
[   87.003001] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   87.010294] usb 1-1: Product:  SanDisk 3.2Gen1
[   87.021695] usb 1-1: Manufacturer:  USB
[   87.028329] usb 1-1: SerialNumber: 03017128082020175157
[   87.044709] usb-storage 1-1:1.0: USB Mass Storage device detected
[   87.065893] scsi host0: usb-storage 1-1:1.0
[   88.094462] scsi 0:0:0:0: Direct-Access      USB      SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[   88.114699] sd 0:0:0:0: [sda] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
[   88.138282] sd 0:0:0:0: [sda] Write Protect is off
[   88.153463] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   88.228657]  sda: sda1
[   88.248736] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   90.031956] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

Usage with mass-storage[edit | edit source]

root@desk-mx6ul-lynx:~# dd if=/dev/zero of=mass_storage count=32 bs=1M                                                                                                                                             
32+0 records in
32+0 records out
33554432 bytes (34 MB, 32 MiB) copied, 0.593427 s, 56.5 MB/s
root@desk-mx6ul-lynx:~# mkfs.msdos mass_storage
mkfs.fat 4.2 (2021-01-31)
root@desk-mx6ul-lynx:~# mkdir loop
root@desk-mx6ul-lynx:~# mount -o loop mass_storage loop
txtt@desk-mx6ul-lynx:~# echo "Test USB OTG with mass storage device" > loop/usb.txt
root@desk-mx6ul-lynx:~# umount loop/

then insert the g_mass_storage kernel module driver enabling an Windows PC to see it as a removable device

root@desk-mx6ul-lynx:~# modprobe g_mass_storage removable=y file=mass_storage
root@desk-mx6ul-lynx:~# dmesg | tail -n 7
[  205.107477] Mass Storage Function, version: 2009/09/11
[  205.107514] LUN: removable file: (no medium)
[  205.107758] LUN: removable file: /home/root/mass_storage
[  205.107775] Number of LUNs=1
[  205.113207] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[  205.113238] g_mass_storage gadget: userspace failed to provide iSerialNumber
[  205.113253] g_mass_storage gadget: g_mass_storage ready

Once the USB cable is connected to the PC, the storage is mounted and the usb.txt file is available:

$ cat /media/tomzy/42D5-CBA5/usb.txt 
Test USB OTG with mass storage device

The Windows PC also activate the driver and the disk is available as a Drive Unit (with the usb.txt file available).

Additional information[edit | edit source]

More information about Mass Storage Gadget driver is given in the kernel tree under Documentation/usb/mass-storage.rst



Peripheral GPIOs[edit | edit source]

i.MX6UL can handle external pins in many different ways and most of them can be configured as GPIOs. When a pin is set as a GPIO, it is possible to read its value, change its direction or change output value directly from the shell.


200px-Emblem-important.svg.png

There aren't GIO already configured in the AXEL ULite EVK.
Here below an example of GPIOs usage in the i.MX6UL standard product SBCLynx

Device tree configuration[edit | edit source]

Here below an example of device tree configuration for using the RS-485 GPIOs used on standard DAVE's product SBCLynx:

From imx6ul-lynx-som0013.dtsi:

        /* configure uart8/ttymxc7 as rs232 */
        uart8_rs232_config: uart8_rs232 {
                compatible = "gpio-leds";
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_uart8_config>;

                status = "disabled";

                gpio113 {
                        gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
                gpio136 {
                        gpios = <&gpio5 8 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
                gpio137 {
                        gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
};

&iomuxc {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_hog_gpios>;

        imx6ul-lynx {

...
...
                pinctrl_uart8_config: uart8grp-config {
                        fsl,pins = <
                                MX6UL_PAD_SNVS_TAMPER8__GPIO5_IO08      0x80000000 /* MPUART0_DEN */
                                MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09      0x80000000 /* MPUART0_RXEN */
                                MX6UL_PAD_CSI_MCLK__GPIO4_IO17          0x80000000 /* MPUART0_ON */
                        >;
                };

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

With the previous leds configuration for the GPIOs, it is possible to find them on sysfs under /sys/class/leds sub-directory:

root@desk-mx6ul-lynx:~# ls -la /sys/class/leds/
total 0
drwxr-xr-x  2 root root 0 Mar 24 10:25 .
drwxr-xr-x 54 root root 0 Mar 24 10:25 ..
lrwxrwxrwx  1 root root 0 Mar 24 10:25 gpio113 -> ../../devices/platform/uart8_rs232/leds/gpio113
lrwxrwxrwx  1 root root 0 Mar 24 10:25 gpio114 -> ../../devices/platform/uart3_rs485/leds/gpio114
lrwxrwxrwx  1 root root 0 Mar 24 10:25 gpio136 -> ../../devices/platform/uart8_rs232/leds/gpio136
lrwxrwxrwx  1 root root 0 Mar 24 10:25 gpio137 -> ../../devices/platform/uart8_rs232/leds/gpio137
lrwxrwxrwx  1 root root 0 Mar 24 10:25 mmc0:: -> ../../devices/platform/soc/2100000.bus/2190000.mmc/leds/mmc0::
lrwxrwxrwx  1 root root 0 Mar 24 10:25 mmc1:: -> ../../devices/platform/soc/2100000.bus/2194000.mmc/leds/mmc1::

Usage with sysfs[edit | edit source]

  • set GPIO1_IO01 (MX6UL_PAD_GPIO1_IO01__GPIO1_IO01) as output GPIO
    • GPIO1_IO01 => (n-1)*32 + IO = (1-1)*32+1 = 1
root@desk-mx6ul-lynx:~# echo 1 > /sys/class/gpio/export
root@desk-mx6ul-lynx:~# echo out > /sys/class/gpio/gpio1/direction
root@desk-mx6ul-lynx:~# echo 1 > /sys/class/gpio/gpio1/value
root@desk-mx6ul-lynx:~#
  • set GPIO1_IO02 (echo 1 > /sys/class/gpio/gpio1/value) as input GPIO
    • GPIO1_IO02 => (n-1)*32 + IO = (1-1)*32+1 = 2
root@desk-mx6ul-lynx:~# echo 2 > /sys/class/gpio/export
root@desk-mx6ul-lynx:~# echo in > /sys/class/gpio/gpio2/direction
root@desk-mx6ul-lynx:~# cat /sys/class/gpio/gpio2/value
0

Additional information[edit | edit source]

Information about GPIOs usage under sysfs directory https://www.kernel.org/doc/Documentation/gpio/sysfs.txt


Warning-icon.png sysfs GPIO ABI has been deprecated. See more inofrmation here about it. A character device access has to be used, more information here Warning-icon.png

Information about GPIOs library libgpiod - C library and tools - can be found on git.kernel.org