Flashing & booting imx6ull's u-boot from eMMC

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

Flashing & booting imx6ull's u-boot from eMMC

Jump to solution
1,547 Views
titusstalin
Contributor V

Hi,

I have im6ull board and using latest yocto based image, would like to upgrade eMMC uboot from u-boot itself. One time I have tried to update the uboot in eMMC from Linux using ''dd' command and it worked but next time it didn't work . But I am in need of to upgrade or flash fresh uboot image into eMMC from uboot itself.

Like, boot from SD card and stop at uboot and then write uboot binary into eMMC.

 

Issue1: Now I am unable to boot from eMMC, but SD card boot still works.

Issue2: Tried to flash uboot into emmc using linux and didn't work

Issue3: Tried to flash uboot into emmc using uboot (SD card boot mode) and didn't work

 

Able to erase eMMC at uboot:

=> mmc dev 1 1
=> mmc erase 0 0x4000

Flashing u-boot into emmc in u-boot (NOT WORKING)

=> setenv ipaddr 192.168.0.192;setenv serverip 192.168.0.106;tftpboot 0x80800000 u-boot-emmc-2020.04-r0.imx
=> mmc dev 1 1
=> mmc write 0x80800000 0x2 0x700       => uboot size=0xccc00/512 => 0x666

Flashing u-boot into emmc in Linux (NOT WORKING)

echo 0 > /sys/block/mmcblk1boot0/force_ro
//dd if=/u-boot-emmc-2020.04-r0.imx of=/dev/mmcblk1boot0 bs=512 seek=2; sync -> 1st method
dd if=/u-boot-emmc-2020.04-r0.imx of=/dev/mmcblk1boot0 bs=1k seek=1;sync -> 2nd method
mmc bootpart enable 1 1 /dev/mmcblk1

Flashing uboot using 'uuu' tool:

sudo ./uuu -b emmc u-boot-emmc-2020.04-r0.imx

flashing was successful, but still it got failed to boot uboot from eMMC.

 

sudo ./uuu u-boot-emmc-2020.04-r0.imx -> This is loading uboot into RAM

 

Actually I just used "mmc partinfo" command in uboot like below, may be these commands would have cause any issues and unable to recover it ?

mmc partconf 1 1 1 0

mmc partconf 1 1 0 0


eMMC is in dev1.

 

u-boot version is 2020.0-r0

=> mmc list
FSL_SDHC: 0
FSL_SDHC: 1 (eMMC)
=>

PS: I have not done any physical changes to that imx6 dev board. It is not custom board, imx6 dev board.

Log:

root@imx-6ull:~#
root@imx-6ull:~# mmc extcsd read /dev/mmcblk1 | grep -e BOOT_INFO -e BOOT_SIZE_MULTI -e PARTITION_CONFIG -e BOOT_BUS_CONDITIONS
Boot Information [BOOT_INFO: 0x07]
Boot partition size [BOOT_SIZE_MULTI: 0x20]
Boot configuration bytes [PARTITION_CONFIG: 0x48]
Boot bus Conditions [BOOT_BUS_CONDITIONS: 0x0a]
root@imx-6ull:~#
root@imx-6ull:~#
root@imx-6ull:~#
root@imx-6ull:~# echo 0 > /sys/block/mmcblk1boot0/force_ro
root@imx-6ull:~#
root@imx-6ull:~# dd if=/u-boot-emmc-2020.04-r0.imx of=/dev/mmcblk1boot0 bs=512 seek=2; sync
1638+0 records in
1638+0 records out
838656 bytes (839 kB, 819 KiB) copied, 0.286735 s, 2.9 MB/s
root@imx-6ull:~# echo 1 > /sys/block/mmcblk1boot0/force_ro
root@imx-6ull:~# mmc bootpart enable 1 1 /dev/mmcblk1
root@imx-6ull:~# mmc bootbus set single_hs x1 x8 /dev/mmcblk1
Changing ext_csd[BOOT_BUS_CONDITIONS] from 0x0a to 0x0a
root@imx-6ull:~#
root@imx-6ull:~#
root@imx-6ull:~# mmc extcsd read /dev/mmcblk1 | grep -e BOOT_INFO -e BOOT_SIZE_MULTI -e PARTITION_CONFIG -e BOOT_BUS_CONDITIONS
Boot Information [BOOT_INFO: 0x07]
Boot partition size [BOOT_SIZE_MULTI: 0x20]
Boot configuration bytes [PARTITION_CONFIG: 0x48]
Boot bus Conditions [BOOT_BUS_CONDITIONS: 0x0a]
root@imx-6ull:~#

 

Referred to this link but not helpful

https://community.nxp.com/t5/i-MX-Processors/How-to-download-u-boot-imx-to-eMMC-by-using-u-boot/m-p/...

Labels (3)
Tags (1)
0 Kudos
Reply
1 Solution
1,521 Views
titusstalin
Contributor V

with this 'mmc bootbus 1 0 0 1' programming in uboot, am able to boot uboot from eMMC.

Erasing eMMC's uboot in Uboot
=========================
mmc dev 1 1
mmc erase 0 0x4000

Flash new u-boot.imx file from Uboot 
=============================
setenv ipaddr 192.168.0.192;setenv serverip 192.168.0.106;tftpboot 0x80800000 u-boot-emmc-2020.04-r0.imx
mmc dev 1 1
mmc write 0x80800000 0x2 0x667           

PS: uboot size =0xccc00 = required blocks 0xccc00/512 => 0x666

View solution in original post

0 Kudos
Reply
1 Reply
1,522 Views
titusstalin
Contributor V

with this 'mmc bootbus 1 0 0 1' programming in uboot, am able to boot uboot from eMMC.

Erasing eMMC's uboot in Uboot
=========================
mmc dev 1 1
mmc erase 0 0x4000

Flash new u-boot.imx file from Uboot 
=============================
setenv ipaddr 192.168.0.192;setenv serverip 192.168.0.106;tftpboot 0x80800000 u-boot-emmc-2020.04-r0.imx
mmc dev 1 1
mmc write 0x80800000 0x2 0x667           

PS: uboot size =0xccc00 = required blocks 0xccc00/512 => 0x666

0 Kudos
Reply