Using eMMC on MCIMX6Q-SDB (i.MX SABRE boards)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using eMMC on MCIMX6Q-SDB (i.MX SABRE boards)

1,396 Views
jpe1313
Contributor II

I've got the MCIMX6Q-SDB evaluation board (imx6qsabresd). Everything is working from the SD Card nicely. Now I need to "embed" it to the eMMC chip and I am unclear on a few things.

In the i.MX Linux User's Guide, Rev. L4.1.15_1.0.0-ga, 03/2016, Section 4.4.1.2 Using eMMC I can see the instructions for the zImage and the .dtb file.

BUT I also want to have the U-boot and the rootfs on in the eMMC chip so I can operate WITHOUT the SDcard.

How do I accomplish this?

Thanks in advance.

Labels (2)
0 Kudos
6 Replies

620 Views
jpe1313
Contributor II

So, I've been trying to get the u-boot for the emmc and I follow all the instructions in the Freescale Yocto Project User's Guide, Rev. 0, 04/2016.  I already have the uboot for the SD card I did that and it worked.  So I try and get the u-boot configuration for the EMMC as in Section 5.5 and it tells me ...

**********************************************************************************

Your build environment has been configured with:

    MACHINE=imx6qsabresd
    SDKMACHINE=i686
    DISTRO=fsl-imx-fb
    EULA=
BSPDIR=
BUILD_DIR=.
amraam@nxp-System-Product-Name:~/fsl-release-bsp/Q6-14.1.15$ echo "UBOOT_CONFIG =  \"emmc\"" >> conf/local.conf
amraam@nxp-System-Product-Name:~/fsl-release-bsp/Q6-14.1.15$ $MACHINE=imx6qsabresd bitbake -c deploy u-boot-imx
=imx6qsabresd: command not found
amraam@nxp-System-Product-Name:~/fsl-release-bsp/Q6-14.1.15$ MACHINE=imx6qsabresd bitbake -c deploy u-boot-imx
ERROR: Unable to parse /home/amraam/fsl-release-bsp/sources/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py
Traceback (most recent call last):
  File "/home/amraam/fsl-release-bsp/sources/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 188, in feeder(lineno=23, s='UBOOT_CONFIG "emmc"', fn='/home/amraam/fsl-release-bsp/Q6-14.1.15/conf/local.conf', statements=[<bb.parse.ast.DataNode object at 0x7fb82c45b990>, <bb.parse.ast.DataNode object at 0x7fb82c45ba50>, <bb.parse.ast.DataNode object at 0x7fb82c45ba10>, <bb.parse.ast.DataNode object at 0x7fb82c45ba90>, <bb.parse.ast.DataNode object at 0x7fb82c45bb10>, <bb.parse.ast.DataNode object at 0x7fb82c45bb50>, <bb.parse.ast.DataNode object at 0x7fb82c45bb90>, <bb.parse.ast.DataNode object at 0x7fb82c45bbd0>, <bb.parse.ast.DataNode object at 0x7fb82c45bc10>, <bb.parse.ast.DataNode object at 0x7fb82c45bc50>, <bb.parse.ast.DataNode object at 0x7fb82c45bc90>, <bb.parse.ast.DataNode object at 0x7fb82c45bd10>, <bb.parse.ast.DataNode object at 0x7fb82c45bd50>]):
     
    >    raise ParseError("unparsed line: '%s'" % s, fn, lineno);
     
ParseError: ParseError at /home/amraam/fsl-release-bsp/Q6-14.1.15/conf/local.conf:23: unparsed line: 'UBOOT_CONFIG "emmc"'

