This post intends to answer the question of programming the eMMC memory you can find on our Nitrogen6_MAX, Nit6_SoloX, Nit6X-SoMv2 and Nitrogen7 devices.Although there are many different approaches available based on Linux or the MFG Tools, this post will focus on two solutions provided under U-Boot.
Solution #1: Using U-Boot USB Mass Storage Gadget
This feature is fully explained here:
Here is a quick summary:
- Plug a micro-USB cable from your host machine to the target
- Connect the board serial output (console) to your computer
- On the host machine, start a terminal software such as
minicom
for Linux orTeraTerm
for Windows - Set the connection baudrate to 115200 with no hardware flow control
- On the host machine, start a terminal software such as
- Power up the board and stop auto-boot process to get U-Boot prompt
- Simply enter any character on the terminal software to stop auto-boot
- Enable the UMS Gadget for the eMMC
U-Boot > ums 0 mmc 1
- On the host machine, you should now see a new USB drive attached, you can now flash it
- On Linux you can simply use the dd utility
~$ zcat .img.gz | sudo dd of=/dev/sdX bs=1M
- On Windows we recommend using Alex Page's USB Image Tool
Solution #2: Using U-Boot 'gzwrite' command
This feature is fully explained here:
Here is a quick summary:
- Connect the board serial output (console) to your computer
- On the host machine, start a terminal software such as
minicom
for Linux orTeraTerm
for Windows - Set the connection baudrate to 115200 with no hardware flow control
- On the host machine, start a terminal software such as
- Power up the board and stop auto-boot process to get U-Boot prompt
- Simply enter any character on the terminal software to stop auto-boot
- Load the gzipped image into RAM
- This can be done by reading the image from USB, TFTP or MMC
- Below is an example if the image is copied on a SDCard
U-Boot > load mmc 0 10008000 my.img.gz
- Once loaded, you can flash the image onto the eMMC
U-Boot > gzwrite mmc 1 10008000 0x$filesize 100000 0