Boot on eMMC

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

Boot on eMMC

19,998 Views
milo
Contributor II

Hello,

I've tried a lot of things, but I can't boot on eMMC. I've flashed it from u-boot, or from the system (booted from the sdcard). For exemple, I've tried : dd if=rootfs.sdcard of=/dev/mmcblk3

I've also tried to flash only u-boot.imx (with dd and seek=2).

I've tried to write it on /dev/mmcblk3, or mmcblk3boot0 or mmcblk3boot1.

When booting on eMMC (with the boot switch setup given on the Linux User Guide), nothing append. Any idea why ?

Labels (3)
Tags (3)
13 Replies

5,682 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Milo Tenzin,

Which board and BSP are you using? By the way, have you boot up success for SD card? And when you boot up from eMMC, how do you download u-boot , kernel and file system to eMMC?
Have a great day
Dan

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

0 Kudos

5,682 Views
milo
Contributor II

I use an i.MX6 sabresd.

Booting from sdcard works perfectly. Now I'd like to write on eMMC to boot on it and don't use the sdcard after the first boot.

I've downloaded u-boot.imx and put it on mmcblk3boot0 (the eMMC is mmcblk3). Now I can boot on the eMMC. But I can't pass u-boot, because it doesn't find the rest of the system (kernel, rootfs), even if I flash mmcblk3 with an image.sdcard.

0 Kudos

5,682 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Milo Tenzin,

How do you write the u-boot , kernel and file system to the eMMC? Using the dd command or mfgtool? Have you write the kernel and rootfs to eMMC?
Have a great day
Dan

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

0 Kudos

5,682 Views
milo
Contributor II

I use dd from the system booted from the sdcard.

For u-boot :  dd if=uboot.imx of=/dev/mmcblk3boot0 bs=512 seek=2 skip=2   (see my previous messages)

For the system, I've tried :   dd if=core-image-minimal.sdcard of=/dev/mmcblk3   The .sdcard contains all what is needed (it's what I use for the sdcard, and it works well). After, I see mmcbl3p1 (containing zImage et dtb files) and mmcblk3p2 (containing the rootfs). So I'd like to boot on them.

0 Kudos

5,682 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Milo Tenzin,

Here I recommend you to try to use the mfgtool freescale provide to download the images first and then boot up from emmc. To confirm the emmc can work on your board. If any questions you can give reply to me.
Have a great day
Dan

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

0 Kudos

5,682 Views
milo
Contributor II

The eMMC works well : I can use the u-boot that I've placed in mmcblk3boot0, and I can boot using the rootfs in mmcblk3p2 (with bootargs root=/dev/mmcblk3p2). But to boot, I have to download the kernel, and I'd like to use the kernel which is already on the eMMC (but I'm not sure it's on the right place, it's on mmcblk3p1).

0 Kudos

5,682 Views
danmacdonald
Contributor III

Were you successful on this?

0 Kudos

5,682 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Milo,

Have you tried use the mfgtool to download images to the eMMc? Can it boot up success?
Have a great day
Dan

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

0 Kudos

5,682 Views
igorpadykov
NXP Employee
NXP Employee

Hi Milo

suggest to look at attached Linux Guides for various kernels,

I think one can find suitable option.

Best regards

igor

0 Kudos

5,682 Views
igorpadykov
NXP Employee
NXP Employee

Hi Milo

suggest to look at below links, since programming eMMC for boot differs from SD

https://community.freescale.com/thread/306880

Re: i.MX6 and boot from eMMC - not working with MMC/eMMC config

For eMMC boot, the bootloader  should be programmed to the specified boot partition.

MMC partitions are treated effectively as separate block devices on the same MMC card.

Boot partition access howto:

    -To enable write access to /dev/mmcblkXbootY, disable the forced read-only access with:

      echo 0 > /sys/block/mmcblkXbootY/force_ro

    -To re-enable read-only access:

     echo 1 > /sys/block/mmcblkXbootY/force_ro

e.x:

root@freescale ~$ ls /dev/mmc*
/dev/mmcblk0       /dev/mmcblk0boot0  /dev/mmcblk0boot1  /dev/mmcblk0p1
root@freescale ~$ ls /dev/mmc*

/dev/mmcblk0       /dev/mmcblk0boot0  /dev/mmcblk0boot1  /dev/mmcblk0p1

there would be one boot partitions on mx6sl evk board.
   mmcblk0boot0.

after run echo 0 >  /sys/block/mmcblk0boot0/force_ro, then dd cmd can be used to program the bootloader directly.

if one wants to enable eMMC fast boot, the boot_config must be set to 0x08:

echo 8 > /sys/devices/platform/sdhci-esdhc-imx.1/mmc_host/mmc1/mmc1:0001/boot_config

so the process is as follows:

echo 0 > /sys/block/mmcblk0boot0/force_ro

dd if=uboot.bin of=/dev/mmcblk0boot0 bs=512 seek=2 skip=2

echo 1 > /sys/block/mmcblk0boot0/force_ro

echo 8 > /sys/devices/platform/sdhci-esdhc-imx.1/mmc_host/mmc1/mmc1:0001/boot_config

Best regards

igor

5,682 Views
milo
Contributor II

Your answer is so helpful it's almost the correct one. :smileyhappy:

Can you explain what is the fastboot, and why I should enable it ?

I'he booted on the eMMC, but only on u-boot. I've used :

echo 0 > /sys/block/mmcblk3boot0/force_ro

dd if=uboot.imx of=/dev/mmcblk3boot0 bs=512 seek=2 skip=2

I've tried to flash the rest of the system, using :

dd if=rootfs.sdcard of=/dev/mmcblk3

But when booting on u-boot, it doesn't find the system so it can't boot. Any idea of how to proceed ?

0 Kudos

5,682 Views
saurabh206
Senior Contributor III

Hi

Milo

What hardware you are using? Which BSP are you referring?

Freescale provide MFG Tools for each BSP which is easy use.

Thanks

Saurabh

0 Kudos

5,682 Views
milo
Contributor II

I use an i.MX6 sabresd, and images built using Yocto and meta-fsl-arm.

I'd like to deploy image on eMMC from the card itself, either using u-boot or the system (booted from sdcard or stored in RAM) to write on the eMMC and boot on it. Writing on the eMMC from the system, with a command like dd if=rootfs.sdcard of=/dev/mmcblk3 doesn't raise any error, but when booting nothing happens.

0 Kudos