error in flashing additional Image to eMMC

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

error in flashing additional Image to eMMC

3,048 Views
antonio_santagi
Contributor IV

Hello, 

I am using iMX8MM evk.

I am trying flashing Kernel image to eMMC using UUU tool.

I found mentioned UUU can download both u-boot ( aggregated with spl and other fw images ) and Kernel Image.

I tried it and bootloaders were flashed successfully but not the Kernel Image, because of its size .

This is the error I got :

sudo ./uuu -b emmc signed_flash.bin Image_pad_ivt.bin
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.3.154-0-g47ddef5

Success 0 Failure 1


1:2 4/ 7 [image too large for partition ] FB: flash bootloader Image_pad_ivt.bin
1:3 3/ 3 [=================100%=================] SDPV: jump

is uuu -b emmc the right command to use or should I use other script rather than the "emmc" one?

I tried also other option "emmc_all" but I got same error.

My padded image with ivt is a bit larger than 24 Mbytes.

What is wrong ?Should I program to a FAT partition created by u-boot commands ? If so how can this be automated in production?

Tags (1)
0 Kudos
9 Replies

2,688 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Antonio,

  what I ofter used is uuu tool for windows, it is very comvenient to program images to eMMC.  steps below are shared with you :
1. Downloading DEMO images from NXP website.
2. After decompressing DEMO image, you can find a script name uuu.auto.
3. using "uuu uuu.auto" to program image to eMMC
or
4. In example subdirectory, you can also find other script for uuu, for example:
example_kernel_emmc.uuu
example_kernel_nand.uuu
....
At first you should replace image name with yours in the script you want, then run "uuu example_kernel_emmc.uuu" to program images to eMMC.

Hope above information is helpful for you.

Have a nice day!

B.R,

weidong

0 Kudos

2,688 Views
antonio_santagi
Contributor IV

Hi

I tried with Windows uuu release 1.3.134 and following your suggestion I used demo Image for imx8mm evk downloaded from NXP website.

I got similar result I got on Linux, other than now uuu doesn't show an error message.

It sits there and waits for device reappearing after stage 1 but device reappeared already, I could hear it from USB disconnect and reconnect Windows sounds, after downloaded the bootloaders.

uuu example_kernel_emmc.uuu
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.3.134-0-g0b47f4d

Success 0 Failure 0


2:14 1/ 0 [                           ]

it waits forever there stuck. Progress bar does not progress even if waiting for minutes.

I tried also by loading imx-boot-imx8mmddr4evk-nand.bin-flash_ddr4_evk as bootloaders ( instead of _flash.bin in the example_kernel_emmc script )

In the end I cannot use uuu to flash iMX8mm-evk's emmc either in Windows and in Linux.

0 Kudos

2,688 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Antonio,

Attachments are what I am using.

uuu.exe

uuu.auto

example_kernel_emmc.uuu

Linux bsp is L4.14.78

Try it ,please!

Have a nice day!

B.R.

Weidong

0 Kudos

2,688 Views
antonio_santagi
Contributor IV

Hello. I tried and with uuu uuu.auto instead of uuu example_kernel_emmc.uuu,  it works, both on Windows and Linux.

Programmed bootloader and image+rootfs as per uuu.auto file.

Now I have to use my image + rootfs that is signed instead of the fsl-image-validation-imx-imx8mmevk.sdcard.

As far I can see Kernel image is in a separate vfat partition and also in the rootfs under /boot folder.

Questions : 

1) How should I produce an equivalent file of the fsl-image-validation-imx-imx8mmevk.sdcard that includes my signed kernel image and the rootfs ?

2) why the offset at which Bootloader imx-boot-imx8mmevk-sd.bin-flash_evk is 0x57c00 and not 0x33 as described in the user manual of the iMX8MM processor ? I am referring to IVT table paragraph. Does this imx-boot-imx8mmevk-sd.bin-flash_evk file have IVT table ? Does it include all SPL, DDR4 fw, ATF and u-boot ? I Got this point 0x57c00 is the download temporary destination address. Then the file is later written to emmc.

3) Why is it to use  imx-boot-imx8mmevk-sd.bin-flash_evk bootloader instead of imx-boot-imx8mmddr4evk-sd.bin-flash_ddr4_evk ? my evk is with LPDDR4 but I tried using imx-boot-imx8mmddr4evk-sd.bin-flash_ddr4_evk with uuu and process of writing by uuu hangs after step 1, it never completes.

