Installing Linux Using USB Serial Downloader Print


Understanding NXP uuu Tool

The i.MX 8M Mini kit software manufacturing procedure makes use of the NXP uuu tool running on the Linux development host. The uuu tool performs installation of the Yocto images from the development host to the kit using the USB Serial Downloader interface.


Locating uuu Tool and Scripts

The Yocto build recipe for the uuu tool as well as related installation script templates are integrated into the https://gitlab.com/emcraft/imx8mm/cube/meta-emcraft-imx8mm.git repository:

[psl@i7 sources]$ ls -lR meta-emcraft-imx8mm/recipes-devtools/uuu/
meta-emcraft-imx8mm/recipes-devtools/uuu/

total 8
drwxrwxr-x 2 psl psl 4096 Sep 24 01:37 files
-rw-rw-r-- 1 psl psl 900 Sep 24 02:04 uuu-native.bb

meta-emcraft-imx8mm/recipes-devtools/uuu/files:
total 8
-rw-rw-r-- 1 psl psl 557 Sep 24 01:37 uuu.script-debug
[psl@i7 sources]$

Upon completion of the bitbake uuu-native build, the uuu binary and the installation scripts have been copied to the Yocto images deploy directory tmp/deploy/images/imx8mmcube/.


Installing Using USB Serial Downloader Protocol (SDP)

Perform the following step-wise procedure to install the Yocto images to the Emcraft i.MX 8M Mini kit:

  1. Power the kit off by disconnecting the USB Type C cable from the development host.
  2. Set the board boot mode to the USB Serial Downloader mode by setting the boot as follows: BM0 on, BM1 off.
  3. Power the kit on by connecting the USB Type C cable to the development host.
  4. Check that the new USB device has appeared on your development host:

    [psl@i7 ~]$ lsusb | grep -i nxp
    Bus 008 Device 010: ID 1fc9:0134 NXP Semiconductors

  5. On the host, go to the Yocto images build directory:

    [psl@i7 ~]$ cd /tmp/deploy/images/imx8mmcube/
    [psl@i7 imx8mmcube]$ ls -1
    ...
    imx-boot-imx8mmcube-sd.bin-flash_evk
    image-pmd-debug-imx8mmcube.sdcard.bz2
    ...

    The images above are:
    • imx-boot-imx8mmcube-sd.bin-flash_evk - U-Boot initial bootloader image;
    • image-pmd-debug-imx8mmcube.sdcard.bz2 - MMC bootable image (U-Boot, Linux, root filesystem).
  6. Check that the uuu tool and the manufacturing scripts are present in the build directory:

    [psl@i7 imx8mmcube]$ ls -1 uuu*
    uuu
    uuu.script-debug-imx8mmcube
    uuu.script-imx8mmcube
    [psl@i7 imx8mm]$ cat uuu.script-imx8mmcube
    uuu_version 1.0.1
    ...
    [psl@i7 imx8mmcube]

  7. Launch installation of the bootbale image to the target board using the uuu tool:

    [psl@i7 imx8mmcube]$ sudo ./uuu -d uuu.script-debug-imx8mmcube
    uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.3.82-0-g9c56e46

    Wait for Known USB Device Appear...

  8. The uuu tool will proceed to install the Production Yocto image to the eMMC device on the target board:

    uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.3.74-2-g302da91

    Success 1 Failure 0

    1:2 1/ 1 [=================100%=================] S: boot -f imx-boot-imx8m
    1:3 7/ 7 [Done ] FB: Done

  9. When uuu has finished, the bootable Linux image has been installed to the on-module eMMC storage. Given proper setting of the boot switches, next power-on will boot the target board from the eMMC.


Verifying New Installation

Perform the following step-wise procedure to verify boot of the newly installed Linux images from the on-module eMMC:

  1. Power the kit off by disconnecting the USB Type C cable from the development host.
  2. Set the board boot mode to the eMMC Boot mode by setting the boot switches as follows: BM0 off, BM1 on.
  3. Power the kit on by connecting the USB Type C cable to the development host.
  4. Verify that the following Linux boot-up messages appear on the serial console:

    U-Boot SPL 2019.04+gd62847f248 (May 19 2020 - 09:22:02 +0000) power_bd71837_init DDRINFO: start DRAM init DDRINFO:ddrphy calibration done DDRINFO: ddrmix config done Normal Boot Trying to boot from MMC2 U-Boot 2019.04+gd62847f248 (May 19 2020 - 09:22:02 +0000) CPU: Freescale i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz) CPU: Commercial temperature grade (0C to 95C) at 36C Reset cause: POR Model: Emcraft i.MX8MM Cube board DRAM: 2 GiB ... Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.4.3+ga922dd67988c (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Tue May 19 10:16:49 UTC 2020 [ 0.000000] Machine model: FSL i.MX8MM EVK board [ 0.000000] earlycon: ec_imx6q0 at MMIO 0x0000000030890000 (options '115200') [ 0.000000] printk: bootconsole [ec_imx6q0] enabled [ 0.000000] efi: Getting EFI parameters from FDT: [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x0000000078000000, size 640 MiB ... Mounting /run/media/mmcblk2p1... [ OK ] Mounted /run/media/mmcblk2p1. [ 8.494745] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 8.502532] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 10.115764] random: crng init done [ 10.119172] random: 7 urandom warning(s) missed due to ratelimiting [ OK ] Started Load/Save Random Seed. i.MX 8M Mini Release beta1-20200519 imx8mmcube ttymxc1 imx8mmcube login:

  5. Enter the Linux session as root with an empty password. At this point, you have the full control of the i.MX 8M Mini kit from Linux, as the superuser.