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

STM32MP1 更新镜像方法总结

[复制链接]
STMCU小助手 发布时间:2022-10-2 22:26
一.Update SD card# \2 n* p: D: [$ n

3 B3 |' I6 }0 s7 o( P0 m5 @1.In linux console
3 C7 T& A3 d3 c* z- Q) x
( [0 d- ~, \+ b, {# f4 i
  1. df  //查看当前linux目录层次
    ( x& f, p  |8 A* M: M% I3 V: [
  2. ls /dev/disk/by-partlabel# G0 w  [, P" g2 R
  3. PC gt; dd if=tf-a.stm32 of=/dev/mmcblk0p1 conv=fdatasync  N, G2 k, ~; O) d6 c$ t0 F6 k
  4. PC gt; dd if=tf-a.stm32 of=/dev/mmcblk0p2 conv=fdatasync
    3 u! Y% U6 s5 g
  5. PC gt; dd if=/dev/zero of=/dev/mmcblk0p3 conv=fdatasync1 d' L6 m$ t( {3 y5 [
  6. PC gt; dd if=u-boot.stm32 of=/dev/mmcblk0p3 conv=fdatasync
复制代码

- e9 E: t4 c; C, \; k+ A* V2.Uboot console
9 I8 _  _- K3 H' |
  1. //把sd卡通过usb 接口挂载到ubuntu系统下。
    % [$ x' W8 E/ U3 _
  2. Board gt; mmc dev 0 ! q) `2 |- D4 s0 N+ W
  3. Board gt; ums 0 mmc 0
复制代码
. o6 u6 d$ G$ l/ A/ j$ j8 W  x
3.use dd cmd (update whole image)
% t3 R& X5 {) e3 G5 l  y! K
  1. PC gt; cd build-openstlinuxweston-stm32mp1/tmp-glibc/deploy/images/stm32mp1/scripts/0 g9 A9 d7 f: j8 m8 E
  2. PC gt; ../scripts/create_sdcard_from_flashlayout.sh  .flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157a-dk1-optee.tsv
    4 u8 d0 J2 y) L4 p  ?3 }
  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
复制代码
# c  |+ Z  [8 M+ O- o/ O
二. Update of e•MMC* q; x1 u2 k, R7 j: z$ R0 F3 X

0 t% A1 K( {& F- t% K$ U3 U1.On A linux Console
& h7 {# i( Y; z* l% E" p1 k+ X4 U" [  M& ]6 \+ b; X
  1. Board gt;  echo 0 > /sys/class/block/mmcblk1boot0/force_ro0 |' X# a+ [8 }8 Y
  2. Board gt;  mmc bootbus set  single_backward x1 x1 dev/mmcblk1
    ! [& U3 y# s% q5 E. u  \

  3. 1 d- z$ u6 I. V/ M) R% s. d0 c# L
  4. #To update TF-A in boot1 and select this boot partition:, ~% z" F# L" W; w* e/ W2 M
  5. Board gt; dd if=tf-a.stm32 of=/dev/mmcblk1boot0 conv=fdatasync7 o7 S: x' m. Y3 V4 `
  6. Board gt; mmc bootpart enable 1 1 /dev/mmcblk12 M& [0 Y0 A) ?2 i! V8 k0 A+ {
  7. 7 A7 M4 c, i/ B8 q
  8. #To update TF-A in boot2 and select this boot partition:0 a8 H$ O9 _0 G/ X
  9. Board gt; dd if=tf-a.stm32 of=/dev/mmcblk1boot1 conv=fdatasync
    " y% }. F/ j) A7 k* ^1 I/ |* `4 V& N
  10. Board gt; mmc bootpart enable 2 1 /dev/mmcblk12 p3 Y% {1 E2 T3 w

  11. : O2 @& k7 X; x( O4 s
  12. #To update U-Boot in the first GPT partition:
    & q+ w7 Z- ~( j% H
  13. Board gt; dd if=/dev/zero of=/dev/mmcblk1p1 conv=fdatasync
    # W4 F; l9 S  G+ v4 O
  14. Board gt; dd if=u-boot.stm32 of=/dev/mmcblk1p1 conv=fdatasync
复制代码
* p. Y  [0 B" H% z" G" |  G$ b
2.On A uboot Console
5 b8 k" W$ }0 O# H& j6 x: C$ h
  1. #To update FSBL=TF-A, select the boot1 HW partition and come back to the user area at the end.
    4 W% x( z& k# a( M, Q
  2. #ums command,you can directly export the available block devices (sd/mmc/usb) as USB mass storage devices with ums command:
    / r6 _- ^' `5 f6 X. f
  3. # ums =  USB mass storage
    7 {) ?) P0 k. _, j
  4. Board gt; mmc dev 1" T3 Z# s6 k* o" F1 d6 V/ q- M
  5. Board gt; mmc partconf 1 1 1 1 , `2 Z* z% Q6 T  v
  6. Board gt; ums 0 mmc 15 X* m9 {# [( t' |# b6 ~0 g: m
  7. PC gt; dd if=tf-a.stm32 of=/dev/sdb  conv=fdatasync& b5 {: P  H) _0 T
  8. Board gt; mmc partconf 1 1 1 0
复制代码
  1. #To update SSBL = U-Boot in the first GPT partition in the user partition
    * ^/ z& w1 s+ P3 C2 L
  2. Board gt; mmc dev 1
    - p, ~1 v8 W  ^! y9 H% j9 j
  3. Board gt; ums 0 mmc 1; n3 e6 D8 U1 O! T' B( F; U0 J) i
  4. PC gt; dd if=u-boot.stm32 of=/dev/sdb1 conv=fdatasync
    : n; |1 L9 F1 |+ @/ j5 e% t
  5. Board gt; mmc bootbus 1 0 0 0
复制代码
  @- C5 L9 J' D- U- K' h
3.updating bootfs
  [, Y$ y; Z9 |: P" F1 b# `6 p9 e5 Y! C
  1. PC gt; scp stm32mp157c-mydevicetree-mx.dtb root@<Target_IP>:/boot/
    : @+ P0 b% |( w; O

  2. 8 g) M4 j# m' H5 B
  3. PC gt; mkdir -p $WORKING/bootfs9 W8 R! M* W1 @4 m
  4. PC gt; mount -o loop <st-image-bootfs-openstlinux-weston-stm32mp1.ext4> $WORKING/bootfs
    & G$ p  Q: L2 R, q
  5. ##Then copy the new dtb file at the root of $WORKING/bootfs
    ) y  B: `/ u) L' \8 G. {
  6. PC gt; umount $WORKING/bootfs& o$ E6 g; A- C' Q1 s9 s$ s
  7. PC gt; sync
    - S/ o4 b! U# T1 `+ g
  8. PC gt; dd if=<st-image-bootfs-openstlinux-weston-stm32mp1.ext4> of=/dev/mmblk0p4 conv=fdat
复制代码

( U! y: N2 x, e- R————————————————
4 x9 p$ s3 u6 V0 L: u& q) r8 u版权声明:jacob杰克爸
$ \4 x* t# S; u! Q! }- t8 r$ O: v: f( r+ P; y" G4 k
赞 收藏 评论0 发布时间:2022-10-2 22:26

举报

0个回答

所属标签

相似技术帖

官网相关资源

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