thank you

0 Kudos

2,688 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Antonio,

  The example_kernel_emmc.uuu that I sent to you is what our team is using, and my collegue used it to program i.MX8M Mini EVK( with LPDDR4), and linux BSP is 4.14.78 DEMO image.

(1)You can download the version of DEMO image from our website, then try the script.

(2) If your i.MX8M MINI board is using DDR4, you should change the image names in the script to yours.

At present, the most important thing is to program your board successfully by example_kernel_emmc.uuu.

So for other issues, we will not discuss until the board is successfully programmed.

Have a nice day!

B.R,

Weidong

0 Kudos

2,688 Views
antonio_santagi
Contributor IV

Hi.

I have now tried again example_kernel_emmc.uuu, it worked. 

The file example_kernel_emmc.uuu I used is exactly what you attached , without modifications.

Images are from 4.14.78 repo.

I attach here below what I see at the reboot from emmc.

U-Boot SPL 2018.03-imx_v2018.03_4.14.78_1.0.0_ga+g654088c (Nov 28 2018 - 19:15:)
power_bd71837_init
DDRINFO: start lpddr4 ddr init
DRAM PHY training for 3000MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
DRAM PHY training for 3000MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
DRAM PHY training for 400MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
DRAM PHY training for 100MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from MMC2


U-Boot 2018.03-imx_v2018.03_4.14.78_1.0.0_ga+g654088c (Nov 28 2018 - 19:15:55 +)

CPU: Freescale i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)
CPU: Commercial temperature grade (0C to 95C) at 39C
Reset cause: POR
Model: FSL i.MX8MM EVK board
DRAM: 2 GiB
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x52]
Power supply on USB2
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

Failed (-5)
No panel detected: default to MIPI2HDMI
adv7535_init: Can't find device id=0x3d, on bus 1
Display: MIPI2HDMI (1920x1080)
Video: 1920x1080x24
In: serial
Out: serial
Err: serial

BuildInfo:
- ATF d6451cc
- U-Boot 2018.03-imx_v2018.03_4.14.78_1.0.0_ga+g654088c

switch to partitions #0, OK
mmc1(part 0) is current device
flash target is MMC:1
Net:
Warning: ethernet@30be0000 using MAC address from ROM
eth0: ethernet@30be0000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
u-boot=>

1) I don't understand why at the reboot it tests DDR4 for training, as file selected by your example_kernel_emmc.uuu for bootloader was 

imx-boot-imx8mmevk-sd.bin-flash_evk,  NOT imx-boot-imx8mmddr4evk-sd.bin-flash_ddr4_evk.

If I use  imx-boot-imx8mmddr4evk-sd.bin-flash_ddr4_evk,  uuu programming process stops after step 1 ( it doesn't boot that boot just downloaded ) .

This is same question 3) at my previous post.

2) at the power up after programming by example_kernel_emmc uboot does not load the Image. 

This is because the default Image name and dtb name set on that Uboot env. variables don't match what is loaded to the FAT by example_kernel_emmc_uuu. 

I changed these env variables accordingly and now u-boot loads correctly the Kernel Image programmed. 

With uuuu.auto these changes were not needed as it booted automatically the image at the startup.

But I can set these environment variables on uuu script accordingly. is this correct ?

With my signed bootloader image it uuu example_kernel_emmc still does not complete. After step 1 device reappears as FSL USB download gadget 0500 while I can see with the bootloader from the demo images it reappears as USB download gadget 0221, could this difference be meaningful ?

thank you

0 Kudos

2,688 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Antonio,

>>With uuuu.auto these changes were not needed as it booted automatically the image at the startup.

But I can set these environment variables on uuu script accordingly. is this correct ?

yes, right.

In addtion, you can also do like this according to your product.

---Setting all environments you need in u-boot source code, when u-boot runs, don't need to re-configure environments again.

--Setting evrionments manually.

>>With my signed bootloader image it uuu example_kernel_emmc still does not complete. After step 1 device reappears as FSL USB download gadget 0500 while I can see with the bootloader from the demo images it reappears as USB download gadget 0221, could this difference be meaningful ?

You can try the way:

See contents of example_kernel_emmc.uuu:

---------------

SDP: boot -f imx-boot-imx8mmevk-sd.bin-flash_evk                                        # Load u-boot to DDR memory.
# This command will be run when use SPL
SDPU: write -f imx-boot-imx8mmevk-sd.bin-flash_evk -offset 0x57c00
SDPU: jump
# This command will be run when ROM support stream mode
# SDPS: boot -f _flash.bin

