Unable to boot from emmc

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

Unable to boot from emmc

4,029 Views
stimpy
Contributor III

Hi,

My attempts to boot from internal emmc were in vain. I tried this on a custom board based on the evaluation board 6sx sabre sdb (design files). In our layout we want to use the emmc flash on the periphery SD4 (equivalent to having U4 populated on page 9 in schematic sheets).

Booting from a micro sd card (periphery on SD3) works. 

What have I tried?

  1. I have tried with MFG Tool from IMX6_L5.1_2.1.0_MFG_TOOL
    1. I modified the config files according to the attached mfgTool-files.7z . The files in the firmware directory should be the default ones provided by the packages.
    2. Additionally I copied the zImage, the devicetree, the rootfs.tar.bz2 and the u-boot.imx from yocto's deploy folder (after bitbake core-image-sato) to the Profiles/custom/OS Firmware/files directory.
    3. Unfortunately after displaying Jumping to OS image in the tool the process stops with displaying the message 'No Device Connected'. On device's UART one can see the messages, where I don't understand why it waits for mmc1.
      UTP: Waiting for device to appear
      Starting UTP
      uuc 0.5 [built Oct 31 2015 21:15:01]
      UTP: Waiting for device to appear
      mmc1: Timeout waiting for hardware interrupt.
      mmc1: Timeout waiting for hardware interrupt.
    4. After a lot of time (several minuts) and repetition of last line the last outputs on UART are:
      mmc1: Timeout waiting for hardware interrupt.
      mmc3: BKOPS_EN bit is not set
      mmc3: switch to highspeed failed
      mmc3: new MMC card at address 0001
      mmcblk3: mmc3:0001 P1XXXX 3.60 GiB
      mmcblk3boot0: mmc3:0001 P1XXXX partition 1 16.0 MiB
      mmcblk3boot1: mmc3:0001 P1XXXX partition 2 16.0 MiB
      mmcblk3rpmb: mmc3:0001 P1XXXX partition 3 128 KiB
      mmcblk3: p1 p2
      mmcblk3boot1: unknown partition table
      mmcblk3boot0: unknown partition table
      Attached you can find MfgTool.log an the mfg_output.log. 
  2. Flashing with linux:
    1. I tried to copy the whole *.sdcard image to emmc using dd. 
    2. Pulled BT_CFG11 pin to high-level
    3. Devices just doesn't boor nor prints out anything on UART
  3. Flashing with u-boot
    1. Similar to previous point. Flashing *.sdcard (commands used attached in uboot_cmds.txt).
    2. Pulled BT_CFG11 pin to high-level
    3. Flashing doesn't work
    4. What did work is to boot partially from internal emmc by changing 'mmcroot' to
      /dev/mmcblk3p2 rootwait rw

So what do I have to change?

Many thanks in advance,

Dani

Labels (1)
Tags (2)
0 Kudos
11 Replies

2,838 Views
igorpadykov
NXP Employee
NXP Employee

Hi stimpy

looking at logs, there may be many reasons for misbehaviour, including:

- memory issues

one can run ddr test https://community.nxp.com/docs/DOC-105652 

and rebuild image and mfg tool firmware with new ddr calibartion settings

- emmc signal integrity issues

one can check emmc layout and its signals with oscilloscope

For test may be suitable baremetal sdk, zip can be found on  https://community.nxp.com/thread/432859
adapt it for i.MX6SX and perform simple read/write test

May be recommended first try with linux, it is much simpler (use L3.14.52 GA as L5.1_2.1.0 uses this kernel)

i.MX 6 Series Manufacturing Toolkit for Linux 3.14.52 Release

https://www.nxp.com/webapp/Download?colCode=IMX6_L3.14.52_MFG_TOOL&appType=license&location=null&Par... 

Also what bsp was used when you generated new images, please use nxp official from codeaurora.org repository:

linux-imx - i.MX Linux kernel 

uboot-imx - i.MX U-Boot 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,838 Views
stimpy
Contributor III

Hi,

Just to clarify my starting post: I don't understand why during flashing with MfgTool the system keeps looking fro mmc1 instead of mmc3.

I did run a DDR test and it did run up to 591 MHz successfully.

In order to boot from eMMC the BT_CFG need to be set correctly. Here I was a bit mislead. Setting BT_CFG1[3] and BT_CFG2[7,6,3,2] to high did the trick. At least like that I am able to start u-boot from eMMC.

Now however I cannot boot entirely:

  1. Using MfgTools I am getting stuck at the same point.  mmc1 is timeouting even though I don't want to have anything done with that device.
  2. When flashing with u-boot I get complaints about it not being able to find the correct device trees. Using ls mmc 2:1 I can see the uImage (at least the files name is uImage, the size is equivalent to the zImage one) however no dts file. Manually copying the two files does the trick there. I am just surprised and wondering how this can be changed.

