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

stm32h7-uboot-uclinux 移植完成部分,分享给大家

[复制链接]
stone-363407 发布时间:2018-11-22 15:29
本帖最后由 stone-363407 于 2018-12-7 16:42 编辑 4 n8 w. Z! s9 _+ c( h# L9 ~
( x$ \3 C! r  D0 Z  e, r2 V8 O
代码地址: http://github.com/huayuguo/uboot-stm32h743_eth4 M2 f9 d4 V  E4 ~1 k  J/ @6 j  t0 n

2 n: u5 y/ d" m0 z2 f$ w: v
7 ^3 R3 v7 Q/ E0 C5 d' Z) Y* F

9 o& i, a+ G- Y4 J4 fU-Boot 2018.09-rc2-gc16d658 (Dec 06 2018 - 16:00:30 +0800)
  f) E5 F* N' M
& ~' K. o8 i: ]# f: T0 A4 ]

+ K  n+ [) s# D. m8 L) hModel: STMicroelectronics STM32H743i-EVAL board1 Q8 m7 t6 L# @8 O- T
DRAM:  32 MiB
3 d0 J. v4 `% u% zMMC:   STM32 SDMMC2: 0
2 C) x( [- E' I* `! bIn:    serial@40011000
9 o+ V8 m/ t; V( {Out:   serial@40011000
6 n! @$ ?: p/ {  d- q8 N, E/ G4 OErr:   serial@40011000
; ~6 ?0 q" b' t, m% b6 s; RNet:   ' j. \% n* ~: ^3 b
Warning: ethernet@40028000 (eth0) using random MAC address - fe:f8:94:5f:5e:26" j+ F1 R0 E3 S1 U+ ]3 b2 _4 O8 t
eth0: ethernet@40028000
  g+ v; }/ l5 J2 b, P9 k0 m7 FHit SPACE in 3 seconds to stop autoboot.! |% j3 S$ F/ G2 J
switch to partitions #0, OK
+ W, N; t0 c9 C. ?7 }6 Ymmc0 is current device- T# l% s$ \7 _4 Q0 p8 G% h# m
Scanning mmc 0:1...+ }/ v6 p2 u3 L4 j2 d
U-Boot > setenv gatewayip 192.168.10.1;setenv ipaddr 192.168.10.22;setenv netmask 255.255.255.0;setenv ethaddr  1a:5a:38:ef:38:d8;% m( I3 h# _8 D& ~- j2 }& h+ u( A
U-Boot > env set bootargs "root=/dev/ram console=ttyS0,115200 "
! B( P* N7 U2 @' ?U-Boot > tftpboot 61000000 192.168.10.25:uImage;tftpboot 61300000 192.168.10.25:stm32h743i-eval.dtb; & c2 s4 _  D/ o' a3 b' X
ethernet@40028000 Waiting for PHY auto negotiation to complete. done6 S- n+ Z, ]0 u8 a1 e
Using ethernet@40028000 device* S4 l% R3 g2 ]' w# a
TFTP from server 192.168.10.25; our IP address is 192.168.10.22
& @" i* f8 x) }- x8 kFilename 'uImage'.4 _  b; {8 G: k& ^
Load address: 0x61000000
; p- B3 e7 w) GLoading: #################################################################
# H, R8 w" c  X+ a/ Z# X         #################################################################4 F5 L' U0 Z  M
         ##########  H- p7 E  g* S
         1.4 MiB/s8 l& k* V! T' P0 v
done
7 {2 h: l  i; X; u$ R) t  b9 W5 U# NBytes transferred = 2048568 (1f4238 hex)8 A: L3 n2 N, ~# H
ethernet@40028000 Waiting for PHY auto negotiation to complete. done
  l- }: i: x! ?Using ethernet@40028000 device6 R) {: |7 Y3 {* A4 @  J
TFTP from server 192.168.10.25; our IP address is 192.168.10.22
, n1 \  I& h# l; \9 m4 ~& {Filename 'stm32h743i-eval.dtb'.
* F& }8 g  S3 M0 T9 C9 ]6 yLoad address: 0x61300000
' B$ s" W! F$ |) e# J0 p! L! KLoading: #5 g  L  e& [' s/ c8 a8 N% G
         999 KiB/s5 u  r  G( |1 r8 Z
done
, z& }+ c  a% n! f+ H1 V+ |Bytes transferred = 5115 (13fb hex)9 V# B7 ^, I5 M$ q5 g+ W
U-Boot > bootm 61000000 - 61300000 6 z7 O1 c6 r3 F; O# N( |5 H9 k
## Booting kernel from Legacy Image at 61000000 .../ n, s9 Z) {" ]" B. E8 ^: T, I
   Image Name:   linux* e, I6 E8 v" T" t. k6 q
   Image Type:   ARM Linux Kernel Image (uncompressed)9 d$ Y+ p! }' n* D
   Data Size:    2048504 Bytes = 2 MiB4 d0 o8 q& l; T' u
   Load Address: 61000000
