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

推荐订阅源

N
News and Events Feed by Topic
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
T
Threat Research - Cisco Blogs
Cloudbric
Cloudbric
Recent Commits to openclaw:main
Recent Commits to openclaw:main
I
Intezer
Attack and Defense Labs
Attack and Defense Labs
P
Privacy International News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
Lohrmann on Cybersecurity
C
Cybersecurity and Infrastructure Security Agency CISA
V2EX - 技术
V2EX - 技术
AWS News Blog
AWS News Blog
O
OpenAI News
L
LINUX DO - 最新话题
N
News | PayPal Newsroom
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
Latest news
Latest news
D
Darknet – Hacking Tools, Hacker News & Cyber Security
A
Arctic Wolf
Spread Privacy
Spread Privacy
G
GRAHAM CLULEY
T
Tor Project blog
博客园_首页
Know Your Adversary
Know Your Adversary
有赞技术团队
有赞技术团队
S
Secure Thoughts
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
T
Tailwind CSS Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Visual Studio Blog
J
Java Code Geeks
Cisco Talos Blog
Cisco Talos Blog
Schneier on Security
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security Affairs
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
宝玉的分享
宝玉的分享
量子位
Last Week in AI
Last Week in AI
月光博客
月光博客
罗磊的独立博客
S
SegmentFault 最新的问题

博客园 - 靖意风

使用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