[Yocto] Install image to eMMC from SD card

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

[Yocto] Install image to eMMC from SD card

319 Views
petertseng
Contributor IV

Hi

I'm currently using i.MX Linux Yocto BSP (mickledore-6.1.22-2.0.0)

I can successfully generate the rootfs.wic file and deploy it to the SD card.

However, my customers iMX8MP board can only deploy image to the eMMC through the SD card.

How to use commands to install u-boot, kernel and rootfs on eMMC after booting from SD card?

Best Regards
Peter 

0 Kudos
4 Replies

301 Views
Harvey021
NXP TechSupport
NXP TechSupport

Hi,

You can refer to this - https://community.nxp.com/t5/i-MX-Processors/How-to-flash-eMMC-from-an-SDCard-on-i-MX6Q/m-p/880341

and the chapter<Booting Linux OS> from IMX_LINUX_USERS_GUIDE 

 

Regards

Harvey

0 Kudos

243 Views
petertseng
Contributor IV

Hi Harvey,

I try to flash u-boot image to eMMC using.

$ umount -f /dev/mmcblk1p1
$ umount -f /dev/mmcblk1p2

## Erase the previous partition table
$ wipefs --all /dev/mmcblk1

## Erase u-boot environment variables
$ dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=1
$ sync

## Flash u-boot image
$ dd if=imx-boot-imx8mpevk-sd.bin-flash_evk of=/dev/mmcblk1 bs=1k seek=32 conv=fsync
$ sync

 

But the u-boot image doesn't seem to be written to eMMC.

Because the old u-boot version is still displayed.

 

 

Best Regards
Peter 

0 Kudos

234 Views
Harvey021
NXP TechSupport
NXP TechSupport

Please refer to the link: How-to-uboot-flash-in-emmc-using-dd-command 

 

Regards

Harvey

0 Kudos

223 Views
petertseng
Contributor IV

Hi Harvey,

So I should burn u-boot to /dev/mmcblk1boot0 ?

## Erase u-boot environment variables
$ echo 0 > /sys/block/mmcblk1boot0/force_ro
$ dd if=/dev/zero of=/dev/mmcblk1boot0 bs=1M count=1
$ sync
$ echo 1 > /sys/block/mmcblk1boot0/force_ro

## Flash u-boot image
$ echo 0 > /sys/block/mmcblk1boot0/force_ro
$ dd if=imx-boot-imx8mpevk-sd.bin-flash_evk of=/dev/mmcblk1boot0
$ sync
$ echo 1 > /sys/block/mmcblk1boot0/force_ro

 

Best Regards
Peter 

0 Kudos