# Y! H  I* d+ `5 F$ y. \) _   Entry Point:  61000000
. a1 b/ e! ?1 N" C+ G   Verifying Checksum ... OK
( Z# K' I/ f/ h. S/ J* b, T## Flattened Device Tree blob at 61300000, w8 d' J7 k/ R+ F  S: S
   Booting using the fdt blob at 0x61300000
2 U9 M$ V6 R- a" T5 D   Loading Kernel Image ... OK1 m2 n4 [/ m) ^+ d$ o7 k
   Using Device Tree in place at 61300000, end 613043fa( y" T; z$ V8 T. @; T: `
2 L( l+ n+ J, w) G/ }

* q$ Q# z4 g2 N( Z. oStarting kernel ...
0 x+ V0 J8 P& T/ o4 ~4 j8 R# n
4 O) Q1 `& v4 O
[    0.000000] Booting Linux on physical CPU 0x0
0 {6 l  u0 P) y2 s' f[    0.000000] Linux version 4.15.2-gb37c1e299-dirty (xiao@xd) (gcc version 6.3.1 20170620 (15:6.3.1+svn253039-1build1)) #134 PREEMPT Fri Dec 7 13:45:02 CST 2018
. h& l: |, u4 J1 A[    0.000000] CPU: ARMv7-M [411fc271] revision 1 (ARMv7M), cr=00000000
3 c- U5 K  U$ l' @[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
4 r+ N- f( [& T8 L. |1 q[    0.000000] OF: fdt: Machine model: STMicroelectronics STM32H743i-EVAL board
. \' o( `0 s5 D# A8 a[    0.000000] Reserved memory: created DMA memory pool at 0x61000000, size 2 MiB1 L! C. Y  Z, y$ A5 l; p* Z
[    0.000000] OF: reserved mem: initialized node linux,dma, compatible id shared-dma-pool9 \, c# B2 [: \
[    0.000000] Ignoring RAM after 0x61000000, memory at 0x61200000 ignored
% t+ ^$ m% i( Z: c2 h8 P[    0.000000] Using ARMv7 PMSA Compliant MPU. Region independence: No, Used 2 of 16 regions
: K% M% Z- C* c. V[    0.000000] On node 0 totalpages: 4096, l- q& @9 V) I# D5 e4 ^1 f
[    0.000000]   Normal zone: 32 pages used for memmap
1 B2 m! G) p' J& S" z. M[    0.000000]   Normal zone: 0 pages reserved1 f! Q1 _0 M0 g- V* T+ T& U- p
[    0.000000]   Normal zone: 4096 pages, LIFO batch:0
8 z8 @5 R. m) a% w9 b* T[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*327680 t  [% l1 f& T* m9 k
[    0.000000] pcpu-alloc: [0] 0
9 O) O" f  L( A2 N. i[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 40640 G' K9 E7 K7 i3 \8 `7 D
[    0.000000] Kernel command line: root=/dev/ram console=ttyS0,115200
9 p9 V, T! F; C2 X) W) t[    0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)1 X% q  _. Y! Z+ e5 M
[    0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
$ a2 X9 d' K1 ]" V% d3 C& x1 n[    0.000000] Memory: 13080K/16384K available (1596K kernel code, 154K rwdata, 496K rodata, 632K init, 130K bss, 3304K reserved, 0K cma-reserved)
; G" L! N  s7 G[    0.000000] Virtual kernel memory layout:2 j1 z% ]3 D0 W
[    0.000000]     vector  : 0x00000000 - 0x00001000   (   4 kB): ]9 k" T- ]2 G# `2 Q$ ]
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)# S+ G6 @( z- l1 r: C! e5 t
[    0.000000]     vmalloc : 0x00000000 - 0xffffffff   (4095 MB)$ S' G% \2 S% h9 n: B
[    0.000000]     lowmem  : 0x60000000 - 0x61000000   (  16 MB)
! w2 S& T5 b+ k. j" z[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (1597 kB)
6 A3 I6 E5 y! p6 D$ F[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   ( 632 kB)# \$ B# Q  X' K- ]0 L% L. R+ }
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 155 kB)
6 L; N9 V# I/ ^% H" u[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 131 kB)& V8 E" z( ~- P1 C) j3 I/ R* ]
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1" _) U# Y. v+ I3 T. T: c6 p
[    0.000000] Preemptible hierarchical RCU implementation.
+ b0 V# X1 a' u[    0.000000]  Tasks RCU enabled.
5 U4 p3 i2 h6 s4 c7 g* ~# b[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
  o* _) E" O; v3 @' x0 W9 v[    0.000000] clocksource: arm_system_timer: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 18664651 ns
