STM32MP1 更新镜像方法总结

一.Update SD card

1.In linux console

df  //查看当前linux目录层次
ls /dev/disk/by-partlabel
PC $> dd if=tf-a.stm32 of=/dev/mmcblk0p1 conv=fdatasync
PC $> dd if=tf-a.stm32 of=/dev/mmcblk0p2 conv=fdatasync
PC $> dd if=/dev/zero of=/dev/mmcblk0p3 conv=fdatasync
PC $> dd if=u-boot.stm32 of=/dev/mmcblk0p3 conv=fdatasync
  1. Uboot console
//把sd卡通过usb 接口挂载到ubuntu系统下。
 Board $> mmc dev 0 
 Board $> ums 0 mmc 0
  1. use dd cmd (update whole image)
 PC $> cd build-openstlinuxweston-stm32mp1/tmp-glibc/deploy/images/stm32mp1/scripts/
 PC $> ../scripts/create_sdcard_from_flashlayout.sh  .flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157a-dk1-optee.tsv 
 PC $> sudo dd if=../flashlayout_st-image-weston_FlashLayout_sdcard_stm32mp157a-dk1-optee.raw of=/dev/sdb bs=8M conv=fdatasync status=progress

二. Update of e•MMC

1.On A linux Console

Board $>  echo 0 > /sys/class/block/mmcblk1boot0/force_ro
Board $>  mmc bootbus set  single_backward x1 x1 dev/mmcblk1

#To update TF-A in boot1 and select this boot partition:
Board $> dd if=tf-a.stm32 of=/dev/mmcblk1boot0 conv=fdatasync
Board $> mmc bootpart enable 1 1 /dev/mmcblk1

#To update TF-A in boot2 and select this boot partition:
Board $> dd if=tf-a.stm32 of=/dev/mmcblk1boot1 conv=fdatasync
Board $> mmc bootpart enable 2 1 /dev/mmcblk1

#To update U-Boot in the first GPT partition:
Board $> dd if=/dev/zero of=/dev/mmcblk1p1 conv=fdatasync
Board $> dd if=u-boot.stm32 of=/dev/mmcblk1p1 conv=fdatasync

2.On A uboot Console

#To update FSBL=TF-A, select the boot1 HW partition and come back to the user area at the end.
#ums command,you can directly export the available block devices (sd/mmc/usb) as USB mass storage devices with ums command:
# ums =  USB mass storage 
Board $> mmc dev 1
Board $> mmc partconf 1 1 1 1 
Board $> ums 0 mmc 1
PC $> dd if=tf-a.stm32 of=/dev/sdb  conv=fdatasync
Board $> mmc partconf 1 1 1 0
#To update SSBL = U-Boot in the first GPT partition in the user partition
 Board $> mmc dev 1
 Board $> ums 0 mmc 1
 PC $> dd if=u-boot.stm32 of=/dev/sdb1 conv=fdatasync
 Board $> mmc bootbus 1 0 0 0

3.updating bootfs

PC $> scp stm32mp157c-mydevicetree-mx.dtb root@<Target_IP>:/boot/

PC $> mkdir -p $WORKING/bootfs
PC $> mount -o loop <st-image-bootfs-openstlinux-weston-stm32mp1.ext4> $WORKING/bootfs
##Then copy the new dtb file at the root of $WORKING/bootfs
PC $> umount $WORKING/bootfs
PC $> sync
PC $> dd if=<st-image-bootfs-openstlinux-weston-stm32mp1.ext4> of=/dev/mmblk0p4 conv=fdatasync
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值