惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Proofpoint News Feed
G
GRAHAM CLULEY
V
Vulnerabilities – Threatpost
Security Latest
Security Latest
Scott Helme
Scott Helme
S
Securelist
美团技术团队
T
Threat Research - Cisco Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
W
WeLiveSecurity
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
AI
AI
L
Lohrmann on Cybersecurity
S
Security Affairs
Cloudbric
Cloudbric
SecWiki News
SecWiki News
爱范儿
爱范儿
雷峰网
雷峰网
Engineering at Meta
Engineering at Meta
C
Cyber Attacks, Cyber Crime and Cyber Security
大猫的无限游戏
大猫的无限游戏
N
News and Events Feed by Topic
I
InfoQ
S
Secure Thoughts
AWS News Blog
AWS News Blog
A
About on SuperTechFans
Schneier on Security
Schneier on Security
酷 壳 – CoolShell
酷 壳 – CoolShell
The Last Watchdog
The Last Watchdog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Check Point Blog
P
Palo Alto Networks Blog
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Google DeepMind News
Google DeepMind News
Latest news
Latest news
I
Intezer
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
V2EX
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LangChain Blog
D
Docker

博客园 - 靖意风

使用QT 将可执行程序 进行打包 对使用的屏幕的整理 对mmc 设备进行分区 nmcli 设置网络配置 虚拟机下 安装 ubuntu 18.04 硬件基础知识__串口 字节对齐问题和 小端格式 在ubuntu下 编译23位的测试文件 31_了解 x6818开发板是 如何使用/dev/ttySAC0 进行打印log 10_linux dirver platform 框架 ubuntu24.04.02 下安装软件 记录 ubuntu 更新源 vmware 虚拟机的三种网卡 vmware 安装 ubuntu 24.04.02 07_linux 字符设备了解 04_kernel编程框架和 printk传参 05_使用linux内核的gpio库函数 03_uboot 命令整理 01_stm32 裸板程序 01_了解嵌入式开发
开发板启动时间优化
靖意风 · 2026-01-18 · via 博客园 - 靖意风

1. 查看启动log,分析处理时间长的信息,如下是优化前的log

[    5.617156] Run /init as init process
chmod: /lib32/*: No such file or directory
[    5.686178] ubi2: attaching mtd2
[    9.176987] ubi2: scanning is finished
[    9.194554] ubi2: attached mtd2 (name "sdcard", size 384 MiB)
[    9.200413] ubi2: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    9.207305] ubi2: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    9.214108] ubi2: VID header offset: 2048 (aligned 2048), data offset: 4096
[    9.221084] ubi2: good PEBs: 3072, bad PEBs: 0, corrupted PEBs: 0
[    9.227191] ubi2: user volume: 1, internal volumes: 1, max. volumes count: 128
[    9.234434] ubi2: max/mean erase counter: 7/4, WL threshold: 4096, image sequence number: 194771927
[    9.243494] ubi2: available PEBs: 873, total reserved PEBs: 2199, PEBs reserved for bad PEB handling: 80
[    9.253011] ubi2: background thread "ubi_bgt2d" started, PID 124
[    9.257213] UBIFS (ubi2:0): Mounting in unauthenticated mode
[    9.264962] UBIFS (ubi2:0): background thread "ubifs_bgt2_0" started, PID 126
[    9.312552] UBIFS (ubi2:0): recovery needed
[    9.488160] UBIFS (ubi2:0): recovery completed
[    9.492791] UBIFS (ubi2:0): UBIFS: mounted UBI device 2, volume 0, name "nvrp1"
[    9.500134] UBIFS (ubi2:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    9.510065] UBIFS (ubi2:0): FS size: 266903552 bytes (254 MiB, 2102 LEBs), journal size 13332480 bytes (12 MiB, 105 LEBs)
[    9.521035] UBIFS (ubi2:0): reserved for root: 4952683 bytes (4836 KiB)
[    9.527668] UBIFS (ubi2:0): media format: w5/r0 (latest is w5/r0), UUID 4C9F6979-6593-4869-B2F5-7A40518C5172, small LPT model
Running sysctl: OK
[    9.569713] random: sshd: uninitialized urandom read (32 bytes read)
[    9.685180] sshd (140): /proc/140/oom_adj is deprecated, please use /proc/140/oom_score_adj instead.
rmmod: remove 'sdk_linuxum': No such file or directory
[   13.487545] sdk_linuxum: loading out-of-tree module taints kernel.
[   13.501830] [Kernel: hal_ki_device_chip_id_get - 1209] GET PCI bus num: 65535
[   13.509011] [Kernel: hal_ki_device_chip_id_get - 1236] PCI bus num: 65535, chip_id: 0
[   13.516924] [Kernel: hal_ki_axi_init - 1587] Found chip, name linux-kernel-device0, vendor 0x1619, device 0x2025

1> 发现 attach mtd2 用了3.5秒;2> sshd 的时间较长

然后分析发现 mtd2  分区是325M,创建的卷是256MB, 实际上 该分区只需要 50MB的卷就可以了; 然后查看rcS文件,发现sshd 启动之后又 sleep了2秒

修改之后

[    5.695666] ubi2: attaching mtd2
[    6.282209] ubi2: scanning is finished
[    6.296197] ubi2: attached mtd2 (name "sdcard", size 64 MiB)
[    6.301887] ubi2: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    6.308778] ubi2: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    6.315580] ubi2: VID header offset: 2048 (aligned 2048), data offset: 4096
[    6.322554] ubi2: good PEBs: 512, bad PEBs: 0, corrupted PEBs: 0
[    6.328574] ubi2: user volume: 1, internal volumes: 1, max. volumes count: 128
[    6.335813] ubi2: max/mean erase counter: 8/3, WL threshold: 4096, image sequence number: 679267095
[    6.344873] ubi2: available PEBs: 15, total reserved PEBs: 497, PEBs reserved for bad PEB handling: 80
[    6.354215] ubi2: background thread "ubi_bgt2d" started, PID 123
[    6.358268] UBIFS (ubi2:0): Mounting in unauthenticated mode
[    6.366191] UBIFS (ubi2:0): background thread "ubifs_bgt2_0" started, PID 125
[    6.414243] UBIFS (ubi2:0): recovery needed
[    6.559462] UBIFS (ubi2:0): recovery completed
[    6.564072] UBIFS (ubi2:0): UBIFS: mounted UBI device 2, volume 0, name "nvrp1"
[    6.571402] UBIFS (ubi2:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    6.581336] UBIFS (ubi2:0): FS size: 51171328 bytes (48 MiB, 403 LEBs), journal size 2539520 bytes (2 MiB, 20 LEBs)
[    6.591784] UBIFS (ubi2:0): reserved for root: 2416947 bytes (2360 KiB)
[    6.598417] UBIFS (ubi2:0): media format: w5/r0 (latest is w5/r0), UUID A867C717-017F-4254-9A6D-B1D41C6DB060, small LPT model
/dev/ubi2_0 do exist, so do nothing
Running sysctl: OK