TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to optimize boot time in user space on a Raspberry Pi 4 / Boot2Qt

37 点作者 jandeboevrie8 个月前

4 条评论

megous8 个月前
This just shows how proprietary boot flow of RPi is slow. On other platforms you can get bootloader to hand off to kernel in subsecond timeframes, sometimes as fast as in 0.3s.<p>Then kernel can be done in another 0.3s or faster, and then userspace can still be optimized more than what&#x27;s described in the article, too. Instead of shell and executing programs, which requires filesystem access, loading them, loading shared libraries, etc. you can have a specialized, tiny statically built init binary which just does all initialization&#x2F;mounts via syscalls and then runs your app (which should be built statically, too).<p>This way you can achieve ~1-2s boot to UI on even way slower platforms than Rpi4. I did something like this on Pinephone a few years ago and recently again on Luckfox Pico Mini, which is a slow Cortex-A7 with DDR2 memory.<p>There&#x27;s no justification for Rpi to be booting for 12s. Even unoptimized standard U-Boot on common platforms often runs for just ~1s before handing off to the kernel.
评论 #41549865 未加载
评论 #41546312 未加载
joezydeco8 个月前
&quot;Instead of finding and optimizing tasks, we just turned systemd off&quot;. Okay.<p>The folks at Bootlin have way more interesting approaches and techniques to review. I&#x27;d look to them.<p><a href="https:&#x2F;&#x2F;bootlin.com&#x2F;blog&#x2F;tag&#x2F;boot-time&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bootlin.com&#x2F;blog&#x2F;tag&#x2F;boot-time&#x2F;</a>
评论 #41548113 未加载
评论 #41546428 未加载
dividuum8 个月前
Even if your userspace is pretty fast, some necessary initialization happening before the kernel is even loaded means the you probably never get lower than 6-8 seconds. There is a lengthy EEPROM issue thread about that for the Pi4: <a href="https:&#x2F;&#x2F;github.com&#x2F;raspberrypi&#x2F;firmware&#x2F;issues&#x2F;1375">https:&#x2F;&#x2F;github.com&#x2F;raspberrypi&#x2F;firmware&#x2F;issues&#x2F;1375</a>
cvilgan8 个月前
I wonder how this even works, as PID 1 should exit right away, no? And I thought this would lead to an immediate kernel panic?
评论 #41546656 未加载
评论 #41546251 未加载