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

STM32MP1 更新镜像方法总结

[复制链接]
STMCU小助手 发布时间:2022-10-2 22:26
一.Update SD card
" J: a/ K# H" q1 }8 W2 o' C" q  y- j) P/ s* {8 M5 N5 W3 }9 Z
1.In linux console
6 q4 y/ \. u8 ]# O1 m
0 {6 k. o) m4 b, q5 T7 Q
  1. df  //查看当前linux目录层次
    / [$ F& J' o4 V8 G/ B0 K
  2. ls /dev/disk/by-partlabel1 \0 r5 p% e2 j
  3. PC gt; dd if=tf-a.stm32 of=/dev/mmcblk0p1 conv=fdatasync4 t1 w: C! K! Z7 Y' p$ o- V1 s
  4. PC gt; dd if=tf-a.stm32 of=/dev/mmcblk0p2 conv=fdatasync0 [: \7 y% }' D  v2 F+ A4 u
  5. PC gt; dd if=/dev/zero of=/dev/mmcblk0p3 conv=fdatasync
    0 U1 \3 s8 q3 S7 p" E  k5 e; t
  6. PC gt; dd if=u-boot.stm32 of=/dev/mmcblk0p3 conv=fdatasync
复制代码

& U2 o) O- P2 {) z2 ~2.Uboot console* u/ W" Z, r7 g6 l; f5 X' ?
  1. //把sd卡通过usb 接口挂载到ubuntu系统下。3 ?& g# T$ d/ B( l- ?4 e: N+ x: \
  2. Board gt; mmc dev 0
    $ d& k9 {5 t, k1 @
  3. Board gt; ums 0 mmc 0
复制代码

2 U8 x$ ^1 [# c3.use dd cmd (update whole image)
& p8 N( I/ I. l5 l
  1. PC gt; cd build-openstlinuxweston-stm32mp1/tmp-glibc/deploy/images/stm32mp1/scripts/& Y( S5 q- X9 @1 r! B' t8 a
  2. PC gt; ../scripts/create_sdcard_from_flashlayout.sh  .flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157a-dk1-optee.tsv ( F& b! L! m; f" T4 C8 W
  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
复制代码
$ n4 @7 {$ E- Q; u% U$ A3 N( a! G
二. Update of e•MMC; ?+ W% C6 s; w8 B4 ^  ]& X0 ^; s5 ~

1 r) C' \3 `- f7 Z7 i3 I1.On A linux Console
9 _/ X- Y0 E( E' }8 W: U1 Y: Y" E9 @" ^% Q8 [2 {8 `5 [9 d* p! D
  1. Board gt;  echo 0 > /sys/class/block/mmcblk1boot0/force_ro" X9 z4 |' Q  c+ W; d1 p
  2. Board gt;  mmc bootbus set  single_backward x1 x1 dev/mmcblk1
    ! O8 f& R( O# ?( d# _

  3. % {+ A1 H" S2 G  s0 v
  4. #To update TF-A in boot1 and select this boot partition:- \  L7 a  m; O
  5. Board gt; dd if=tf-a.stm32 of=/dev/mmcblk1boot0 conv=fdatasync7 F1 g& K$ f+ N% B
  6. Board gt; mmc bootpart enable 1 1 /dev/mmcblk1+ G7 Y, j  q9 |$ m+ z* f3 B9 P9 M
  7. 4 Z  J$ l5 l' E4 ?& V
  8. #To update TF-A in boot2 and select this boot partition:
    / S3 S( \! l$ u
  9. Board gt; dd if=tf-a.stm32 of=/dev/mmcblk1boot1 conv=fdatasync7 w, I; d8 D$ q. ]
  10. Board gt; mmc bootpart enable 2 1 /dev/mmcblk16 J$ D! b1 m4 D* n! t0 f8 e% O
  11. 8 m. O# }7 |+ Y2 U9 x% t6 T) [
  12. #To update U-Boot in the first GPT partition:
    / E( V. L2 O# K; W1 f7 E" V) g
  13. Board gt; dd if=/dev/zero of=/dev/mmcblk1p1 conv=fdatasync, z. w1 D" n  ]9 N0 l0 Z) _
  14. Board gt; dd if=u-boot.stm32 of=/dev/mmcblk1p1 conv=fdatasync
复制代码
; o5 x8 s2 M* @' D- ?
2.On A uboot Console
$ r. ]( B/ L5 M/ K: B. ^
/ l& ~' b/ k2 U& q$ {
  1. #To update FSBL=TF-A, select the boot1 HW partition and come back to the user area at the end.
    + J& X5 K+ o! J  P) g+ g
  2. #ums command,you can directly export the available block devices (sd/mmc/usb) as USB mass storage devices with ums command:
    ) G' B" T, W( p' _3 H
  3. # ums =  USB mass storage % c. ]1 k, m# o3 i& _& z+ m
  4. Board gt; mmc dev 1
    " p  m* }5 ?5 r5 s
  5. Board gt; mmc partconf 1 1 1 1
    2 ~& `6 |9 o5 u8 {2 ]3 ]
  6. Board gt; ums 0 mmc 1
    . n6 C& V3 w( q3 H* N
  7. PC gt; dd if=tf-a.stm32 of=/dev/sdb  conv=fdatasync
    9 l, j$ q6 m( }* c9 b. t4 r
  8. Board gt; mmc partconf 1 1 1 0
复制代码
  1. #To update SSBL = U-Boot in the first GPT partition in the user partition5 u: _, z( p6 u4 r
  2. Board gt; mmc dev 1+ o' I2 u* A0 n2 R5 S
  3. Board gt; ums 0 mmc 15 f9 Q2 \2 C7 G2 I  N
  4. PC gt; dd if=u-boot.stm32 of=/dev/sdb1 conv=fdatasync
    ! r% Q0 {9 G/ Q" H
  5. Board gt; mmc bootbus 1 0 0 0
复制代码

0 o" d9 ]" j/ \, @! t3.updating bootfs3 x2 l  y, ~7 m, w8 A6 V  L

3 Q# A8 i1 y. g9 E' o4 }/ c# @8 c+ X
  1. PC gt; scp stm32mp157c-mydevicetree-mx.dtb root@<Target_IP>:/boot/
    - a' ~- {# {. j1 t: ?0 U9 `
  2. & D7 {5 H- d/ Z# F% {: I0 \
  3. PC gt; mkdir -p $WORKING/bootfs) q, p0 E# @2 K
  4. PC gt; mount -o loop <st-image-bootfs-openstlinux-weston-stm32mp1.ext4> $WORKING/bootfs1 T$ z# Z  E' U, P& x0 p* [
  5. ##Then copy the new dtb file at the root of $WORKING/bootfs# u3 k5 h4 s  X. j8 {2 O
  6. PC gt; umount $WORKING/bootfs
    ! p$ b2 N2 X: g2 w% @
  7. PC gt; sync. a7 P9 ^' }" {& x1 V
  8. PC gt; dd if=<st-image-bootfs-openstlinux-weston-stm32mp1.ext4> of=/dev/mmblk0p4 conv=fdat
复制代码

4 A3 o  v. k  \. s, k————————————————' Q6 [2 e$ C5 O  e# k/ Y
版权声明:jacob杰克爸
. s) |/ N) v1 S0 Y+ ?" v) |) m7 @8 U$ k* n  T# G
赞 收藏 评论0 发布时间:2022-10-2 22:26

举报

0个回答

所属标签

相似技术帖

官网相关资源

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
人形机器人运动控制、感知与智能配电
半导体创新技术与应用方向
EE架构与软件定义汽车
12V/48V 汽车智能配电(SPD)
区域控制单元(ZCU)与分区架构
关注我们
st-img 微信公众号
st-img 手机版