: [& l+ X& S; H/ V1 F[    0.000000] ARM System timer initialized as clocksource
" I: H) Q* [; S[    0.000000] /soc/timer@40000c00: STM32 clockevent driver initialized (32 bits)
( ]/ e, h: A# l1 h! {3 a) ?[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns$ h5 e: P3 x' f& M
[    0.010000] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
! g  Q2 h. A, L" ?+ @) ?' i: E: \[    0.100000] pid_max: default: 4096 minimum: 301
/ U8 {- ]6 `& T% U) m[    0.100000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes); d4 i# Z# ^; E% I% Q5 |+ }7 L! J& v
[    0.100000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
1 l8 E6 f1 a0 a[    0.100000] Hierarchical SRCU implementation.
, d7 m, }2 J# ?4 O5 c8 Q[    0.100000] devtmpfs: initialized
3 p( Z% }! p: {4 I4 P- `( N[    0.110000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
' J5 L/ R0 u' R8 L3 L6 L  g. j[    0.110000] pinctrl core: initialized pinctrl subsystem4 O( V9 u" x3 Y5 }
[    0.110000] DMA: default coherent area is set
% F8 y( E" r, N( u& J2 D, H[    0.110000] random: get_random_u32 called from bucket_table_alloc+0xc9/0xf4 with crng_init=03 r, u' D  L# X5 a4 d2 T' _& x
[    0.110000] NET: Registered protocol family 161 B+ u, N% h. O8 B1 g2 l" b
[    0.120000] cpuidle: using governor ladder( ]8 T; m2 h3 f( I6 \
[    0.120000] cpuidle: using governor menu
6 L) U. \& z) ~[    0.130000] stm32h743-pinctrl soc:pin-controller: GPIOA bank added4 P! [5 H2 {  o5 z! R
[    0.130000] stm32h743-pinctrl soc:pin-controller: GPIOB bank added- a! s1 _$ ]  D$ N1 R9 @& ]
[    0.130000] stm32h743-pinctrl soc:pin-controller: GPIOC bank added
6 u& D: `( p+ A$ ^; x; p[    0.130000] stm32h743-pinctrl soc:pin-controller: GPIOD bank added
- s! @5 J- q; b" J" u2 m7 T; Z9 j[    0.130000] stm32h743-pinctrl soc:pin-controller: GPIOE bank added
% I8 _! ^8 [/ A5 |& O- @* |/ k[    0.130000] stm32h743-pinctrl soc:pin-controller: GPIOF bank added9 G1 ~& C4 ~1 b! a1 F0 R
[    0.140000] stm32h743-pinctrl soc:pin-controller: GPIOG bank added
. G2 C9 T5 l5 t! v$ T* Q) K( ^[    0.140000] stm32h743-pinctrl soc:pin-controller: GPIOH bank added
* C7 f0 X1 I% h" ?; i( ?[    0.140000] stm32h743-pinctrl soc:pin-controller: GPIOI bank added* ]3 C. U# N1 S6 U
[    0.140000] stm32h743-pinctrl soc:pin-controller: GPIOJ bank added* s4 B* _- x7 D  D2 R' p
[    0.140000] stm32h743-pinctrl soc:pin-controller: GPIOK bank added
" [. W9 n' L3 s[    0.140000] stm32h743-pinctrl soc:pin-controller: Pinctrl STM32 initialized
. x) s2 o0 j3 p* @. ][    0.160000] pps_core: LinuxPPS API ver. 1 registered7 K! \( t  p% D$ o7 j8 }& @; }
[    0.160000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>* n& H# Z4 d6 b/ a
[    0.160000] PTP clock support registered
8 N% l* J& i  f2 r5 }[    0.160000] clocksource: Switched to clocksource arm_system_timer# W1 r' h8 I3 s8 J6 j/ U
[    0.170000] NET: Registered protocol family 2
) {; _% w- j+ D% z- O[    0.170000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
8 p+ s! ]5 }7 n+ j% H: T[    0.170000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
0 q& ^$ v6 Y% [. j5 }! i[    0.170000] TCP: Hash tables configured (established 1024 bind 1024)
5 D( Y& a0 d1 {$ L' \% z) x" a[    0.170000] UDP hash table entries: 256 (order: 0, 4096 bytes)
  X9 F) @2 m( l) V* A[    0.170000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)4 X+ x" U1 {" B0 H2 s" J
[    0.170000] NET: Registered protocol family 1
* d  J5 e/ |! V7 `, l[    0.360000] workingset: timestamp_bits=30 max_order=12 bucket_order=0
6 C+ I* Y3 p+ s9 g  w) a3 a5 Y[    0.380000] random: fast init done, j2 t5 B- o( F
[    0.400000] io scheduler noop registered
1 p4 T% Y9 f2 \9 G: u; ?[    0.400000] io scheduler deadline registered
% h8 f/ t( P+ Q# c6 ^& e[    0.400000] io scheduler cfq registered (default)
' j9 `" m; ~: h8 x& }[    0.400000] io scheduler mq-deadline registered  e/ V# a! ]- b% K# H8 r
[    0.400000] io scheduler kyber registered3 W2 j' ^2 U  a8 m6 E# U( v
[    0.400000] STM32 USART driver initialized
( C6 z" _: P7 \1 C9 j7 {" X[    0.400000] 40011000.serial: ttyS0 at MMIO 0x40011000 (irq = 17, base_baud = 12500000) is a stm32-usart/ R( T6 p9 C& t  h+ r8 W" V
[    0.850000] console [ttyS0] enabled( w. P' |2 R  v  m' R
[    0.850000] stm32-usart 40011000.serial: rx dma alloc failed
4 j( d/ o/ G2 @* ]) {. i* j! F. c[    0.860000] stm32-usart 40011000.serial: interrupt mode used for rx (no dma)
% Z% S* r$ W% Y9 F7 J0 i[    0.870000] stm32-usart 40011000.serial: tx dma alloc failed# v9 y# V5 y5 ~9 X  Y% X6 D
[    0.870000] stm32-usart 40011000.serial: interrupt mode used for tx (no dma)- B' b6 a) {! j7 L0 t$ H3 k
[    0.880000] libphy: Fixed MDIO Bus: probed
$ }3 T! k$ N& g8 l. h3 ~' L3 U[    0.890000] tun: Universal TUN/TAP device driver, 1.6
7 ?7 c$ Z& i* z, }: Y) m' x( m[    0.890000] stm32-dwmac 40028000.ethernet: Found phy-handle subnode
% G" x2 L2 Q  P/ |[    0.900000] stm32-dwmac 40028000.ethernet: Found MDIO subnode
; Z& q. v6 G0 _1 y[    0.910000] stm32-dwmac 40028000.ethernet: use snps,dwmac-4.00..
. V) s+ z4 w2 s# t[    0.910000] stm32-dwmac 40028000.ethernet: PTP uses main clock0 \9 u& Q+ K0 d
[    0.910000] stm32-dwmac 40028000.ethernet: no reset control found
" l- ]& b7 W, W% p/ g: p4 g[    0.930000] stmmac - user ID: 0x30, Synopsys ID: 0x41
1 q0 G( v0 J! h7 `7 |[    0.930000] stm32-dwmac 40028000.ethernet: DMA HW capability register supported: h& @5 `# F, D, f7 ^
[    0.930000] stm32-dwmac 40028000.ethernet: RX Checksum Offload Engine supported, @4 ]1 M1 z0 ~( q0 k
[    0.950000] stm32-dwmac 40028000.ethernet: TX Checksum insertion supported
. V9 ?5 [, V& t: f[    0.950000] stm32-dwmac 40028000.ethernet: Wake-Up On Lan supported
1 h. d  q- Z4 i' r3 d# A2 W' \[    0.950000] stm32-dwmac 40028000.ethernet: TSO supported
7 V8 Z8 l+ I: @  K[    0.970000] stm32-dwmac 40028000.ethernet: Enable RX Mitigation via HW Watchdog Timer% d$ ~+ I( a6 T) y5 p2 e
[    0.970000] stmmac_mdio_reset : reset gpio direction num=28
0 g3 n0 }/ _- ]2 R" i[    1.080000] libphy: stmmac: probed
5 S+ A" U7 Y# N7 C5 K  z+ d[    1.090000] stm32-dwmac 40028000.ethernet: register the MDIO bus
; K: |& @/ Z2 ]- p0 W5 U" O, K[    1.100000] u32 classifier9 Z2 L5 z% V; U
[    1.100000] Initializing XFRM netlink socket8 C- P' E* \# T/ L
[    1.110000] NET: Registered protocol family 17* Q& S# \( e( D0 }( e# [
[    1.110000] NET: Registered protocol family 15
( A! o! @7 A1 A6 l7 a6 {[    1.110000] 8021q: 802.1Q VLAN Support v1.81 n- o9 U0 O2 H. R- w' o' C
[    1.120000] Key type dns_resolver registered  E/ M2 O1 a. C/ }- h
[    1.130000] Freeing unused kernel memory: 632K2 z8 D- x$ R/ a5 L
[    1.140000] This architecture does not have kernel memory protection.
8 N9 G, {/ l0 o7 `5 ^: ecan't run '/sbin/swapon': No such file or directory$ B( `$ G0 q" I2 a3 Q: L
Initializing random number generator... done.+ K3 ^& I1 J8 w& z5 N' g+ M
Jan  1 00:00:01 login[59]: root login on 'console'
+ r( h2 H7 b. T( i% Y2 I3 e~ # 6 r( ]; J3 R' @# v
收藏 5 评论16 发布时间:2018-11-22 15:29

举报

16个回答
stone-363407 回答时间:2018-12-7 16:08:07
本帖最后由 stone-363407 于 2018-12-7 16:09 编辑 % {* t6 _  E: s6 V' A% _

3 J$ y- F$ V9 S4 b: m8 Mcpu 400Mhz  sdram 100mhz  cas=2
0 q# P1 k8 M+ x# \2 s2 S. J  R% ?测试软件:iperf3 9 R: F2 H. R3 u1 I  C
系统跑了25个线程测试速度如下。。。。没有原子裸奔的那个快............
) A% S& N- c5 n: m. {" c7 E65.8 Mbits/sec
( E/ x. D- G8 M3 o- P% r/ P. c6 o$ C
~ # cat /proc/cpuinfo
' s- j/ |1 U- A( Jprocessor       : 0) f6 f$ U& H9 ]( Q
model name      : ARMv7-M rev 1 (v7ml)# @- X5 q3 `. W" E2 n1 L, Y3 K
BogoMIPS        : 795.44
! _8 Q1 @9 e: `4 HFeatures        : half thumb fastmult edsp idivt 3 _- x6 D# U* q1 ?2 p  ^
CPU implementer : 0x41' i! G- T/ ]3 |' @/ d
CPU architecture: 7M
. y$ s3 V6 I# oCPU variant     : 0x1
% u4 ~0 f9 F$ d5 ~8 Q8 lCPU part        : 0xc27
/ u9 ?! ^) i; O2 [) p( ACPU revision    : 13 a$ M' }" O7 x5 U$ Z6 t. w

8 A9 [9 D2 S4 K5 _Hardware        : STM32 (Device Tree Support)/ E% _' m4 q; s% u2 @5 S, Y
Revision        : 0000# h- t0 k. c) S% `- m+ _. F! T8 f
Serial          : 0000000000000000# o# l0 l) P# {  w7 A. f
~ # iperf3 -c 192.168.10.26
; ~; z2 S3 M; v2 WConnecting to host 192.168.10.26, port 5201
2 j3 |9 ?: Z5 S! U% @0 Q2 X[  4] local 192.168.10.22 port 41328 connected to 192.168.10.26 port 5201
+ G+ N; C* n7 ?[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
3 T: `' `0 M* q$ D& V( L# V[  4]   0.00-1.01   sec  7.57 MBytes  63.0 Mbits/sec    0    173 KBytes       3 d% E$ |. v& l8 v8 }' r5 {4 Z
[  4]   1.01-2.03   sec  8.22 MBytes  67.3 Mbits/sec    0    181 KBytes       3 ]1 b) U  V7 ^3 {/ g! ^7 k2 C/ H
[  4]   2.03-3.15   sec  8.75 MBytes  66.0 Mbits/sec    0    181 KBytes       ' \% z; |( x0 u+ p1 j8 Q
[  4]   3.15-4.04   sec  6.90 MBytes  65.0 Mbits/sec    0    181 KBytes       " y) e" `& C9 ~+ s( d5 H
[  4]   4.04-5.15   sec  8.70 MBytes  65.4 Mbits/sec    0    181 KBytes       3 M. C; o7 }' c: S7 l$ p
[  4]   5.15-6.10   sec  7.40 MBytes  65.5 Mbits/sec    0    181 KBytes       7 ^2 _+ u5 ?: |3 L1 J3 R! v% P! R& X0 C
[  4]   6.10-7.01   sec  7.37 MBytes  67.7 Mbits/sec    0    191 KBytes       # ~3 Z2 Y5 \( w
[  4]   7.01-8.16   sec  8.95 MBytes  65.6 Mbits/sec    0    191 KBytes      
% K- q# H- o/ S& O/ s[  4]   8.16-9.02   sec  6.86 MBytes  66.5 Mbits/sec    0    191 KBytes      
9 n% J+ F+ ?+ ]# m/ v  P[  4]   9.02-10.13  sec  8.73 MBytes  65.9 Mbits/sec    0    191 KBytes      
  N) S  R2 n$ D- h% O- - - - - - - - - - - - - - - - - - - - - - - - -/ s: Z8 S  t; y
[ ID] Interval           Transfer     Bandwidth       Retr
2 J9 H; J2 M1 n# i1 J/ e[  4]   0.00-10.13  sec  79.4 MBytes  65.8 Mbits/sec    0             sender
+ t: Q, |4 d) g/ i[  4]   0.00-10.13  sec  79.4 MBytes  65.8 Mbits/sec                  receiver$ S: r7 B5 M2 N7 w$ X7 }

+ ?: W& @7 ^% O9 O/ ]% liperf Done.$ W: ]& [6 R# ]  E) G% x% k8 c
~ # ps
7 _$ y# b2 n; B; K  PID USER       VSZ STAT COMMAND
5 p& [3 s* i2 C  C( L# H    1 root       400 S    init
( |" R) i0 O) K5 e: Z# T& r    2 root         0 SW   [kthreadd]' F1 p9 ~( n% k1 s& n- {+ h- E( p
    4 root         0 IW<  [kworker/0:0H]
  b2 {- E, _7 N6 d4 z8 f    6 root         0 IW<  [mm_percpu_wq]
4 f+ f& `5 k( d) j, V    7 root         0 SW   [ksoftirqd/0]. i5 j$ a3 q" f: j
    8 root         0 IW   [rcu_preempt]
1 @" `( {( G/ O    9 root         0 IW   [rcu_sched]
% C9 s5 n7 q0 ]+ A( i6 h   10 root         0 IW   [rcu_bh]
2 Z/ P$ w* t* ~9 e6 p4 I# A   11 root         0 SW   [kdevtmpfs]
4 O5 C. ~, `' f6 }   12 root         0 SW   [rcu_tasks_kthre]! O4 P& {. ]$ m  k( d7 k
   14 root         0 IW<  [writeback]
4 j) @% j- Y  G/ B   15 root         0 IW<  [crypto]
8 k% |! y* q% r, X; K- |   16 root         0 IW<  [kblockd]+ X/ @6 u7 g2 G8 z
   17 root         0 IW<  [watchdogd]
+ V: @0 q6 i9 g9 N   18 root         0 SW   [kswapd0]: }" p9 F5 N2 Q: z7 f4 t% m
   41 root         0 SW   [irq/17-40011000]
* ^9 N8 j$ h8 c* _/ A) ]! b" L   59 root       420 S    -sh% n. j1 I: l; I2 [
   60 root         0 IW   [kworker/u2:1]
4 |0 j0 M; t& K  ?! ^   61 root         0 IW   [kworker/u2:2]. v2 v: r" T3 {: Q( I. R
   64 root         0 IW   [kworker/0:2]
; g2 Z3 H; a1 R% [, B$ n   65 root         0 IW   [kworker/0:3]% Y, ^; P# |- E8 j
   71 root         0 IW   [kworker/0:0]7 n4 V; Z. K. C4 J( M( O
   75 root       396 R    ps
yhangzzz 回答时间:2019-3-7 20:20:51
本帖最后由 yhangzzz 于 2019-3-7 20:26 编辑 + p( J% a  K( _/ e) F: W7 }. ~

: S" b* V8 ~9 ~- t+ A; T1 ?. m楼主,您好,看了您的贴子,手头正好有一块stm32f746-disco 的板子,按照您的思路,移植了uboot2016.09,移植了uboot eth驱动,因为没有移植MMC驱动,就打算把linux内核加载在SDRAM上,再从SDRAM启动内核;使用的是linux4.19.24默认的stm32配置,但是现在一直卡在“Starting kernel ...”,内核应该是没有起来;不知道您调试过程中是否遇到这个问题。附上打印的信息:
& i8 C8 p- b6 w. I9 f, I3 y
- I* m7 x; l- _+ NU-Boot 2016.09-g83ec55b-dirty (Feb 22 2019 - 18:30:58 +0800)
) m  r) p, Z  @* ~" i9 l
, e0 {' m) A7 z6 ?DRAM:  8 MiB0 w4 H: `) _6 g0 a* C0 c
WARNING: Caches not enabled, w/ S  ^, [4 L$ B" |. P5 h# g
Flash: 1 MiB; X% [. Q: u0 Q- \
Using default environment8 v: t, m# c, A% \/ H3 b( q
9 I8 t0 {) y0 g" m
In:    serial_stm32x7, k- W9 h( X5 N( ~# J
Out:   serial_stm32x7
: t3 J; b3 P; W; [Err:   serial_stm32x7
' z  n4 h4 f" f/ a0 [+ [* SNet:   
) _8 f0 H8 ^& Q3 Gstm32 eth probe start
* p% S3 Y2 n) _8 O- r2 L5 i& hstm32 eth probe end1 N7 H# B8 Z& x
stm32_read_rom_hwaddr$ O6 B/ e# ~! ?1 A! R5 t

* R. z4 F% j1 N$ l) h- |Warning: eth_stm32_eth using MAC address from ROM& r& M/ B  n7 l+ y8 P0 r' E8 z# w
eth0: eth_stm32_eth4 O' g: e, l7 [7 \+ z- L
stm32_write_hwaddr0 n) F' T4 c/ o9 k3 p: p# k

! F/ u0 j- y' i8 o) _# DHit SPACE in 3 seconds to stop autoboot.% c5 W- i- r2 ]# {4 N: e& L. b  `
U-Boot > set ipaddr 10.0.0.2
; [4 G- ?" [3 |( l$ RU-Boot > set serverip 10.0.0.67 \  z( r4 B+ t. a
U-Boot > tftp c0400000 uImage.bin
7 H: y+ [9 W) ]
5 V/ W3 D! w6 \# F# E$ E/ Rstm32_eth_stop start
0 `; z7 b/ p: K. X% f5 S* Lstm32_eth_stop end
- Y3 N, k) e9 n+ a9 f8 I
+ l: K' c" _. _# estm32_eth_start start* |+ g9 }' N2 H1 p  q7 t
stm32_eth_start end: ]" N4 O: P$ L
Using eth_stm32_eth device$ g& j2 [. t/ S' u* E* m5 q2 R
TFTP from server 10.0.0.6; our IP address is 10.0.0.2
6 b1 [0 K' V! o. J9 B0 LFilename 'uImage.bin'.
; |5 d) S# Q1 x+ Q4 jLoad address: 0xc0400000
! ]4 Z; @7 h$ X# b4 e; l. TLoading: #################################################################
, `3 c% W, u# Z# C% n: F         ###########################
/ \9 J8 c) {# |/ {* F  }) y& r         2 MiB/s
6 Y# j) k! e4 M. c4 ldone
* e: E2 C& n- T" s! L  }Bytes transferred = 1337888 (146a20 hex)
/ _* {6 g3 L$ [' l: k# ?. a# {1 _
stm32_eth_stop start4 \1 o5 y7 j3 x( p# l3 H& D
stm32_eth_stop end2 _4 d3 j& Q/ y4 I+ @3 z$ E0 L
U-Boot > tftp c0600000 discodtb.bin
/ U1 F# R$ N) D3 ^$ L. X! E' C+ ?/ X1 p0 s1 A' m
stm32_eth_stop start
  Q3 v8 i1 W* T+ q. {stm32_eth_stop end
2 R( ~* ^9 A! d( K* Q
! V" m. }  g# e% T# Xstm32_eth_start start( v% n" F; X( y6 ]( P; q
stm32_eth_start end
3 Z) L& Y, x( t( b) r& vUsing eth_stm32_eth device7 j% q- e# F3 @" O  X7 Y
TFTP from server 10.0.0.6; our IP address is 10.0.0.2' F3 f. f( ?( C% u9 F
Filename 'discodtb.bin'.( n1 D- b& `  }9 D/ a! F
Load address: 0xc06000004 g$ f8 C4 h- n; X3 C
Loading: ##
/ N* x/ `& L. b3 h# e. P: D         966.8 KiB/s4 m) _/ F. r& ^7 \$ X9 i
done, A/ q5 R' m1 v( }' F
Bytes transferred = 14858 (3a0a hex)
3 j% Q, X- b$ I( S% O1 z
% ?, n; I( {  V/ F; w  \! z2 Ostm32_eth_stop start& f% M: c5 p. ?; W
stm32_eth_stop end$ y% R& Z, m( r5 X
U-Boot > bootm c0400000 - c06000003 B* M" d% `5 |2 P) m, |( j
## Booting kernel from Legacy Image at c0400000 ...$ I; d+ i; Y" q8 r
   Image Name:   Linux-4.19.24
  Q1 B4 N7 c* }# [! M. Y4 r   Image Type:   ARM Linux Kernel Image (uncompressed)
$ O* V( ~0 n0 R, d5 W   Data Size:    1337824 Bytes = 1.3 MiB. \$ R9 W1 J1 \4 |7 D3 B; f
   Load Address: c00080001 U/ v* t$ E: Q$ d! K
   Entry Point:  c0008000; \) C9 ~. [0 |2 {& d4 T5 p# B
   Verifying Checksum ... OK4 P/ @3 S0 g/ c/ L4 E# |# _% l2 v, g) `
## Flattened Device Tree blob at c06000000 O. X/ [4 ]' [% b( U+ B
   Booting using the fdt blob at 0xc0600000
- q1 ?% P3 \% Q: |' ^   Loading Kernel Image ... OK8 }6 c$ ]* C2 g3 _9 X" t
   Loading Device Tree to c07c7000, end c07cda09 ... OK" Z- ?) i( f% x$ V/ V+ c$ I6 o
8 \: `+ N/ B  J/ [
Starting kernel ...8 \% v: H! t* f$ A; X; @: H

; ~5 L$ l9 M! z& q
stone-363407 回答时间:2018-11-25 11:03:43
eth 刚刚测试完成,只移植了UBOOT下的eth" B, W7 c% s7 f0 C& ?! r
" `0 t" H9 z1 W; y0 r! q; h
U-Boot 2018.09-rc2-g36b739b (Nov 25 2018 - 10:45:48 +0800)# c/ X: ~  [6 _. B8 G
& D! |9 a2 u: e+ p9 n% h
Model: STMicroelectronics STM32H743i-EVAL board
2 y& @  O+ V( e. Y" bDRAM:  32 MiB9 n5 d& j0 Z( A0 U
MMC:   STM32 SDMMC2: 0
% \/ Q. p6 P8 o6 h3 ^In:    serial@400110000 s# K) h$ \* d/ u% x
Out:   serial@40011000
  Z2 Q7 d% T" M/ M0 b% j/ KErr:   serial@40011000
( S1 k& d; X' |& y8 |5 m- YNet:   
, E, k1 }4 I2 g6 e" \* j, FWarning: ethernet@40028000 (eth0) using random MAC address - b6:1d:0e:15:99:e3
& y; K4 s" D/ R: Q9 g% _$ i0 ueth0: ethernet@400280002 {  J2 C: x: r! f8 f
Hit SPACE in 3 seconds to stop autoboot.- A! K+ v; D8 K$ m: {/ f) _& I
Card did not respond to voltage select!$ F* x/ Y0 U7 z3 |) U
U-Boot > tftpboot 0x60001000 192.168.1.103:u-boot.bin 3 Q8 z1 R6 d, N
ethernet@40028000 Waiting for PHY auto negotiation to complete... done
! x  ?3 K# a: c+ Q& b7 p*** ERROR: `ipaddr' not set
0 o$ S# U3 j+ r$ A% S$ y5 tU-Boot > set ipaddr 192.168.1.101;set serverip 192.168.1.1;set ethaddr d6:54:97:9f:9a:90;
% }  ~% w1 J, ?U-Boot > tftpboot 0x60001000 192.168.1.103:u-boot.bin
/ }& _0 z0 v/ N% x$ ^% N' j. w3 Y& Qethernet@40028000 Waiting for PHY auto negotiation to complete... done/ {" A( x- e( y  u# v) ?
Using ethernet@40028000 device4 w/ [+ r+ o7 Y/ G1 b$ g
TFTP from server 192.168.1.103; our IP address is 192.168.1.101/ \9 O. Y7 n8 Z  V
Filename 'u-boot.bin'.* I4 W! V) U# x/ v- L. y
Load address: 0x60001000, V: }+ \, N. i. N3 X' t6 ]* z3 N, A
Loading: ##################
; @# {& O4 Q& \1 e5 R( o1 N6 O         1.8 MiB/s8 E' w0 B  R3 M$ |
done
2 K, K3 K. f7 L7 U- T( {* vBytes transferred = 257336 (3ed38 hex)
3 \( [* I6 W+ x0 K* ?0 K3 k1 `U-Boot > cmp.b 60001000 8000000 3ed38 % t: A  j: P  Q1 [9 P
Total of 257336 byte(s) were the same# w+ {8 k  c5 _! o& k8 y: r

6 Y! O) a) o, J) S: B接下来看看kernel 咋能。
/ r' }* f1 O" v( p& Z' A  O$ [* }* ?
2 U& R; y! `1 K说下eth dma 最大的注意事项,就是cache dma  ram  一致性,  卡了好个晚上,对于这个一致性,没有多少经验,希望大家给点经验指导下。
mzy2364 回答时间:2018-11-22 15:43:47
赞,这个厉害
andey 回答时间:2018-11-22 16:45:58
提示: 作者被禁止或删除 内容自动屏蔽
stone-363407 回答时间:2018-12-7 16:12:46
另外附上 uboot 下SD卡的速度, T4 P/ I5 b" g# a" f- {
# D6 y0 W% g* Z* X1 H" k5 A
switch to partitions #0, OK
4 a" d8 }& x% |: jmmc0 is current device$ y  i# a$ X: J  V2 o  m
Scanning mmc 0:1...
. a" v7 b$ D; O9 E' SU-Boot > fatload mmc 0 60008000 uImage;fatload mmc 0 60800000 stm32h743i-eval.dtb
/ f& i8 k, t# |/ j( p1926672 bytes read in 19 ms (96.7 MiB/s)
. V7 G" n+ N: X6 m, Z8 m9370 bytes read in 2 ms (4.5 MiB/s)
. M! `' t& k; h* U; S5 AU-Boot >
STMWoodData 回答时间:2018-12-7 16:25:35
提示: 作者被禁止或删除 内容自动屏蔽
stone-363407 回答时间:2018-12-19 14:42:14
6#数据因为timer 不对所以数据不对 抱歉!!!
3111272 回答时间:2019-3-8 08:58:55
厉害厉害
stone-363407 回答时间:2019-3-12 21:14:54
yhangzzz 发表于 2019-3-7 20:20* |& B4 S3 j. [: X
楼主,您好,看了您的贴子,手头正好有一块stm32f746-disco 的板子,按照您的思路,移植了uboot2016.09,移 ...

* E) ]4 g4 O& b7 D  h* k6 m( O请查看串口定义部分 高版本内核串口的定义不一样 ttys0 具体看下驱动代码
stone-363407 回答时间:2019-3-12 21:53:59
本帖最后由 stone-363407 于 2019-3-12 21:57 编辑
+ n" ]6 \& d5 B* E4 ^7 m; h$ o
yhangzzz 发表于 2019-3-7 20:20
( i; C9 d+ O" C' i. s楼主,您好,看了您的贴子,手头正好有一块stm32f746-disco 的板子,按照您的思路,移植了uboot2016.09,移 ...

) ~0 l4 Z9 B. J1 L2 z看下这个如果你用的内核版本是这样
9 R, {  w* @  d+ a7 s/ ggit\linux-4.19.9\drivers\tty\serial\stm32-usart.h' l+ w6 T& G; H6 S

$ {; N3 I! Z+ S: k#define _SERIAL_NAME "ttySTM"
) A0 m, g. n$ ^# y; }! q' D& E/ [( }把这个    U-Boot > env set bootargs "root=/dev/ram console=ttyS0,115200 "
" C+ a$ }! G- j9 v$ `- T( M# Z  ]" C9 b, o* r) x/ s, e
( U3 C" @) ?+ O8 q) X* Y
改成这个
0 b0 F' H! y  |' |- V1 {
9 i- I1 t! g4 Y) V1 u' |

$ R/ _6 _+ M8 aenv set bootargs "root=/dev/ram console=ttySTM,115200 " ! @: T: g) e/ q% O1 Z2 i1 K( \
& g3 B9 w% f, }- V, j! o

* Q0 K1 n7 ?- C2 b& b( V' V' k) M
# m: u1 s( T& V# l0 z* S
这个STM工程师比较那个,我也被坑了,各种分析,内存BUFF分析 等等 我就像骂一句 mmp3 Q( j8 g+ `* B7 R
stary666 回答时间:2019-3-12 22:18:05
太牛了,,,,,,
yhangzzz 回答时间:2019-3-15 09:01:25
stone-363407 发表于 2019-3-12 21:53
$ Q4 Q" ?2 w$ W. R+ N: F  n看下这个如果你用的内核版本是这样
9 s. g; V1 {: N7 Jgit\linux-4.19.9\drivers\tty\serial\stm32-usart.h
% a& ?9 k. h" j
谢楼主啊,我回头试一下
yhangzzz 回答时间:2019-3-15 11:25:50
stone-363407 发表于 2019-3-12 21:53- a- P  _3 x1 o
看下这个如果你用的内核版本是这样9 [  l7 |, r$ Y* G6 b0 N/ f2 m
git\linux-4.19.9\drivers\tty\serial\stm32-usart.h

4 u- M8 K* `' X/ G, N. l6 e- m' j4 O5 E楼主您好,linux内核确实是你说的那样,但是改了uboot的bootargs后,仍然不能在启动内核后打印信息。。。stm的工程师看来是只管写不管有没有用啊。。。
12下一页

所属标签

相似分享

关于意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
招聘信息
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
关注我们
st-img 微信公众号
st-img 手机版