Writing eMMC firmware boot image from Linux on IMX8MQ-EVK

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Writing eMMC firmware boot image from Linux on IMX8MQ-EVK

ソリューションへジャンプ
3,330件の閲覧回数
cminyard
Contributor II

I have an iMX8MQuadEVK board.  I can use mkimage to build an image and burn it to eMMC with uuu.  I can boot an ARM systemready SD card without issue.

I haven't found any instructions to write the eMMC firmware image from Linux.

On the target I have /dev/mmcblk0, which I assume is the eMMC.  There are three partitions, boot0, boot1, and rpmb.  I know what rpmb is.  How do I write the image to these devices?  Can you make it switch between boot0 and boot1?

Thanks.

0 件の賞賛
返信
1 解決策
3,305件の閲覧回数
cminyard
Contributor II

I was able to figure this out by trial and error.  The boot image that you normally write with uuu can be written on the target from Linux using:

# echo 0 > /sys/block/mmcblk0boot0/force_ro
# dd if=<image> of=/dev/mmcblk0boot0 bs=1024 seek=33 status=progress
# sync
# echo 1 > /sys/block/mmcblk0boot0/force_ro

So the boot loader starts 33K from the beginning of the boot0 partition.

It would be nice to know if you could use the boot1 partition as a backup partition, but that doesn't seem possible.  I suppose you could write a small firmware loader that ran in boot0 that would load from boot0 or boot1.  But that's kind of a pain.

I don't know if this will work on other boards, but I assume they have something similar.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
3,306件の閲覧回数
cminyard
Contributor II

I was able to figure this out by trial and error.  The boot image that you normally write with uuu can be written on the target from Linux using:

# echo 0 > /sys/block/mmcblk0boot0/force_ro
# dd if=<image> of=/dev/mmcblk0boot0 bs=1024 seek=33 status=progress
# sync
# echo 1 > /sys/block/mmcblk0boot0/force_ro

So the boot loader starts 33K from the beginning of the boot0 partition.

It would be nice to know if you could use the boot1 partition as a backup partition, but that doesn't seem possible.  I suppose you could write a small firmware loader that ran in boot0 that would load from boot0 or boot1.  But that's kind of a pain.

I don't know if this will work on other boards, but I assume they have something similar.

0 件の賞賛
返信
3,002件の閲覧回数
yixinchi
Contributor I
你好,您知道/dev/mmcblk0和/dev/mmcblk1在emmc的地址吗,我可以uboot命令行下将uboot进行在线更新吗
0 件の賞賛
返信
2,990件の閲覧回数
cminyard
Contributor II

> Hello, do you know the addresses of /dev/mmcblk0 and /dev/mmcblk1 in emmc? Can you update uboot online under the uboot command line?

You can look in the device tree for that information.

You could update it from the uboot command line, but I have not tried it.

0 件の賞賛
返信