linux - Raspberry pi 4 - 具有自定义 GUI 界面和快速启动速度
问题描述
我正在尝试在 Raspberry Pi 4 上实现这一目标:
- 不到 10 秒的启动时间
- 自定义 UI(例如使用 python/Gtk 构建)
我已经尝试使用编辑 /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
解决方案
我目前也在尝试使用我的 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
,这将进一步减少启动时间
推荐阅读
- php - Laravel Eloquent ID 作为数组键
- android - 解析存储在 ionic 3 中的常量中的 JSON 字符串
- java - JavaFX - 加载下一个场景时保留工具栏
- c++ - 如何将 C 类型“char *”存储到 C++ 向量中?
- selenium - 如何在 Appium 中使用现有的应用程序会话
- python - 没有名为 graphframes 的模块 Jupyter Notebook
- angular - 使用新值复制和更新对象并存储到数组
- gemfire - 无法为嵌入式 Apache Geode 缓存服务器操作在 Spring 上下文中定义的区域
- php - cart.php 只为最后一个产品返回想要的值
- javascript - Cytsocape.js 无法创建不存在目标的边缘