一.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- df //查看当前linux目录层次
( x& f, p |8 A* M: M% I3 V: [ - ls /dev/disk/by-partlabel# G0 w [, P" g2 R
- PC gt; dd if=tf-a.stm32 of=/dev/mmcblk0p1 conv=fdatasync N, G2 k, ~; O) d6 c$ t0 F6 k
- PC gt; dd if=tf-a.stm32 of=/dev/mmcblk0p2 conv=fdatasync
3 u! Y% U6 s5 g - PC gt; dd if=/dev/zero of=/dev/mmcblk0p3 conv=fdatasync1 d' L6 m$ t( {3 y5 [
- 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' |- //把sd卡通过usb 接口挂载到ubuntu系统下。
% [$ x' W8 E/ U3 _ - Board gt; mmc dev 0 ! q) `2 |- D4 s0 N+ W
- 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- PC gt; cd build-openstlinuxweston-stm32mp1/tmp-glibc/deploy/images/stm32mp1/scripts/0 g9 A9 d7 f: j8 m8 E
- 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 } - 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
- Board gt; echo 0 > /sys/class/block/mmcblk1boot0/force_ro0 |' X# a+ [8 }8 Y
- Board gt; mmc bootbus set single_backward x1 x1 dev/mmcblk1
! [& U3 y# s% q5 E. u \
1 d- z$ u6 I. V/ M) R% s. d0 c# L- #To update TF-A in boot1 and select this boot partition:, ~% z" F# L" W; w* e/ W2 M
- Board gt; dd if=tf-a.stm32 of=/dev/mmcblk1boot0 conv=fdatasync7 o7 S: x' m. Y3 V4 `
- Board gt; mmc bootpart enable 1 1 /dev/mmcblk12 M& [0 Y0 A) ?2 i! V8 k0 A+ {
- 7 A7 M4 c, i/ B8 q
- #To update TF-A in boot2 and select this boot partition:0 a8 H$ O9 _0 G/ X
- Board gt; dd if=tf-a.stm32 of=/dev/mmcblk1boot1 conv=fdatasync
" y% }. F/ j) A7 k* ^1 I/ |* `4 V& N - Board gt; mmc bootpart enable 2 1 /dev/mmcblk12 p3 Y% {1 E2 T3 w
: O2 @& k7 X; x( O4 s- #To update U-Boot in the first GPT partition:
& q+ w7 Z- ~( j% H - Board gt; dd if=/dev/zero of=/dev/mmcblk1p1 conv=fdatasync
# W4 F; l9 S G+ v4 O - 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
- #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 - #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 - # ums = USB mass storage
7 {) ?) P0 k. _, j - Board gt; mmc dev 1" T3 Z# s6 k* o" F1 d6 V/ q- M
- Board gt; mmc partconf 1 1 1 1 , `2 Z* z% Q6 T v
- Board gt; ums 0 mmc 15 X* m9 {# [( t' |# b6 ~0 g: m
- PC gt; dd if=tf-a.stm32 of=/dev/sdb conv=fdatasync& b5 {: P H) _0 T
- Board gt; mmc partconf 1 1 1 0
复制代码- #To update SSBL = U-Boot in the first GPT partition in the user partition
* ^/ z& w1 s+ P3 C2 L - Board gt; mmc dev 1
- p, ~1 v8 W ^! y9 H% j9 j - Board gt; ums 0 mmc 1; n3 e6 D8 U1 O! T' B( F; U0 J) i
- PC gt; dd if=u-boot.stm32 of=/dev/sdb1 conv=fdatasync
: n; |1 L9 F1 |+ @/ j5 e% t - 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
- PC gt; scp stm32mp157c-mydevicetree-mx.dtb root@<Target_IP>:/boot/
: @+ P0 b% |( w; O
8 g) M4 j# m' H5 B- PC gt; mkdir -p $WORKING/bootfs9 W8 R! M* W1 @4 m
- PC gt; mount -o loop <st-image-bootfs-openstlinux-weston-stm32mp1.ext4> $WORKING/bootfs
& G$ p Q: L2 R, q - ##Then copy the new dtb file at the root of $WORKING/bootfs
) y B: `/ u) L' \8 G. { - PC gt; umount $WORKING/bootfs& o$ E6 g; A- C' Q1 s9 s$ s
- PC gt; sync
- S/ o4 b! U# T1 `+ g - 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
|