Writing filesystem image to eMMC in iMX8MP

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

Writing filesystem image to eMMC in iMX8MP

3,969 Views
krishnad
Contributor II

Hi,

Our requirement is as follows:

  1. iMX8M-Plus processor on a custom board.
  2. To use HABv4 (signed uboot & kernel).
  3. Not to use USB or UART interfaces for flashing images.
  4. Linux based OS.
  5. Secure Boot from eMMC (u-boot, kernel, RFS etc all to reside on eMMC).

Questions:

  1. Can we use JTAG to write the eMMC image (a .wic image with memory partitions - u-boot, kernel, RFS etc) file to eMMC device during production? I understand UUU is the utility to write the images to bootable memory devices but we will not have USB interface so UUU is out of scope. Also we dont mind long wait times to write into eMMC using JTAG during production.
  2. I understand to achieve the above, the eMMC driver must be present on processor memory. I guess this is a common scenario, is it any different in this processor?? Where can i find this eMMC driver?
  3. How and at what stage can we program eFuse bits to enable/disable secure boot and JTAG etc?
  4. Is Lauterbach Trace32 the only JTAG debugger device that could be used with iMX8MP processor?
  5. I am about to go through eMMC FLASH Programming User's Guide (lauterbach.com). Is there any relevant points missing w.r.t iMX8M-Plus processor?

Thanks in Advance for your time.

-Krishna

0 Kudos
11 Replies

2,766 Views
arno_0
Contributor III

What is the command to burn the latest 6.1 release ti emmc (imx8mp)? That is not clear reading IMXLUG Sec 4.2.2.

Looking at this it could be:

  • uuu -b emmc_all imx-boot-imx8mpevk-sd.bin-flash_evk imx-image-full-imx8mpevk.tar.zst
  • uuu -b emmc_all imx-boot-imx8mpevk-sd.bin-flash_evk imx-image-full-imx8mpevk.wic
  • uuu uuu.auto-imx8mpevk
  • uuu LF_v6.1.1_1.0.0_images_IMX8MPEVK.zip

uuu stucks at 1/1 99% SDPS: boot -f imx-boot-imx8mpevk-sd.bin-flash_evk

I seem boards booting into uboot but end up with

## Checking Image at 43800000 ...
Unknown image format!
Run fastboot ...

 

0 Kudos

3,820 Views
timharvey
Contributor IV

We use JTAG to program eMMC on IMX8MM and IMX8MN but have found JTAG to not work on IMX8MP. Note that we have written our own JTAG software to do this using SDHC setup details from U-Boot/Linux. I found a readme at Lauterbach that states in order to start the A35/M7 a valid boot image is required - can NXP please explain more about why JTAG does not function on the IMX8MP as it does on the IMX8

 

3,770 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @timharvey 

Please raise the new ticket for your queries.

Thanks & Regards.

Sanket Parekh

0 Kudos

3,826 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @krishnad 

We can't flash signed u-boot directly with the help of vendor. First you need to flash normal u-boot binary with the help of vendor. After that flashing and boot-up the Kernel and root file system, One can flash the signed u-boot image from board console with the help of below mentioned commands.

# echo 0 > /sys/class/block/mmcblk0boot0/force_ro

# dd if=<u-boot image name> of=/dev/mmcblk0boot0 bs=512 seek=<Starting location of u-boot> && sync

-> For example starting location -> 0x400 -> 1024 -> seek=2

# echo 1 > /sys/class/block/mmcblk0boot0/force_ro

# reboot

Thanks & Regards.

Sanket Parekh

0 Kudos

3,830 Views
krishnad
Contributor II

Any updates on this pls. Thanks.

0 Kudos

3,832 Views
krishnad
Contributor II

Hi, Any updates on this pls. Thanks.

0 Kudos

3,911 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @krishnad,

Thanks for reaching out to us.

1. Can we use JTAG to write the eMMC image (a .wic image with memory partitions - u-boot, kernel, RFS etc) file to eMMC device during production? I understand UUU is the utility to write the images to bootable memory devices but we will not have USB interface so UUU is out of scope. Also we dont mind long wait times to write into eMMC using JTAG during production.

[A]: No, you can't use JTAG to write to eMMC. Flashing eMMC is a very complicated operation and the JTAG command is not enough.

2. I understand to achieve the above, the eMMC driver must be present on processor memory. I guess this is a common scenario, is it any different in this processor?? Where can I find this eMMC driver?

[A]: For the eMMC driver you need to contact to chip vendor.

3. How and at what stage can we program eFuse bits to enable/disable secure boot and JTAG etc?

[A]: You can program eFuse by JTAG. It is in the mass production stage after you fully test the HW/SW and want to secure your system. You can read the security user guide to flash the eFuse.

4. Is Lauterbach Trace32 the only JTAG debugger device that could be used with iMX8MP processor

[A]: There are many available JTAG debuggers like OpenOCD etc.

Also, The official flashing tool is UUU, which depends on USB. If you can't, you can use the dd command to flash your total system on the SD card and boot your system in SD card boot mode. Then you can program the eMMC in your uboot or Linux System.

3,903 Views
krishnad
Contributor II

>>>Also, The official flashing tool is UUU, which depends on USB. If you can't, you can use the dd command to flash your total system on the SD card and boot your system in SD card boot mode. Then you can program the eMMC in your uboot or Linux System.

What is the best way of writing a .wic image to eMMC on SoM during production? Pls note there is no USB interface and no SD card interface.

0 Kudos

3,858 Views
krishnad
Contributor II

Any updates on this pls?

0 Kudos

3,853 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi,

If there is no USB or SD card support, one can ask the chip vendor to provide the processor chips with u-boot binary flashed. And at the production time, processors can be flashed using TFTP.

 

Best Regards,
Dhruvit.

0 Kudos

3,851 Views
krishnad
Contributor II

This is sounding interesting. Can you pls tell more on this.

 

When you say "one can ask the chip vendor to provide the processor chips with u-boot binary flashed", is it like eMMC on the SoM will be flashed with u-boot by the chip vendor??

 

Note: We intend to have a signed u-boot.

0 Kudos