Thanks in advance for any suggestions

Dani

0 Kudos

2,838 Views
stimpy
Contributor III

I made a new attempt and build this time the mfg tool files too using yocto (bitbake fsl-image-mfgtool-initramfs). Instead of using the firmware files provided by L3.14.52_1.1.0_ga-mfg tools (no clue whats the different to the L4 and L5 ones) I used this time by own ones:

  • u-boot.imx-mfgtool
  • zImage
  • dtb file

It stalls just after Jumping to OS where the program is showing No device connected. The output is attached (mfgtool_output.log). The last few lines:

mmcblk3boot0: mmc3:0001 P1XXXX partition 1 16.0 MiB
snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 00:15:27 UTC (927)
usb_otg1_vbus: disabling
PSU-5V0: disabling
mmcblk3boot1: mmc3:0001 P1XXXX partition 2 16.0 MiB
can-en: disabling
can-stby: disabling
Freeing unused kernel memory: 1024K
mmcblk3rpmb: mmc3:0001 P1XXXX partition 3 128 KiB
mmcblk3: p1 p2
Starting UTP
uuc 0.5 [built Dec 3 2015 08:26:46]
UTP: Waiting for device to appear

It does find the mmc3 but I have to clue what it is waiting for. UTP?

I even tried with my initramfs file (fsl-image-mfgtool-initramfs-imx6sxsabresd.cpio.gz.u-boot) but somehow this file has a size of 130MB! and it didn't work at all.

0 Kudos

2,838 Views
igorpadykov
NXP Employee
NXP Employee

may be this emmc is broken, could you try with brand new emmc

or try to write/read from it using uboot commands mmc dev, mmcinfo,

mmc write. You can also take some working emmc, for example from i.MX6Q Sabre SD

board and place it on custom board.

~igor

0 Kudos

2,838 Views
igorpadykov
NXP Employee
NXP Employee

>It does find the mmc3 but I have to clue what it is waiting for. UTP?

"waiting for. UTP" means that there is no communication channel through usb.

Is board working fine when programming with mfg tool other devices, for example sd?

Also one can check if mfg tool is starting correctly: just click mfgtool2-yocto-mx-sabresd-sdcard-sd4.vbs

script and tool will start with all necessary parameters.

regarding "mfgtool_output.log.zip" - I noticed that you used Linux version 4.9.88 for it.

Note mfg tool package is linked to appropriate linux kernel and files in L3.14.52_1.1.0_ga-mfg tools

can not be replaced with files compiled with L4.9.88. Please look at link below

and use Linux version 4.9.88 Mfg Tool for files compiled with L4.9.88:

pastedImage_2.jpg

i.MX Software|NXP 

the same is valid for Android- for example latest Android O8.0.0_1.0.0 is based on L4.9.11 GA

according to Release Notes included in   Android O8.0.0_1.0.0 BSP Documentation

and only L4.9.11 GA should be used for compilation new mfg tool firmware.

pastedImage_1.jpg

2,838 Views
stimpy
Contributor III

Hi igorpadykov,

Thank you for your reply.

Regarding your statement may be this emmc is broken:
I am able to copy data to emmc with u-boot and then I was able to boot from it. Furthermore when deleting parts of emmc memory ( something like: mmc dev 2; mmc erase 0 1000 ) I was not able to boot anymore. From this I would say the emmc memory should work.

Thank for the hint. I switch to mfgtools of L4.9.88:

  • Using the package as is seems to stall at partitioning and the message
    “wait for /dev/mmcblk3 appear
  • For the files in firmware and in files directory I was using the files generated with yocto (with the exception from the initramfs file). The output on console is attached (mfg_output_yoctofiles.log) as well as the program output (mfg_call_yoctofiles.log). I am getting a slight step further here:
    Start UTP at ci_hdrc.0
    uuc /dev/utp
    uuc 0.5 [built May 1 2018 14:29:24]
    UTP: Waiting for /dev/utp to appear
    UTP: file/device node /dev/utp already exists
    cpu_id is 0
    configfs-gadget gadget: high-speed config #1: c
    I have noticed that the available RAM is shown to be 1GB however it is actually half of it. In the ordinary u-boot used when flashing to and booting from SD cards this is fixed.
    Furthermore it recognizes the internal mmc:
    mmc3: SDHCI controller on 219c000.usdhc [219c000.usdhc] using ADMA
    mmc3: mmc_select_hs200 failed, error -74
    mmc3: new MMC card at address 0001
    mmcblk3: mmc3:0001 P1XXXX 3.60 GiB
    mmcblk3boot0: mmc3:0001 P1XXXX partition 1 16.0 MiB
    mmcblk3boot1: mmc3:0001 P1XXXX partition 2 16.0 MiB
    mmcblk3rpmb: mmc3:0001 P1XXXX partition 3 128 KiB
  • Using my huge initramfs file doesn't produce any output on the console. It has the size of about 130 MB while I expected a couple of MBs. Is this something that needs to be worked on?
  • When using the provided files in firmware folder however with my custom device tree and using own generated files in files folder the output looks very similar (mfg_call_provided.log and mfg_output_provided.log).
  • Using the provided device tree looks similar again.
