Imx uuu: Difference between revisions

From Variscite Wiki
No edit summary
(Add support for Yocto Debian)
 
(17 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<!-- Set release according to "release" parameter in URL and use Sumo_V2.1_DART-MX8M as default
<!-- Set release according to "release" parameter in URL and use Sumo_V2.1_DART-MX8M as default
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!--
--> {{INIT_RELEASE_PARAM|RELEASE_SUMO_V2.1_DART-MX8M}}<!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_SUMO_V2.1_DART-MX8M}}}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{PageHeader|Booting from USB using UUU utility}} {{DocImage|category1={{#var:HARDWARE_NAME}}|category2=Yocto}} __toc__
--> {{#lst:Debian_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:B2QT_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#vardefine:PLATFORM_OS|{{#varexists:B2QT_BSP_VERSION | B2QT | {{#varexists:DEBIAN_NAME | Debian | Yocto }}}}}} <!--
--> {{#vardefine:BUILD_GUIDE|{{#ifeq: {{#var:PLATFORM_OS}} | Debian | Yocto_Debian_Build_Release | {{#var:PLATFORM_OS}}_Build_Release }}}} <!--
--> {{PageHeader|Booting from USB using UUU (Universal Update Utility)}} {{DocImage|category1={{#var:HARDWARE_NAME}}|category2=Yocto}}[[Category:Debian]] __toc__
= Introduction =
= Introduction =


UUU is an open source utility by NXP that allows downloading and executing code on NXP i.MX6/i.MX7/i.MX8 SoCs through the Serial Download Protocol (SDP).<br>
UUU (Universal Update Utility) is an open source utility by NXP that allows downloading and executing code on i.MX SoCs through the Serial Download Protocol (SDP).<br>
It is the next generation of NXP's MFGTOOL used to load SPL and U-Boot via the USB OTG port and optionally program the internal storage of the SOM.<br>
It is the next generation of NXP's MFGTOOL used to load SPL and U-Boot via the USB OTG port and optionally program the internal storage of the SOM.<br>
For more details please visit https://github.com/NXPmicro/mfgtools<br>
For more details please visit https://github.com/NXPmicro/mfgtools<br>
Line 12: Line 16:
All Variscite SOMs are shipped with U-Boot pre-programmed on the internal storage.<br>
All Variscite SOMs are shipped with U-Boot pre-programmed on the internal storage.<br>
In addition, all Variscite carrier boards have an SD card slot, and even in the unlikely event of the U-Boot being erased from the internal storage, the SOM can always be booted from an SD card (like our recovery SD card, for example).<br>
In addition, all Variscite carrier boards have an SD card slot, and even in the unlikely event of the U-Boot being erased from the internal storage, the SOM can always be booted from an SD card (like our recovery SD card, for example).<br>
This utility can be used to program full software image to internal storage when SD and network boot options are not available.  
So, generally, this utility is not needed, however, it is yet another option that can be used to boot (and optionally program) the Variscite SOMs, for anyone who is interested.


= Step by step usage instructions =
= Step by step usage instructions =
'''Download and build the UUU utility''':<br>
'''Download and build uuu''':<br>
<pre>
<pre>
$ sudo apt-get install libusb-1.0-0-dev libzip-dev libbz2-dev pkg-config cmake
$ sudo apt-get install libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++
$ cd ~
$ cd ~
$ git clone https://github.com/NXPmicro/mfgtools.git
$ git clone https://github.com/NXPmicro/mfgtools.git
$ cd mfgtools
$ cd mfgtools
$ git checkout uuu_1.4.240
$ cmake .
$ cmake .
$ make
$ make
Line 26: Line 31:


'''Build U-Boot''':<br>
'''Build U-Boot''':<br>
Build U-Boot using the defconfig for SD card/eMMC.  
* Build U-Boot using the defconfig for SD card/eMMC. You can follow the "Build U-Boot from source code" instructions {{Varlink|Yocto_Build_U-Boot|{{#var:RELEASE_LINK}}|here}}.<br>
You can follow the "Build U-Boot from source code" instructions {{Varlink|Yocto_Build_U-Boot|{{#var:RELEASE_LINK}}|here}}.<br>
* Copy the U-Boot image to the uuu directory:
Copy the U-Boot image to uuu directory:
  $ cp -v {{#var:U-BOOT_SD_IMAGE_NAME}} ~/mfgtools/uuu/_flash.bin
 
  $ cp -v {{#var:U-BOOT_SD_IMAGE_NAME}} ~/mfgtools/uuu
$ cd ~/mfgtools/uuu
$ ln -fs {{#var:U-BOOT_SD_IMAGE_NAME}} _flash.bin


'''Boot the board into serial download mode''':<br>
'''Boot the board into serial download mode''':<br>
{{Varlink|Yocto_Build_Release#Setting the Boot Mode|{{#var:RELEASE_LINK}}|Set the board boot mode}} to SD card, while not having an actual card inserted in its slot.<br>
*{{Varlink|{{#var:BUILD_GUIDE}}#Setting the Boot Mode|{{#var:RELEASE_LINK}}|Set the board boot mode}} to SD card, while not having an actual card inserted in its slot.<br>
Alternatively, set the board boot mode to eMMC/NAND flash, when the eMMC/NAND flash does not contain a bootloader.<br>
Alternatively, set the board boot mode to eMMC/NAND flash, when the eMMC/NAND flash does not contain a bootloader.<br>
Connect the board to your host PC via the USB OTG port, and power on the board.<br>
Connect the board to your host PC via the USB OTG port, and power on the board.<br>
The board should be recognized on the host as a "NXP Semiconductors".<br>
The board should be recognized on the host as a "NXP Semiconductors SE Blank M850" (or something similar).<br>
<br>
<br>
'''Note:''' If your board only has a regular USB type-A connector and doesn't have a USB Micro-AB receptacle, you can use a "male USB type-A to male USB type-A" cable<br>
'''Note:'''<br>
If your board only has a regular USB type-A connector and doesn't have a USB Micro-AB or Type-C receptacle, you can use a "male USB type-A to male USB type-A" cable.<br>
<br>
<br>
'''Run uuu to load U-Boot on the board''':
'''Run uuu to load U-Boot on the board''':
<pre>
<pre>
$ cd ~/mfgtools/uuu
  $ sudo ./uuu ./spl_boot.lst
  $ sudo ./uuu ./spl_boot.lst
</pre>
</pre>
Line 50: Line 53:
<br>
<br>


'''Notes''':
'''Note''':<br>
* The default boot command when booting from USB is bootcmd_mfg. It is defined in the board's default environment.
The default boot command when booting from USB is bootcmd_mfg - it is defined by default in include/configs/imx_env.h in the U-Boot source code, as part of the the board's default environment.<br>
It can be redefined or made empty.

Latest revision as of 10:13, 22 April 2024

Warning: This page is designed to be used with a 'release' URL parameter.

This page is using the default release RELEASE_SUMO_V2.1_DART-MX8M.
To view this page for a specific Variscite SoM and software release, please follow these steps:

  1. Visit variwiki.com
  2. Select your SoM
  3. Select the software release
Booting from USB using UUU (Universal Update Utility)

Introduction

UUU (Universal Update Utility) is an open source utility by NXP that allows downloading and executing code on i.MX SoCs through the Serial Download Protocol (SDP).
It is the next generation of NXP's MFGTOOL used to load SPL and U-Boot via the USB OTG port and optionally program the internal storage of the SOM.
For more details please visit https://github.com/NXPmicro/mfgtools

Note:
All Variscite SOMs are shipped with U-Boot pre-programmed on the internal storage.
In addition, all Variscite carrier boards have an SD card slot, and even in the unlikely event of the U-Boot being erased from the internal storage, the SOM can always be booted from an SD card (like our recovery SD card, for example).
So, generally, this utility is not needed, however, it is yet another option that can be used to boot (and optionally program) the Variscite SOMs, for anyone who is interested.

Step by step usage instructions

Download and build uuu:

$ sudo apt-get install libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++
$ cd ~
$ git clone https://github.com/NXPmicro/mfgtools.git
$ cd mfgtools
$ git checkout uuu_1.4.240 
$ cmake .
$ make

Build U-Boot:

  • Build U-Boot using the defconfig for SD card/eMMC. You can follow the "Build U-Boot from source code" instructions here.
  • Copy the U-Boot image to the uuu directory:
$ cp -v imx-boot-sd.bin ~/mfgtools/uuu/_flash.bin

Boot the board into serial download mode:

Alternatively, set the board boot mode to eMMC/NAND flash, when the eMMC/NAND flash does not contain a bootloader.
Connect the board to your host PC via the USB OTG port, and power on the board.
The board should be recognized on the host as a "NXP Semiconductors SE Blank M850" (or something similar).

Note:
If your board only has a regular USB type-A connector and doesn't have a USB Micro-AB or Type-C receptacle, you can use a "male USB type-A to male USB type-A" cable.

Run uuu to load U-Boot on the board:

 $ cd ~/mfgtools/uuu
 $ sudo ./uuu ./spl_boot.lst

The board should now run U-Boot.
You can see its output on the console via the debug port, as always.

Note:
The default boot command when booting from USB is bootcmd_mfg - it is defined by default in include/configs/imx_env.h in the U-Boot source code, as part of the the board's default environment.
It can be redefined or made empty.