你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

STM32MP1 更新镜像方法总结

[复制链接]
STMCU小助手 发布时间:2022-10-2 22:26
一.Update SD card

1.In linux console

  1. df  //查看当前linux目录层次
  2. ls /dev/disk/by-partlabel
  3. PC gt; dd if=tf-a.stm32 of=/dev/mmcblk0p1 conv=fdatasync
  4. PC gt; dd if=tf-a.stm32 of=/dev/mmcblk0p2 conv=fdatasync
  5. PC gt; dd if=/dev/zero of=/dev/mmcblk0p3 conv=fdatasync
  6. PC gt; dd if=u-boot.stm32 of=/dev/mmcblk0p3 conv=fdatasync
复制代码

2.Uboot console
  1. //把sd卡通过usb 接口挂载到ubuntu系统下。
  2. Board gt; mmc dev 0
  3. Board gt; ums 0 mmc 0
复制代码

3.use dd cmd (update whole image)
  1. PC gt; cd build-openstlinuxweston-stm32mp1/tmp-glibc/deploy/images/stm32mp1/scripts/
  2. PC gt; ../scripts/create_sdcard_from_flashlayout.sh  .flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157a-dk1-optee.tsv
  3. PC gt; 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

  1. Board gt;  echo 0 > /sys/class/block/mmcblk1boot0/force_ro
  2. Board gt;  mmc bootbus set  single_backward x1 x1 dev/mmcblk1

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

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

  9. #To update U-Boot in the first GPT partition:
  10. Board gt; dd if=/dev/zero of=/dev/mmcblk1p1 conv=fdatasync
  11. Board gt; dd if=u-boot.stm32 of=/dev/mmcblk1p1 conv=fdatasync
复制代码

2.On A uboot Console

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

3.updating bootfs

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

  2. PC gt; mkdir -p $WORKING/bootfs
  3. PC gt; mount -o loop <st-image-bootfs-openstlinux-weston-stm32mp1.ext4> $WORKING/bootfs
  4. ##Then copy the new dtb file at the root of $WORKING/bootfs
  5. PC gt; umount $WORKING/bootfs
  6. PC gt; sync
  7. PC gt; dd if=<st-image-bootfs-openstlinux-weston-stm32mp1.ext4> of=/dev/mmblk0p4 conv=fdat
复制代码

————————————————
版权声明:jacob杰克爸

收藏 评论0 发布时间:2022-10-2 22:26

举报

0个回答

所属标签

相似分享

官网相关资源

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版