Firefly开源社区

打印 上一主题 下一主题

[Linux] RV1126 Debug改普通串口后,系统启动变慢。不知道哪里耗时了

81

积分

0

威望

0

贡献

技术小白

积分
81

RV1126 Debug改普通串口后,系统启动变慢。不知道哪里耗时了

发表于 2021-12-22 10:05:04      浏览:5649 | 回复:3        打印      只看该作者   [复制链接] 楼主
修改如下:
  内核配置中取消:[ ] FIQ Mode Serial Debugger
  设备树中:disable fiq_debugger。
                  
  1. &fiq_debugger {
  2.                 status = "disabled";        //okay改为disabled
  3.         };
复制代码

                   去掉console=ttyFIQ0
                  
  1.         chosen {
  2.                 bootargs = "earlycon=uart8250,mmio32,0xff570000 ro root=PARTLABEL=rootfs rootfstype=ext4 rootwait overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 cgroup_enable=memory swapaccount=1 snd_aloop.index=7";

  3. //console=ttyFIQ0
复制代码

                开启UART2
               
  1. &uart2 {
  2.                 dma-names = "tx", "rx";
  3.                 pinctrl-names = "default";
  4.                 pinctrl-0 = <&uart2m1_xfer>;
  5.                 status = "okay";
  6.         };
复制代码
回复

使用道具 举报

1万

积分

14

威望

13

贡献

管理员

Rank: 9Rank: 9Rank: 9

积分
11182

优秀版主

发表于 2021-12-22 10:52:03        只看该作者  沙发
耗时多长了?,板子上有两盏led 灯,你可以尝试在 uboot kernel rootfs 控制一下这两盏灯看看板子启动在哪里耗时长
回复

使用道具 举报

81

积分

0

威望

0

贡献

技术小白

积分
81
发表于 2021-12-22 11:00:20        只看该作者  板凳
板蓝根 发表于 2021-12-22 10:52
耗时多长了?,板子上有两盏led 灯,你可以尝试在 uboot kernel rootfs 控制一下这两盏灯看看板子启动在哪 ...

我做了一个点亮LED启动脚本,不修改调试串口的时候,从复位到启动9S。修改之后25S左右。

修改之后的启动日志如下
  1. DDR Version V1.05 20201214
  2. DDR4, 328MHz
  3. BW=32 Col=10 Bk=4 BG=2 CS0 Row=15 CS=1 Die BW=16 Size=1024MB
  4. change to: 328MHz
  5. change to: 528MHz
  6. change to: 784MHz
  7. change to: 924MHz(final freq)
  8. out
  9. U-Boot SPL board init
  10. U-Boot SPL 2017.09() (Dec 22 2021 - 09:53:44)
  11. unknown raw ID phN
  12. unrecognized JEDEC id bytes: 00, 00, 00
  13. Trying to boot from MMC2
  14. MMC error: The cmd index is 1, ret is -110
  15. Card did not respond to voltage select!
  16. mmc_init: -95, time 16
  17. spl: mmc init failed with error: -95
  18. Trying to boot from MMC1
  19. Magic is incorrect.
  20. Error validating A/B metadata from disk. Resetting and writing new A/B metadata to disk.
  21. SPL: A/B-slot: _a, successful: 0, tries-remain: 7
  22. ## Verified-boot: 0
  23. ## Checking optee 0x08400000 ... sha256+ OK
  24. ## Checking uboot 0x00400000 ... sha256+ OK
  25. ## Checking fdt 0x004b1cb0 ... sha256+ OK
  26. Jumping to U-Boot(0x00400000) via OP-TEE(0x08400000)
  27. Total: 206.324 ms

  28. I/TC:
  29. I/TC: cpu feature:0x0
  30. I/TC: cpu_st=0xe0
  31. I/TC: OP-TEE version: 3.6.0-319-g6aaba70b #36 Tue May 25 03:24:10 UTC 2021 arm
  32. I/TC: Next entry point address: 0x00400000
  33. I/TC: Initialized


  34. U-Boot 2017.09() (Dec 22 2021 - 09:53:44 +0800)

  35. Model: Rockchip RV1126 Evaluation Board
  36. PreSerial: 2, raw, 0xff570000
  37. DRAM:  1021.7 MiB
  38. Sysmem: init
  39. Relocation Offset: 00000000, fdt: 3bcf9a98
  40. Using default environment

  41. dwmmc@ffc50000: 0, dwmmc@ffc60000: 1
  42. Bootdev(atags): mmc 0
  43. MMC0: HS200, 200Mhz
  44. PartType: EFI
  45. boot mode: None
  46. DTB: rk-kernel.dtb
  47. FIT: no signed, no conf required
  48. HASH(c): OK
  49. I2c0 speed: 400000Hz
  50. PMIC:  RK8090 (on=0x14, off=0x00)
  51. vdd_npu_vepu 800000 uV
  52. vdd_arm 800000 uV
  53. io-domain: OK
  54. Can't get crtc id, default set to id = 0
  55. Model: Jinmuyu jmy942
  56. Rockchip UBOOT DRM driver version: v1.0.1
  57. Using display timing dts
  58. Detailed mode clock 70000 kHz, flags[a]
  59.     H: 0800 0980 0990 1000
  60.     V: 1280 1288 1292 1296
  61. bus_format: 1009
  62. final DSI-Link bandwidth: 500 Mbps x 4
  63. CLK: (sync kernel. arm: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
  64.   apll 816000 KHz
  65.   dpll 462000 KHz
  66.   gpll 1188000 KHz
  67.   cpll 500000 KHz
  68.   hpll 1400000 KHz
  69.   aclk_pdbus 500000 KHz
  70.   hclk_pdbus 198000 KHz
  71.   pclk_pdbus 99000 KHz
  72.   aclk_pdphp 297000 KHz
  73.   hclk_pdphp 198000 KHz
  74.   hclk_pdaudio 148500 KHz
  75.   hclk_pdcore 198000 KHz
  76.   pclk_pdpmu 99000 KHz
  77. Net:   eth0: ethernet@ffc40000
  78. Hit key to stop autoboot('CTRL+C'):  0
  79. ## Booting FIT Image at 0x3acf8c80 with size 0x00dfde00
  80. Fdt Ramdisk skip relocation
  81. ## Loading kernel from FIT Image at 3acf8c80 ...
  82.    Using 'conf' configuration
  83. optee api revision: 2.0
  84. TEEC: Waring: Could not find security partition
  85. ## Verified-boot: 0
  86.    Trying 'kernel' kernel subimage
  87.      Description:  unavailable
  88.      Type:         Kernel Image
  89.      Compression:  uncompressed
  90.      Data Start:   0x3ad11680
  91.      Data Size:    5409784 Bytes = 5.2 MiB
  92.      Architecture: ARM
  93.      OS:           Linux
  94.      Load Address: 0x02008000
  95.      Entry Point:  0x02008000
  96.      Hash algo:    sha256
  97.      Hash value:   97cf66c13093b892d4a88c308050cef0b2053c411f6c971122d09b80394f189d
  98.    Verifying Hash Integrity ... sha256+ OK
  99. ## Loading ramdisk from FIT Image at 3acf8c80 ...
  100.    Using 'conf' configuration
  101.    Trying 'ramdisk' ramdisk subimage
  102.      Description:  unavailable
  103.      Type:         RAMDisk Image
  104.      Compression:  uncompressed
  105.      Data Start:   0x3b23a280
  106.      Data Size:    9160505 Bytes = 8.7 MiB
  107.      Architecture: ARM
  108.      OS:           Linux
  109.      Load Address: 0x0a200000
  110.      Entry Point:  unavailable
  111.      Hash algo:    sha256
  112.      Hash value:   34c8dbec64a0c800281419dccd445b0b6ff60dcb9c431584b823cc4088347bde
  113.    Verifying Hash Integrity ... sha256+ OK
  114.    Loading ramdisk from 0x3b23a280 to 0x0a200000
  115. ## Loading fdt from FIT Image at 3acf8c80 ...
  116.    Using 'conf' configuration
  117.    Trying 'fdt' fdt subimage
  118.      Description:  unavailable
  119.      Type:         Flat Device Tree
  120.      Compression:  uncompressed
  121.      Data Start:   0x3acf9480
  122.      Data Size:    98597 Bytes = 96.3 KiB
  123.      Architecture: ARM
  124.      Load Address: 0x08300000
  125.      Hash algo:    sha256
  126.      Hash value:   74340bb788f7c6ab88c1e9c623303e5ec41898d656db40c42b56c00b769da475
  127.    Verifying Hash Integrity ... sha256+ OK
  128.    Loading fdt from 0x08300000 to 0x08300000
  129.    Booting using the fdt blob at 0x08300000
  130.    Loading Kernel Image from 0x3ad11680 to 0x02008000 ... OK
  131.   'reserved-memory' ramoops@8000000: addr=8000000 size=100000
  132.    Using Device Tree in place at 08300000, end 0831b124
  133. Adding bank: 0x00000000 - 0x08400000 (size: 0x08400000)
  134. Adding bank: 0x08648000 - 0x40000000 (size: 0x379b8000)
  135. Total: 1319.519 ms

  136. Starting kernel ...

  137. [    0.000000] Booting Linux on physical CPU 0xf00
  138. [    0.000000] Linux version 4.19.111 (root@ubuntu) () (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #2 SMP PREEMPT Fri Dec 17 15:13:55 CST 2021
  139. [    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
  140. [    0.000000] CPU: div instructions available: patching division code
  141. [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
  142. [    0.000000] OF: fdt: Machine model: Jinmuyu jmy942
  143. [    0.000000] earlycon: uart8250 at MMIO32 0xff570000 (options '')
  144. [    0.000000] bootconsole [uart8250] enabled
  145. [    0.000000] Memory policy: Data cache writealloc
  146. [    0.000000] Reserved memory: created CMA memory pool at 0x3f800000, size 8 MiB
  147. [    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
  148. [    0.000000] Reserved memory: created CMA memory pool at 0x2dc00000, size 256 MiB
  149. [    0.000000] OF: reserved mem: initialized node isp, compatible id shared-dma-pool
  150. [    0.000000] psci: probing for conduit method from DT.
  151. [    0.000000] psci: PSCIv1.0 detected in firmware.
  152. [    0.000000] psci: Using standard PSCI v0.2 function IDs
  153. [    0.000000] psci: MIGRATE_INFO_TYPE not supported.
  154. [    0.000000] psci: SMC Calling Convention v1.0
  155. [    0.000000] percpu: Embedded 15 pages/cpu s31436 r8192 d21812 u61440
  156. [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 259512
  157. [    0.000000] Kernel command line: user_debug=31 storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal  ro rootwait earlycon=uart8250,mmio32,0xff570000 root=PARTLABEL=rootfs rootfstype=ext4 overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 cgroup_enable=memory swapaccount=1 snd_aloop.index=7
  158. [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
  159. [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
  160. [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
  161. [    0.000000] Memory: 743188K/1046240K available (7168K kernel code, 258K rwdata, 1688K rodata, 1024K init, 906K bss, 32716K reserved, 270336K cma-reserved, 0K highmem)
  162. [    0.000000] Virtual kernel memory layout:
  163. [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
  164. [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
  165. [    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
  166. [    0.000000]     lowmem  : 0xb0000000 - 0xf0000000   (1024 MB)
  167. [    0.000000]     pkmap   : 0xafe00000 - 0xb0000000   (   2 MB)
  168. [    0.000000]     modules : 0xaf000000 - 0xafe00000   (  14 MB)
  169. [    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (8160 kB)
  170. [    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
  171. [    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 259 kB)
  172. [    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 907 kB)
  173. [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
  174. [    0.000000] rcu: Preemptible hierarchical RCU implementation.
  175. [    0.000000]  Tasks RCU enabled.
  176. [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
  177. [    0.000000] random: random: get_random_bytes called from start_kernel+0x328/0x4a8 with crng_init=0
  178. [    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
  179. [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
  180. [    0.000009] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
  181. [    0.008054] Switching to timer-based delay loop, resolution 41ns
  182. [    0.015388] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=80000)
  183. [    0.025706] pid_max: default: 4096 minimum: 301
  184. [    0.030486] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
  185. [    0.037167] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
  186. [    0.045224] CPU: Testing write buffer coherency: ok
  187. [    0.050968] /cpus/cpu@f00 missing clock-frequency property
  188. [    0.056943] /cpus/cpu@f01 missing clock-frequency property
  189. [    0.062494] /cpus/cpu@f02 missing clock-frequency property
  190. [    0.068079] /cpus/cpu@f03 missing clock-frequency property
  191. [    0.073683] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
  192. [    0.080195] Setting up static identity map for 0x100000 - 0x100060
  193. [    0.086665] rcu: Hierarchical SRCU implementation.
  194. [    0.092362] smp: Bringing up secondary CPUs ...
  195. [    0.097867] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
  196. [    0.098869] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
  197. [    0.099808] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
  198. [    0.099941] smp: Brought up 1 node, 4 CPUs
  199. [    0.122250] SMP: Total of 4 processors activated (192.00 BogoMIPS).
  200. [    0.128648] CPU: All CPU(s) started in SVC mode.
  201. [    0.134063] devtmpfs: initialized
  202. [    0.164171] Unpacking initramfs...
  203. [    0.171791] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
  204. [    0.180725] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns
  205. [    0.191367] futex hash table entries: 16 (order: -2, 1024 bytes)
  206. [    0.198040] pinctrl core: initialized pinctrl subsystem
  207. [    0.204978] NET: Registered protocol family 16
  208. [    0.210468] DMA: preallocated 256 KiB pool for atomic coherent allocations
  209. [    0.220369] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
  210. [    0.229121] hw-breakpoint: maximum watchpoint size is 8 bytes.
  211. [    0.237703] console [pstore0] enabled
  212. [    0.241982] pstore: Registered ramoops as persistent store backend
  213. [    0.248752] ramoops: attached 0x100000@0x8000000, ecc: 0/0
  214. [    0.296860] cryptd: max_cpu_qlen set to 1000
  215. [    0.302164] rockchip-pm rockchip-suspend: not set pwm-regulator-config
  216. [    0.314784] rk_iommu ffb00f00.iommu: version = 1
  217. [    0.320509] rk_iommu ffb90800.iommu: version = 1
  218. [    0.326661] SCSI subsystem initialized
  219. [    0.331089] usbcore: registered new interface driver usbfs
  220. [    0.337063] usbcore: registered new interface driver hub
  221. [    0.343108] usbcore: registered new device driver usb
  222. [    0.348772] pps_core: LinuxPPS API ver. 1 registered
  223. [    0.354177] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
  224. [    0.364184] PTP clock support registered
  225. [    0.370748] rockchip-cpuinfo cpuinfo: SoC            : 11260000
  226. [    0.376247] rockchip-cpuinfo cpuinfo: Serial         : bd3159cb2b2adb77
  227. [    0.383780] clocksource: Switched to clocksource arch_sys_counter
  228. [    0.392919] NET: Registered protocol family 2
  229. [    0.398691] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
  230. [    0.407124] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
  231. [    0.414952] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
  232. [    0.422165] TCP: Hash tables configured (established 8192 bind 8192)
  233. [    0.429232] UDP hash table entries: 512 (order: 2, 16384 bytes)
  234. [    0.435720] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
  235. [    0.442922] NET: Registered protocol family 1
  236. [    0.448381] RPC: Registered named UNIX socket transport module.
  237. [    0.454809] RPC: Registered udp transport module.
  238. [    0.459993] RPC: Registered tcp transport module.
  239. [    0.465101] RPC: Registered tcp NFSv4.1 backchannel transport module.
  240. [    0.473398] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
  241. [    0.484969] Initialise system trusted keyrings
  242. [    0.490134] workingset: timestamp_bits=29 max_order=18 bucket_order=0
  243. [    0.505205] squashfs: version 4.0 (2009/01/31) Phillip Lougher
  244. [    0.512464] NFS: Registering the id_resolver key type
  245. [    0.518042] Key type id_resolver registered
  246. [    0.522629] Key type id_legacy registered
  247. [    0.527038] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
  248. [    0.534338] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
  249. [    0.545109] Key type asymmetric registered
  250. [    0.549632] Asymmetric key parser 'x509' registered
  251. [    0.555017] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
  252. [    0.563105] io scheduler noop registered
  253. [    0.567398] io scheduler deadline registered
  254. [    0.572073] io scheduler cfq registered (default)
  255. [    0.577241] io scheduler mq-deadline registered
  256. [    0.582202] io scheduler kyber registered
  257. [    0.586747] io scheduler bfq registered
  258. [    0.594244] phy phy-ff4c0000.usb2-phy.1: Linked as a consumer to regulator.5
  259. [    0.604218] phy phy-ff4c8000.usb2-phy.2: Linked as a consumer to regulator.4
  260. [    0.615819] pwm-backlight backlight: backlight supply power not found, using dummy regulator
  261. [    0.625040] pwm-backlight backlight: Linked as a consumer to regulator.0
  262. [    0.632767] mpp_service mpp-srv: unknown mpp version for missing VCS info
  263. [    0.640188] mpp_service mpp-srv: probe start
  264. [    0.646369] iommu: Adding device ffb90400.vdpu to group 1
  265. [    0.652351] mpp_vdpu2 ffb90400.vdpu: Linked as a consumer to ffb90800.iommu
  266. [    0.660083] mpp_vdpu2 ffb90400.vdpu: probe device
  267. [    0.665849] mpp_vdpu2 ffb90400.vdpu: reset_group->rw_sem_on=0
  268. [    0.672192] mpp_vdpu2 ffb90400.vdpu: reset_group->rw_sem_on=0
  269. [    0.678757] mpp_vdpu2 ffb90400.vdpu: probing finish
  270. [    0.684749] iommu: Adding device ffb90000.vepu to group 1
  271. [    0.690638] mpp_vepu2 ffb90000.vepu: Linked as a consumer to ffb90800.iommu
  272. [    0.698320] mpp_vepu2 ffb90000.vepu: probe device
  273. [    0.704053] mpp_vepu2 ffb90000.vepu: reset_group->rw_sem_on=0
  274. [    0.710355] mpp_vepu2 ffb90000.vepu: reset_group->rw_sem_on=0
  275. [    0.716923] mpp_vepu2 ffb90000.vepu: probing finish
  276. [    0.722831] mpp_service mpp-srv: probe success
  277. [    0.732837] dma-pl330 ff4e0000.dma-controller: Loaded driver for PL330 DMAC-241330
  278. [    0.741124] dma-pl330 ff4e0000.dma-controller:       DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
  279. [    0.753464] rockchip-system-monitor rockchip-system-monitor: system monitor probe
  280. [    0.762601] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
  281. [    0.770527] ff410000.serial: ttyS1 at MMIO 0xff410000 (irq = 30, base_baud = 1500000) is a 16550A
  282. [    0.781174] ff560000.serial: ttyS0 at MMIO 0xff560000 (irq = 32, base_baud = 1500000) is a 16550A
  283. [    0.791235] console [ttyS0] enabled
  284. [    0.836840] bootconsole [uart8250] disabled

复制代码
回复

使用道具 举报

81

积分

0

威望

0

贡献

技术小白

积分
81
发表于 2021-12-22 11:14:06        只看该作者  地板
板蓝根 发表于 2021-12-22 10:52
耗时多长了?,板子上有两盏led 灯,你可以尝试在 uboot kernel rootfs 控制一下这两盏灯看看板子启动在哪 ...

我在rcS文件中添加点灯脚本。
  1. #!/bin/sh


  2. # Start all init scripts in /etc/init.d
  3. # executing them in numerical order.
  4. #
  5. `echo 1 > /sys/devices/platform/leds/leds/jmy\:led1/brightness`      #-----   耗时20S

  6. for i in /etc/init.d/S??* ;do

  7.      # Ignore dangling symlinks (if any).
  8.      [ ! -f "$i" ] && continue

  9.      case "$i" in
  10.         *.sh)
  11.             # Source shell script for speed.
  12.             (
  13.                 trap - INT QUIT TSTP
  14.                 set start
  15.                 . $i
  16.             )
  17.             ;;
  18.         *)
  19.             # No sh extension, so fork subprocess.
  20.             $i start
  21.             ;;
  22.     esac
  23. done

  24. `echo 1 > /sys/devices/platform/leds/leds/jmy\:led2/brightness`    #-----   耗时23S
  25. ifconfig eth0 192.168.0.126
  26. route add default gw 192.168.0.1

  27. ./test.sh
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表