一.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- df //查看当前linux目录层次
/ [$ F& J' o4 V8 G/ B0 K - ls /dev/disk/by-partlabel1 \0 r5 p% e2 j
- PC gt; dd if=tf-a.stm32 of=/dev/mmcblk0p1 conv=fdatasync4 t1 w: C! K! Z7 Y' p$ o- V1 s
- PC gt; dd if=tf-a.stm32 of=/dev/mmcblk0p2 conv=fdatasync0 [: \7 y% }' D v2 F+ A4 u
- PC gt; dd if=/dev/zero of=/dev/mmcblk0p3 conv=fdatasync
0 U1 \3 s8 q3 S7 p" E k5 e; t - 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' ?
- //把sd卡通过usb 接口挂载到ubuntu系统下。3 ?& g# T$ d/ B( l- ?4 e: N+ x: \
- Board gt; mmc dev 0
$ d& k9 {5 t, k1 @ - Board gt; ums 0 mmc 0
复制代码
2 U8 x$ ^1 [# c3.use dd cmd (update whole image)
& p8 N( I/ I. l5 l- PC gt; cd build-openstlinuxweston-stm32mp1/tmp-glibc/deploy/images/stm32mp1/scripts/& Y( S5 q- X9 @1 r! B' t8 a
- 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
- 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
- Board gt; echo 0 > /sys/class/block/mmcblk1boot0/force_ro" X9 z4 |' Q c+ W; d1 p
- Board gt; mmc bootbus set single_backward x1 x1 dev/mmcblk1
! O8 f& R( O# ?( d# _
% {+ A1 H" S2 G s0 v- #To update TF-A in boot1 and select this boot partition:- \ L7 a m; O
- Board gt; dd if=tf-a.stm32 of=/dev/mmcblk1boot0 conv=fdatasync7 F1 g& K$ f+ N% B
- Board gt; mmc bootpart enable 1 1 /dev/mmcblk1+ G7 Y, j q9 |$ m+ z* f3 B9 P9 M
- 4 Z J$ l5 l' E4 ?& V
- #To update TF-A in boot2 and select this boot partition:
/ S3 S( \! l$ u - Board gt; dd if=tf-a.stm32 of=/dev/mmcblk1boot1 conv=fdatasync7 w, I; d8 D$ q. ]
- Board gt; mmc bootpart enable 2 1 /dev/mmcblk16 J$ D! b1 m4 D* n! t0 f8 e% O
- 8 m. O# }7 |+ Y2 U9 x% t6 T) [
- #To update U-Boot in the first GPT partition:
/ E( V. L2 O# K; W1 f7 E" V) g - Board gt; dd if=/dev/zero of=/dev/mmcblk1p1 conv=fdatasync, z. w1 D" n ]9 N0 l0 Z) _
- 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$ {- #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 - #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 - # ums = USB mass storage % c. ]1 k, m# o3 i& _& z+ m
- Board gt; mmc dev 1
" p m* }5 ?5 r5 s - Board gt; mmc partconf 1 1 1 1
2 ~& `6 |9 o5 u8 {2 ]3 ] - Board gt; ums 0 mmc 1
. n6 C& V3 w( q3 H* N - PC gt; dd if=tf-a.stm32 of=/dev/sdb conv=fdatasync
9 l, j$ q6 m( }* c9 b. t4 r - Board gt; mmc partconf 1 1 1 0
复制代码- #To update SSBL = U-Boot in the first GPT partition in the user partition5 u: _, z( p6 u4 r
- Board gt; mmc dev 1+ o' I2 u* A0 n2 R5 S
- Board gt; ums 0 mmc 15 f9 Q2 \2 C7 G2 I N
- PC gt; dd if=u-boot.stm32 of=/dev/sdb1 conv=fdatasync
! r% Q0 {9 G/ Q" H - 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- PC gt; scp stm32mp157c-mydevicetree-mx.dtb root@<Target_IP>:/boot/
- a' ~- {# {. j1 t: ?0 U9 ` - & D7 {5 H- d/ Z# F% {: I0 \
- PC gt; mkdir -p $WORKING/bootfs) q, p0 E# @2 K
- PC gt; mount -o loop <st-image-bootfs-openstlinux-weston-stm32mp1.ext4> $WORKING/bootfs1 T$ z# Z E' U, P& x0 p* [
- ##Then copy the new dtb file at the root of $WORKING/bootfs# u3 k5 h4 s X. j8 {2 O
- PC gt; umount $WORKING/bootfs
! p$ b2 N2 X: g2 w% @ - PC gt; sync. a7 P9 ^' }" {& x1 V
- 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
|