amraam@nxp-System-Product-Name:~/fsl-release-bsp/Q6-14.1.15$ cat conf/local.conf
MACHINE ??= 'imx6qsabresd'
DISTRO ?= 'fsl-imx-fb'
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"
UBOOT_CONFIG "emmc"
amraam@nxp-System-Product-Name:~/fsl-release-bsp/Q6-14.1.15$ MACHINE=imx6qsabresd bitbake -c deploy u-boot-imx
WARNING: Unable to get checksum for linux-toradex SRC_URI entry defconfig: file could not be found  | ETA:  00:00:01
Parsing recipes: 100% |#############################################################################| Time: 00:01:30
Parsing of 2259 .bb files complete (0 cached, 2259 parsed). 2825 targets, 449 skipped, 5 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.28.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "imx6qsabresd"
DISTRO            = "fsl-imx-fb"
DISTRO_VERSION    = "4.1.15-1.2.0"
TUNE_FEATURES     = "arm armv7a vfp neon callconvention-hard cortexa9"
TARGET_FPU        = "vfp-neon"
meta              
meta-yocto        = "HEAD:dd0ba9ea4a11ab15348d4fe3574e4b28784db82f"
meta-oe           
meta-multimedia   = "HEAD:ad6133a2e95f4b83b6b3ea413598e2cd5fb3fd90"
meta-fsl-arm      = "HEAD:35b8b9bd9863de208ab60e33b55f10ee43e2619b"
meta-fsl-arm-extra = "HEAD:e200df91b70da254461c59082ddd5db0a3c415a2"
meta-fsl-demos    = "HEAD:2231e946e7a94d096394f2b2477e8184c9bbde7b"
meta-bsp          
meta-sdk          = "HEAD:dfbc90ee74624ce3be636c8bd2a47114fa2b71aa"
meta-browser      = "HEAD:b6d46d69a261fe6bd7c1e9811dc2a9bbd0b79aeb"
meta-gnome        
meta-networking   
meta-python       
meta-ruby         
meta-filesystems  
meta-xfce         = "HEAD:ad6133a2e95f4b83b6b3ea413598e2cd5fb3fd90"
meta-qt5          = "HEAD:d5536e34ec985c82b621448ab4325e5cbba38560"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: Failed to fetch URL ftp://invisible-island.net/ncurses/current/ncurses-5.9-20150329.tgz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://tukaani.org/xz/xz-5.2.1.tar.gz, attempting MIRRORS if available
NOTE: Tasks Summary: Attempted 241 tasks of which 0 didn't need to be rerun and all succeeded.

Summary: There were 3 WARNING messages shown.

**********************************************************************************

It says ALL THE TASKS DID NOT NEED TO BE RERUN so the deploy/ ... images directory IS EMPTY !!

I have even made a new account on my machine and this happens.  How do I get a u-boot image for EMMC?

WHat am I missing.

Thanks in advance.

0 Kudos

620 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Janet Estabridis,

If you are using the i.MX6Q SABRE Board the easiest way to load an image to the board’s eMMC would be using the Manufacturing Tools for the BSP Release you are using.

You may download the Manufacturing tool for BSP L4.1.15_1.1.0 from this link (please note that you may need to login in order to download this file).

https://www.nxp.com/webapp/Download?colCode=IMX6_L4.1.15_1.1.0_MFG_TOOL&appType=license&location=nul...

There are some profiles already set up in order to load the Linux image to the eMMC but you can also edit the profiles in order to make changes if needed.

Regards,

0 Kudos

620 Views
jpe1313
Contributor II

Gusarambula or Anyone,

Thanks for the link. I actually had that file but when I looked at all of it I just wasn't sure how to proceed.

On our final board we are limited on space and I was hoping to find a way WITHOUT using the MfgTool V2. That way we would not have to have the USB to GO circuitry. We ARE basing our design off the MCIMX6Q-SDB so if I can load the eMMC on the evaluation board then I can do the same for our custom board.

So, I've scanned/read all the documents and looked and unzipped the .tar.gz file on my Windows machine. I feel VERY LOST so I have some questions.

1. Can I use the zImage and my rootfs that were generated with Freescale Yocto "core-image-base" "imx6qsabresd" "fsl-imx-fb" and work on the SD card?

It appears I need to have a different U-boot configuration built for the EMMC (according to page 9 of Freescale Yocto Project User's Guide, Rev. 0, 04/2016). Can you confirm that?

2. The Quick Start Guide - cfg.ini

a) what to put for "chip = "

