Vim3 server版启动速度优化方法

启动接近40秒,太慢了,请教一下有没有什么优化方法,能10秒内启动。

fiddle with systemctl

  • set default target multiuser
  • mask networkmanager during boot
    should reduce around 10sec
1 Like

@eaglet 首先源码是开放的,你可以自行修改。你可以删减一些你觉得不需要的驱动。但是你要求在10S之内,ubuntu系统是不大可能做到的。你可以试一下buildroot

1 Like

谢谢回复。我也有在尝试删减驱动,但发现uboot启动就要5s

## Loading init Ramdisk from Legacy Image at 13000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    8764725 Bytes = 8.4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
   reserving fdt memory region: addr=1000000 size=16000
   Loading Ramdisk to 735d3000, end 73e2ed35 ... OK
   Loading Device Tree to 000000001ffe7000, end 000000001fffffff ... OK

Starting kernel ...

uboot time: 5174541 us #这里显示5秒

还有好多处卡着很久,不知道应该怎么改动,如此处卡4秒

Jan 12 06:25:38 localhost kernel: [   23.256421@3] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jan 12 06:25:42 localhost kernel: [   27.345681@0] nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based  firewall rule not found. Use the iptables CT target to attach helpers instead.

此处卡5秒

Jan 12 06:25:45 localhost kernel: [   30.366995@0] meson_uart ffd24000.serial: ttyS1 use xtal(24M) 24000000 change 115200 to 2000000
Jan 12 06:25:50 localhost kernel: [   35.160148@0] fb: osd_release now.index=3,open_count=1

没办法的话,我后面尝试研究一下buildroot。

请问一下,这个buildroot编译出来的固件如何烧到板子上?

@eaglet output/mesong12b_xxx_release/images/aml_upgrade_package.img这个就是你编译出来的buildroot镜像。同样适用我们usb烧录工具,参考文档烧录即可。

1 Like