首页 > 解决方案 > Raspberry pi 4 - 具有自定义 GUI 界面和快速启动速度

问题描述

我正在尝试在 Raspberry Pi 4 上实现这一目标:

我已经尝试使用编辑 /boot/config.txt

# Disable the rainbow splash screen
disable_splash=1
# Disable bluetooth
dtoverlay=pi3-disable-bt
#Disable Wifi
dtoverlay=pi3-disable-wifi
dtoverlay=sdtweak,overclock_50=100
# Set the bootloader delay to 0 seconds. The default is 1s if not specified.
boot_delay=0
# Overclock the raspberry pi. This voids its warranty. Make sure you have a good power supply.
force_turbo=1

此外,我有一个 A2 类 10 SdCard,并且我已经禁用了几乎所有我不需要的服务。

我最好的结果是 14 秒的启动时间,直到我的应用程序启动,但我需要让它更快......

我想在速度方面实现这样的目标,但使用 GTK,而不是 QT: https ://www.youtube.com/watch?v=TTcP3xeLrEY

标签: linuxraspberry-piembedded-linux

解决方案


我目前也在尝试使用我的 Raspberry Pi 4 来实现快速启动时间,但如果没有诸如 buildroot 或 unikernel 之类的激进解决方案,我就无法突破 10 秒。

您的系统需要什么?在 Raspbian 上,您可以使用这两个命令来验证导致启动过程变慢的原因:

systemd-analyze critical-chain

 systemd-analyze blame

关键链将以红色显示阻止启动的服务。在我的设置中,我可以停用所有这些服务:

 hciuart #GPIOs
 nmbd    
 smbd
 wpa_supplicant
 systemd-timesyncd
 rpi-eeprom-update.service
 raspi-config.service
 networking

只需使用sudo systemctl disable SERVICE,我想还有其他对您的应用程序不重要的。此外,您可以在 /boot 的 cmdline.txt 文件中添加quiet fastboot,这将进一步减少启动时间


推荐阅读