# use uboot burn bootloader to eMMC
# becaue difference chip, offset is difference
# you can use kernel to do that for specific boards
FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_dev}
FB: flash bootloader imx-boot-imx8mmevk-sd.bin-flash_evk                       #use uboot burn bootloader to eMMC
FB: ucmd setenv emmc_cmd mmc partconf ${emmc_dev} 0 1 0;
FB: ucmd if test "${emmc_skip_fb}" != "yes"; then run emmc_cmd; fi
FB: ucmd setenv emmc_cmd mmc bootbus ${emmc_dev} 2 2 1;
FB: ucmd if test "${emmc_skip_fb}" != "yes"; then run emmc_cmd; fi

FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f Image-imx8mmevk.bin                                                      # Load kernal to DDR memeory
FB: ucmd setenv fastboot_buffer ${fdt_addr}
FB: download -f Image-fsl-imx8mm-evk.dtb                                                # Load dtb to DDR memory
FB: ucmd setenv fastboot_buffer ${initrd_addr}
FB: download -f fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot      # Load ramdisk to DDR memeory
#FB: ucmd setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate}
FB: acmd ${kboot} ${loadaddr} ${initrd_addr} ${fdt_addr}

-----------------------------------------

The above command works like this.

uuu starts---->imx-boot-imx8mmevk-sd.bin-flash_evk to DDR memory--->run imx-boot-imx8mmevk-sd.bin-flash_evk in DDR memory---->write imx-boot-imx8mmevk-sd.bin-flash_evk to eMMC---->download Image-imx8mmevk.bin & Image-fsl-imx8mm-evk.dtb to DDR memory ---->download fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot to DDR memory.

Now the following images has been loaded into DDR and running:

---u-boot : imx-boot-imx8mmevk-sd.bin-flash_evk

---dtb: Image-fsl-imx8mm-evk.dtb

---kernel: Image-imx8mmevk.bin

---ramdisk: fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot

And imx-boot-imx8mmevk-sd.bin-flash_evk has been written to eMMC.

Up to now, a small linux system with ramdisk have been successfully run in DDR memory, which is very important. Because the small linux system will perform subsequent program work.

You can continue to read other commands after last line that I listed, those commands are all for writting you formal images( u-boot / dtb / kernel / rootfs) to eMMC.

so if you understand these script commands, you will know how to use the script.

Hope these descriptions are helpful for you!

Have a nice day!

B.R,

Weidong

0 Kudos

2,688 Views
antonio_santagi
Contributor IV

so I can see these two points not solved : 

1) after writing imx-boot-imx8mmevk-sd.bin-flash_evk , why at the reboot does it test DDR4 for training, as file selected by your example_kernel_emmc.uuu for bootloader was 

imx-boot-imx8mmevk-sd.bin-flash_evk,  NOT imx-boot-imx8mmddr4evk-sd.bin-flash_ddr4_evk ?

If I use  imx-boot-imx8mmddr4evk-sd.bin-flash_ddr4_evk,  uuu programming process stops after step 1 ( it doesn't boot that boot just downloaded ) .

 

2) my Bootloaders' image causes example_kernel_emmc process stops after step 1. Since I am recompiling u-boot code taken from uboot-imx - i.MX U-Boot 

it must be something missing on the defconfig to support SDPU/SDPV and uuu USB profile required or because of point 1) .

0 Kudos

2,688 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Antonio,

  we have 2 kinds of i.mx8mm evaluation board, one is with LPDDR4, called i.MX8MM-EVK, the other is with DDR4, called i.MX8MM-EVKB.

(1) i.MX8MM-EVK

  What I used is i.MX8MM-EVK, which supports LPDDR4, so in my uuu script, imx-boot-imx8mmevk-sd.bin-flash_evk is for LPDDR4

(2) i.MX8MM-EVKB

  If your own board is similar to i.MX8MM-EVKB, which supports DDR4, so in your uuu script, imx-boot-imx8mmddr4evk-sd.bin-flash_ddr4_evk should be correct.

(3) As for messages showed by u-boot

whatever u-boot shows messages , LPDDR4 or DDR4, it is not important, the most important thing is that u-boot can boot your board, which means u-boot for your board is no problem, hardware and software are correctly matched. Conversely, u-boot cannot boot your board normally.

Hope above information is helpful for you!

B.R,

Weidong