Skip to content

Fix boot hangs with SD card inserted

At least on iMX6 boards, in the latest Flash-N-Go System if the card is inserted before booting, the boot process hangs after these messages:

INIT: version 3.01 booting

Please wait: booting...

The problem occurs during boot when SD is accessed by init scripts.

Herewith the problem cannot be reproduced with the latest mainline stable kernels due to following commit, introduced by 5.16.0-rc1 kernel: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.16.y&id=35d114699b90c8b2c568c48f78adeb913d81bcc

It's hard to explain why removing of additional printk solves the problem — it seems that this is some timing issue (or race condition). And to not waste time on further investigation, we would recommend to integrate this commit as is.

See also MR linux-guf!231 (merged)

Merge request reports