"MX6Q" ?

b) "[LIST] name =" what do I use ??

So, in the "uxl2.xml" with rootfs Profiles/Linux/OS Firmware I see "name="eMMC" but is that for the i.MX6 QUAD on the SABRE development board?

It looks like in the "firmware" directory there are only two *.imx file for emmc, "u-boot-imx6sxsabre_emmc.imx" and "u-boot-imx6ul14x14ddr3arm2_emmc.imx."

 

3. The Quick Start Guide "How To Burn Your Own Image with Manufacturing Tool"

a) "Generate a special U-Boot image and kernel image for MFG tool"

Where are their instructions for that? And do I really need to do that if I'm using the evaluation board?

b) "Generate a normal U-Boot image and kernel image, maybe customizing rootfs..."

So, I have U-Boot and my Kernel and my rootfs for the SD-card can I use those images?

0 Kudos

620 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Janet Estabridis,

Regarding your questions:

1) Since the boot addresses change a bit between SD and eMMC boot, you would need to have a u-boot built with the eMMC configuration in mind. As you mentioned, you would need to setup the local.conf file to select eMMC uboot configuration.

If you hadn’t done so previously I would recommend trying the steps you already used with the updated uboot, as this may be the cause of the problems to boot from eMMC.

 

2) You will see that there are some VBScript files that configure the manufacturing tool. You may open these as texts for reference. For example, for the Yocto i.MX6Q eMMC you would use mfgtool2-yocto-mx-sabresd-emmc.vbs, which contains.

 

3) I don’t think you need to do a different image since you are using the evaluation board. You may use the images you have for the SD card. The only critical difference is the bootloader, which is slightly different depending on the medium from which it will be run.

I hope this helps!

Regards,

0 Kudos

620 Views
jpe1313
Contributor II

Thanks,

That helps a lot.  I will be getting back to this task next week.

v/r,

Janet

0 Kudos

620 Views
jpe1313
Contributor II

So, I thought I found a way to get the full SD card image to the eMMC. Here are the steps I have taken and my problem. Any help would be greatly appreciated.

1. Clean up the environment variables.

U-Boot > env default -f -a

U-Boot > save

U-Boot > reset

2. Query the information about the eMMC chip.

U-Boot > mmc dev 2 0

switch to partitions #0, OK

mmc2 (part 0) is current device

U-Boot > mmcinfo

Device: FSL_SDHC

Manufacture ID: 45

OEM: 100

Name: SEM08

Tran Speed: 50000000

Rd Block Len: 512

NNC Version 4.4.1

High Capacity: Yes

Capacity 7.4 GiB

Bus Width: 8-bit

Erase Group Size: 512 Bytes

HC WP Group Size: 16MiB

User Capacity: 7.4 GiB WRREL

Boot Capacity: 1MiB ENH

RPMB Capacity: 128 KiB ENH

3. Since I have a CFAST card on the SATA interface I copied the SD Card image to the CFAST card so I could boot into Linux and perform a "dd" command to the EMMC memory.

root@imx6qsabresd:~# cd cfast

root@imx6qsabresd:~/cfast# ls -l *.sdc

-rwxr-xr-x 1 root root 3965190144 Sep 7 2016 nxpimage.sdc

root@imx6qsabresd:~/cfast# dd if=nxpimage.sdc of=/dev/mccblk2 bs=512K

takes a long time ....

7563+0 records in

7563+0 records out

root@imx6qsabresd:~/cfast# sync

NOT SURE I NEED TO "sync"

4. Power down, remove the SD Card, change the DIP switches on SW6 for EMMC boot (p. 20 i.MX Linux User's Guide, Rev. L4.1.15_1.0.0+ga, 03/2016.

5. Power up ---> I DON'T SEE ANY MESSAGE !!!

I expected to see U-Boot and I knew that I'd need to change things to actually boot to Linux.

ANY ONE HAVE SOME SUGGESTIONS ?? THANKS IN ADVANCE

0 Kudos