4 ms·
This reminded me of another story [0] (discussed on HN [1]) about debugging hanging U-Boot when booting from 1.8 volt SD cards, but not from 3.0 volt SD cards,
by TechBro8615 3y ago
This reminded me of another story [0] (discussed on HN [1]) about debugging hanging U-Boot when booting from 1.8 volt SD cards, but not from 3.0 volt SD cards, where the solution involved a kernel patch that actually introduced a delay during boot, by "hardcoding a delay in the regulator setup code (set_machine_constraints)." (In fact it sounded so similar that I actually checked if that patch caused the bug in the OP, but they seem unrelated.)
The story is a wild one, and begins with what looks like a patch with a hacky workaround:
> The patch works around the U-Boot bug by setting the signal voltage back to 3.0V at an opportune moment in the Linux kernel upon reboot, before control is relinquished back to U-Boot.
But wait... it was "the weirdest placebo ever!" Turns out the only reason this worked was because:
> all this setting did was to write a warning to the kernel log... the regulator was being turned off and on again by regulator code, and that writing that line took long enough to be a proper delay to have the regulator reach its target voltage.
The full story is well worth a read.
[0] https://kohlschuetter.github.io/blog/posts/2022/10/28/linux-nanopi-r4s/ https://kohlschuetter.github.io/blog/posts/2022/10/28/linux-...
[1] https://news.ycombinator.com/item?id=33370882 https://news.ycombinator.com/item?id=33370882