i.MX8M Nano Update Bootloader Binary from Kernel using DD Command

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

i.MX8M Nano Update Bootloader Binary from Kernel using DD Command

125 Views
Nethaji1510
Contributor II

Hello, 

We were able to flash the uboot binary using the uuu tool for We were the IMX8M Nano board. But we are unable to do it from the kernel using the dd command.

$ dd if=uboot.bin of=/dev/mmcblk2 bs=1k seek=32

$ sync

 

Any corresponding offset or partition in for bootloader flashing? Please share the UUU tool bootloader offset or command for flashing the bootloader. 

Kindly help us.

0 Kudos
Reply
4 Replies

101 Views
Nethaji1510
Contributor II
Hello,
we are able to flash the uboot binary from the kernel using the below dd command,
 
$ echo 0 | tee /sys/block/mmcblk2boot0/force_ro
 
$ dd if=flash.bin of=/dev/mmcblk2boot0 bs=1k seek=0 conv=fsync
 
$ echo 1 | tee /sys/block/mmcblk2boot0/force_ro
 
It is working fine.
 
 
In our board have two boot partition like,
/dev/mmcblk2boot0
/dev/mmcblk2boot1
 
But the UUU tool flashes the bootloader in this /dev/mmcblk2boot0 partition only. Any procedure available for flashing the bootloader in both the /dev/mmcblk2boot0 and /dev/mmcblk2boot1 partitions in the UUU tool?
 
Updating U-Boot with an mmcblk2boot0/mmcblk2boot1 strategy is available?. If available, please share with me the procedure for this.
 
Query: Currently, the bootloader boots from the /dev/mmcblk2boot0 partition. This bootloader may be corrupted; how do I recover the board from the /dev/mmcblk2boot1 partition?
0 Kudos
Reply

63 Views
roke
Contributor II

You can check the following link of i.MX8QXP, which has the same boot as i.MX8MN does.

 

https://community.nxp.com/t5/NXP-Tech-Blog/i-MX8QXP-eMMC-Secondary-Boot/ba-p/1257704#M45

 

0 Kudos
Reply

78 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Glad to hear that you have managed to do so, regarding your other question, it is indeed possible to do so, you may use a custom script for this:
https://github.com/nxp-imx/mfgtools/wiki/Sample-scripts#burn-yocto-image-to-emmc-by-linux-kernel

In the script above you may change the following:

FBK: ucmd mmc=`cat /tmp/mmcdev`; echo 0 > /sys/block/mmcblk${mmc}boot1/force_ro
FBK: ucp  _flash.bin t:/tmp
FBK: ucmd mmc=`cat /tmp/mmcdev`; dd if=/tmp/_flash.bin of=/dev/mmc${mmc}boot1 bs=1K seek=32
FBK: ucmd mmc=`cat /tmp/mmcdev`; echo 1 > /sys/block/mmcblk${mmc}boot1/force_ro

 
As you may have notice is the same procedure you did on the kernel.

Best regards/Saludos,
Aldo.

0 Kudos
Reply

62 Views
roke
Contributor II

AldoG,

 

Do you know about the i.MX8MN boot offset at emmc boot partition is zero?

 

 

0 Kudos
Reply