0 Kudos

2,838 Views
igorpadykov
NXP Employee
NXP Employee

>For the files in firmware and in files directory I was using the files generated with yocto

>(with the exception from the initramfs file).

file fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot should be also replaced with new

one, please use attached Yocto Guide sect.6.2 Manufacturing Tool, MFGTool, with uboot changes

specific for custom board (  uboot/../mx6sxsabresd/imximage.cfg - changes new ddr calibration settings found

from ddr test, ddr size in uboot/include/configs/mx6sxsabresd.h :   #define PHYS_SDRAM_SIZE            SZ_1G )

~igor

0 Kudos

2,838 Views
stimpy
Contributor III

How can I build the fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot on rocko?

Using the command bitbake linux-mfgtool brings to the errors explained here: https://lists.yoctoproject.org/pipermail/meta-freescale/2018-June/022766.html 

Uncommenting in the file meta-freescale/recipes-kernel/linux/linux-mfgtool.inc the line containing e.data.setVar("MLPREFIX", "mfgtool-") doesn't help and leads to the follow-up: https://lists.yoctoproject.org/pipermail/meta-freescale/2018-June/022770.html

Creating a directory meta-mylayer/recipes-kernel/linux/mfgtool-linux-imx and copying file defconfig from meta-freescale/recipes-kernel/linux/  didn't help.

0 Kudos

2,838 Views
igorpadykov
NXP Employee
NXP Employee

what bsp used in the case

difference between Yocto Community BSP and Freescale BSP Release 

community bsps may not work well with mfg tool, for nxp releases it is explained

in Yocto Guide sect.6.2.

Best regards
igor

0 Kudos

2,838 Views
stimpy
Contributor III

Hi igor,

I find it difficult to follow. Could you be a bit more specific please? I did read this chapter 6.2 from the Yocto Guide. As stated in my 3rd post I did run the command bitbake fsl-image-mfgtool-initramfs . I am able to build a u-boot-mfgtool file as well as a u-boot-imx6sxsabresd-mfgtool.imx-mfgtool . However when using those two files as firmware with MfgTool it doesn't work: At a certain moment the tool return saying it did it successfully however on UART no text was transmitted. What I have noticed is that the later mentioned file is huge (130 MB) in comparison to the provided file with a slightly different name fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot (9 MB). Don't you think this 130 MB is far too big?

I am trying to follow your advice from October 19th or at least what I am understanding from it: Adding file meta-mylayer/recipes-fsl/images/fsl-image-mfgtool-initramfs%.bbappend:

FILESEXTRAPATHS_prepend := "${THISDIR}/:"

SRC_URI += "                        \
            file://1GBto512MB.patch \
           "‍‍‍‍‍‍‍‍‍

Also adding the patch file to the same directory. However bitbake fails saying:

ERROR: fsl-image-mfgtool-initramfs-1.0-r0 do_populate_lic: QA Issue: fsl-image-mfgtool-initramfs: Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM) [license-checksum]
ERROR: fsl-image-mfgtool-initramfs-1.0-r0 do_populate_lic: Fatal QA errors found, failing task.
ERROR: fsl-image-mfgtool-initramfs-1.0-r0 do_populate_lic: Function failed: populate_lic_qa_checksum
ERROR: Logfile of failure stored in: /opt/yocto/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/temp/log.do_populate_lic.49965
ERROR: Task (/opt/yocto/sources/meta-freescale/recipes-fsl/images/fsl-image-mfgtool-initramfs.bb:do_populate_lic) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3635 tasks of which 3630 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory

Summary: 1 task failed:
 /opt/yocto/sources/meta-freescale/recipes-fsl/images/fsl-image-mfgtool-initramfs.bb:do_populate_lic
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.

I have no clue how to solve this issue.

cheers

0 Kudos

2,838 Views
igorpadykov
NXP Employee
NXP Employee

Hi Dani

for mfg tool customization one can also check

4.4. Installing a Development Build using USB — Working with the Rigado Vesta Gateway v1.0.16 docume... 

and nxp has special service for helping with customizations:

NXP Professional Services|NXP 

Best regards
igor

0 Kudos