Imx uuu debian: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 60: Line 60:
It can be redefined or made empty.
It can be redefined or made empty.


{{#ifeq: {{#var:BUILD_PLAFTORM}} | flexbuild |
=Flash Rootfs and Bootloader to eMMC=
=Flash Rootfs and Bootloader to eMMC=
Once you see u-boot being booted on the serial terminal, hit enter to stop booting via autoboot.  
Once you see u-boot being booted on the serial terminal, hit enter to stop booting via autoboot.  
Line 66: Line 67:


This will expose the entire eMMC to host PC, and then you can flash the bootloader and rootfs and kernel.
This will expose the entire eMMC to host PC, and then you can flash the bootloader and rootfs and kernel.
|
== Rootfs ==
'''Build image''':<br>
* To build an image using the defconfig for SD card/eMMC, follow the steps 3-6 from {{Varlink|Debian_Build_Release_Flexbuild|{{#var:RELEASE_LINK}}|Build Debian from source code}} guide.<br>
* Copy the image file to the uuu directory:<br>
Build the image and copy it to the uuu directory:
$ unzstd rootfs_lsdk2412_debian_desktop_arm64.img.zst
$ cp -v rootfs_lsdk2412_debian_desktop_arm64.img ~/mfgtools/uuu/_image
'''Run uuu to load the image on the board''':
<pre>
$ cd ~/mfgtools/uuu
$ sudo ./uuu ./emmc_burn_all.lst
</pre>
* Set the boot selection switch to the eMMC position.<br>
The system should now boot from eMMC, and you can view the output on the console via the debug port as usual.<br>
}}

Revision as of 22:04, 5 June 2025

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 libzip-dev libbz2-dev pkg-config cmake
$ cd ~
$ git clone https://github.com/NXPmicro/mfgtools.git
$ cd mfgtools
$ 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 ~/var_mx8mm_dart_debian_buster/output/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.

Rootfs

Build image:

  • To build an image using the defconfig for SD card/eMMC, follow the steps 3-6 from Build Debian from source code guide.
  • Copy the image file to the uuu directory:

Build the image and copy it to the uuu directory:

$ unzstd rootfs_lsdk2412_debian_desktop_arm64.img.zst
$ cp -v rootfs_lsdk2412_debian_desktop_arm64.img ~/mfgtools/uuu/_image

Run uuu to load the image on the board:

 $ cd ~/mfgtools/uuu
 $ sudo ./uuu ./emmc_burn_all.lst
  • Set the boot selection switch to the eMMC position.

The system should now boot from eMMC, and you can view the output on the console via the debug port as usual.