本帖最后由 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 U-Boot 2018.09-rc2-gc16d658 (Dec 06 2018 - 16:00:30 +0800) Model: STMicroelectronics STM32H743i-EVAL board1 Q8 m7 t6 L# @8 O- T DRAM: 32 MiB MMC: STM32 SDMMC2: 0 In: serial@40011000 Out: serial@40011000 Err: serial@40011000 Net: ' 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 Hit SPACE in 3 seconds to stop autoboot.! |% j3 S$ F/ G2 J switch to partitions #0, OK mmc0 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 " 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 Filename 'uImage'.4 _ b; {8 G: k& ^ Load address: 0x61000000 Loading: ################################################################# #################################################################4 F5 L' U0 Z M ########## H- p7 E g* S 1.4 MiB/s8 l& k* V! T' P0 v done Bytes transferred = 2048568 (1f4238 hex)8 A: L3 n2 N, ~# H ethernet@40028000 Waiting for PHY auto negotiation to complete. done Using ethernet@40028000 device6 R) {: |7 Y3 {* A4 @ J TFTP from server 192.168.10.25; our IP address is 192.168.10.22 Filename 'stm32h743i-eval.dtb'. Load address: 0x61300000 Loading: #5 g L e& [' s/ c8 a8 N% G 999 KiB/s5 u r G( |1 r8 Z done 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 Entry Point: 61000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 61300000, w8 d' J7 k/ R+ F S: S Booting using the fdt blob at 0x61300000 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/ } Starting kernel ... / o4 ~4 j8 R# n 4 O) Q1 `& v4 O [ 0.000000] Booting Linux on physical CPU 0x0 [ 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 [ 0.000000] CPU: ARMv7-M [411fc271] revision 1 (ARMv7M), cr=00000000 [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache [ 0.000000] OF: fdt: Machine model: STMicroelectronics STM32H743i-EVAL board [ 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 [ 0.000000] Using ARMv7 PMSA Compliant MPU. Region independence: No, Used 2 of 16 regions [ 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 [ 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 [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*327680 t [% l1 f& T* m9 k [ 0.000000] pcpu-alloc: [0] 0 [ 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 [ 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) [ 0.000000] Memory: 13080K/16384K available (1596K kernel code, 154K rwdata, 496K rodata, 632K init, 130K bss, 3304K reserved, 0K cma-reserved) [ 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) [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (1597 kB) [ 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) [ 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. [ 0.000000] Tasks RCU enabled. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] clocksource: arm_system_timer: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 18664651 ns [ 0.000000] ARM System timer initialized as clocksource [ 0.000000] /soc/timer@40000c00: STM32 clockevent driver initialized (32 bits) [ 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) [ 0.100000] pid_max: default: 4096 minimum: 301 [ 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) [ 0.100000] Hierarchical SRCU implementation. [ 0.100000] devtmpfs: initialized [ 0.110000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.110000] pinctrl core: initialized pinctrl subsystem4 O( V9 u" x3 Y5 } [ 0.110000] DMA: default coherent area is set [ 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 [ 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 [ 0.130000] stm32h743-pinctrl soc:pin-controller: GPIOD bank added [ 0.130000] stm32h743-pinctrl soc:pin-controller: GPIOE bank added [ 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 [ 0.140000] stm32h743-pinctrl soc:pin-controller: GPIOH bank added [ 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 [ 0.140000] stm32h743-pinctrl soc:pin-controller: Pinctrl STM32 initialized [ 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 [ 0.160000] clocksource: Switched to clocksource arm_system_timer# W1 r' h8 I3 s8 J6 j/ U [ 0.170000] NET: Registered protocol family 2 [ 0.170000] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [ 0.170000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.170000] TCP: Hash tables configured (established 1024 bind 1024) [ 0.170000] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 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 [ 0.360000] workingset: timestamp_bits=30 max_order=12 bucket_order=0 [ 0.380000] random: fast init done, j2 t5 B- o( F [ 0.400000] io scheduler noop registered [ 0.400000] io scheduler deadline registered [ 0.400000] io scheduler cfq registered (default) [ 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 [ 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 [ 0.860000] stm32-usart 40011000.serial: interrupt mode used for rx (no dma) [ 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 [ 0.890000] tun: Universal TUN/TAP device driver, 1.6 [ 0.890000] stm32-dwmac 40028000.ethernet: Found phy-handle subnode [ 0.900000] stm32-dwmac 40028000.ethernet: Found MDIO subnode [ 0.910000] stm32-dwmac 40028000.ethernet: use snps,dwmac-4.00.. [ 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 [ 0.930000] stmmac - user ID: 0x30, Synopsys ID: 0x41 [ 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 [ 0.950000] stm32-dwmac 40028000.ethernet: Wake-Up On Lan supported [ 0.950000] stm32-dwmac 40028000.ethernet: TSO supported [ 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 [ 1.080000] libphy: stmmac: probed [ 1.090000] stm32-dwmac 40028000.ethernet: register the MDIO bus [ 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 [ 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. can'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' ~ # 6 r( ]; J3 R' @# v |
cpu 400Mhz sdram 100mhz cas=2
测试软件:iperf3 9 R: F2 H. R3 u1 I C
系统跑了25个线程测试速度如下。。。。没有原子裸奔的那个快............
65.8 Mbits/sec( E/ x. D- G8 M3 o- P% r/ P. c6 o$ C
~ # cat /proc/cpuinfo
processor : 0) f6 f$ U& H9 ]( Q
model name : ARMv7-M rev 1 (v7ml)# @- X5 q3 `. W" E2 n1 L, Y3 K
BogoMIPS : 795.44
Features : half thumb fastmult edsp idivt 3 _- x6 D# U* q1 ?2 p ^
CPU implementer : 0x41' i! G- T/ ]3 |' @/ d
CPU architecture: 7M
CPU variant : 0x1
CPU part : 0xc27
CPU revision : 13 a$ M' }" O7 x5 U$ Z6 t. w
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
Connecting to host 192.168.10.26, port 5201
[ 4] local 192.168.10.22 port 41328 connected to 192.168.10.26 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 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
[ 4] 8.16-9.02 sec 6.86 MBytes 66.5 Mbits/sec 0 191 KBytes
[ 4] 9.02-10.13 sec 8.73 MBytes 65.9 Mbits/sec 0 191 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -/ s: Z8 S t; y
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.13 sec 79.4 MBytes 65.8 Mbits/sec 0 sender
[ 4] 0.00-10.13 sec 79.4 MBytes 65.8 Mbits/sec receiver$ S: r7 B5 M2 N7 w$ X7 }
iperf Done.$ W: ]& [6 R# ] E) G% x% k8 c
~ # ps
PID USER VSZ STAT COMMAND
1 root 400 S init
2 root 0 SW [kthreadd]' F1 p9 ~( n% k1 s& n- {+ h- E( p
4 root 0 IW< [kworker/0:0H]
6 root 0 IW< [mm_percpu_wq]
7 root 0 SW [ksoftirqd/0]. i5 j$ a3 q" f: j
8 root 0 IW [rcu_preempt]
9 root 0 IW [rcu_sched]
10 root 0 IW [rcu_bh]
11 root 0 SW [kdevtmpfs]
12 root 0 SW [rcu_tasks_kthre]! O4 P& {. ]$ m k( d7 k
14 root 0 IW< [writeback]
15 root 0 IW< [crypto]
16 root 0 IW< [kblockd]+ X/ @6 u7 g2 G8 z
17 root 0 IW< [watchdogd]
18 root 0 SW [kswapd0]: }" p9 F5 N2 Q: z7 f4 t% m
41 root 0 SW [irq/17-40011000]
59 root 420 S -sh% n. j1 I: l; I2 [
60 root 0 IW [kworker/u2:1]
61 root 0 IW [kworker/u2:2]. v2 v: r" T3 {: Q( I. R
64 root 0 IW [kworker/0:2]
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
楼主,您好,看了您的贴子,手头正好有一块stm32f746-disco 的板子,按照您的思路,移植了uboot2016.09,移植了uboot eth驱动,因为没有移植MMC驱动,就打算把linux内核加载在SDRAM上,再从SDRAM启动内核;使用的是linux4.19.24默认的stm32配置,但是现在一直卡在“Starting kernel ...”,内核应该是没有起来;不知道您调试过程中是否遇到这个问题。附上打印的信息:
U-Boot 2016.09-g83ec55b-dirty (Feb 22 2019 - 18:30:58 +0800)
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
Err: serial_stm32x7
Net:
stm32 eth probe start
stm32 eth probe end1 N7 H# B8 Z& x
stm32_read_rom_hwaddr$ O6 B/ e# ~! ?1 A! R5 t
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
Hit SPACE in 3 seconds to stop autoboot.% c5 W- i- r2 ]# {4 N: e& L. b `
U-Boot > set ipaddr 10.0.0.2
U-Boot > set serverip 10.0.0.67 \ z( r4 B+ t. a
U-Boot > tftp c0400000 uImage.bin
stm32_eth_stop start
stm32_eth_stop end
stm32_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
Filename 'uImage.bin'.
Load address: 0xc0400000
Loading: #################################################################
###########################
2 MiB/s
done
Bytes transferred = 1337888 (146a20 hex)
' 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
+ ?/ X1 p0 s1 A' m
stm32_eth_stop start
stm32_eth_stop end
stm32_eth_start start( v% n" F; X( y6 ]( P; q
stm32_eth_start end
Using 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: ##
966.8 KiB/s4 m) _/ F. r& ^7 \$ X9 i
done, A/ q5 R' m1 v( }' F
Bytes transferred = 14858 (3a0a hex)
stm32_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
Image Type: ARM Linux Kernel Image (uncompressed)
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
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
" `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
DRAM: 32 MiB9 n5 d& j0 Z( A0 U
MMC: STM32 SDMMC2: 0
In: serial@400110000 s# K) h$ \* d/ u% x
Out: serial@40011000
Err: serial@40011000
Net:
Warning: ethernet@40028000 (eth0) using random MAC address - b6:1d:0e:15:99:e3
eth0: 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
*** ERROR: `ipaddr' not set
U-Boot > set ipaddr 192.168.1.101;set serverip 192.168.1.1;set ethaddr d6:54:97:9f:9a:90;
U-Boot > tftpboot 0x60001000 192.168.1.103:u-boot.bin
ethernet@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: ##################
1.8 MiB/s8 E' w0 B R3 M$ |
done
Bytes transferred = 257336 (3ed38 hex)
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
接下来看看kernel 咋能。
说下eth dma 最大的注意事项,就是cache dma ram 一致性, 卡了好个晚上,对于这个一致性,没有多少经验,希望大家给点经验指导下。
# D6 y0 W% g* Z* X1 H" k5 A
switch to partitions #0, OK
mmc0 is current device$ y i# a$ X: J V2 o m
Scanning mmc 0:1...
U-Boot > fatload mmc 0 60008000 uImage;fatload mmc 0 60800000 stm32h743i-eval.dtb
1926672 bytes read in 19 ms (96.7 MiB/s)
9370 bytes read in 2 ms (4.5 MiB/s)
U-Boot >
请查看串口定义部分 高版本内核串口的定义不一样 ttys0 具体看下驱动代码
看下这个如果你用的内核版本是这样
git\linux-4.19.9\drivers\tty\serial\stm32-usart.h' l+ w6 T& G; H6 S
#define _SERIAL_NAME "ttySTM"
把这个 U-Boot > env set bootargs "root=/dev/ram console=ttyS0,115200 "
# Z ]" C9 b, o* r) x/ s, e
( U3 C" @) ?+ O8 q) X* Y
改成这个
env set bootargs "root=/dev/ram console=ttySTM,115200 " ! @: T: g) e/ q% O1 Z2 i1 K( \
& g3 B9 w% f, }- V, j! o
# m: u1 s( T& V# l0 z* S
这个STM工程师比较那个,我也被坑了,各种分析,内存BUFF分析 等等 我就像骂一句 mmp3 Q( j8 g+ `* B7 R
谢楼主啊,我回头试一下
楼主您好,linux内核确实是你说的那样,但是改了uboot的bootargs后,仍然不能在启动内核后打印信息。。。stm的工程师看来是只管写不管有没有用啊。。。