Building UUU custom built-in script

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Building UUU custom built-in script

Building UUU custom built-in script

Hello everyone,

In this document I'll explain on how to build the UUU (Universal Update Utility) using windows 10 PC.

This may be useful in case of adding custom commands to run during the flash using built-in scripts, be it for debugging, fuse blowing, etc.

First we need to download and install Visual Studio community, for this guide I'll use community 2019, version it is available here:
https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16

For workloads select Universal Windows Platform development.
 
When installing, make sure to select and install the Git for windows complement, at the top select Individual components, this will display a new list, scroll down to code tools and you will find Git for windows, check this box

In case Visual Studio is already installed, you may open the installer again and chose modify, this will let you install the complement as well.

git_selection.png

After the installation is complete we may run the git commands on the power shell.

Now open the windows power shell and type the following commands:

git clone https://github.com/NXPmicro/mfgtools.git
// clones the MFGTool (UUU) source code from the github

cd mfgtools
// enters the mfgtools folder we just cloned

git submodule init
// creates the local configuration file for the submodules

git submodule update
// set the submodules to the commit specified by the main repository.

At this point we can edit the built in scripts to add our custom commands, for this guide I'll add the printenv uboot command at the end of the flashing process.

For this I'll enter the folder mfgtools/uuu, and edit emmc_burn_all.lst with any text editor, i.e. Notepad ++, add the command FB: ucmd printenv.

add_printenv.png

Save and close the editor, it is possible to add most uboot commands like for example the fuse commands to burn eFuses.

Then we can now build the tool, opening msvc/uuu-static-link.sln with Visual studio, select solution uuu-static-link.sln

select_solution.png


And finally build the solution:

build_solution.png


The executable (uuu.exe) would be at the following path:
mfgtools\msvc\x64\Debug

executable.JPG


Finally we run the built in script we modified and check the results.

Find attached both the powershell and uboot logs, I tested this using an i.MX8MN with L5.4.47_2.2.0, running the following command:
./uuu.exe -v -b emmc_all imx-boot-imx8mnevk-sd.bin-flash_evk imx-image-full-imx8mnevk.wic

Hope this may found useful for anyone trying to achieve something similar.

Attachments
No ratings
Version history
Last update:
‎11-06-2020 09:35 AM
Updated by: