PINE64
Warning: Boot regression in latest kernels (4.19, 5.10 etc.) - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64-LTS / SOPINE Compute Module (https://forum.pine64.org/forumdisplay.php?fid=66)
+--- Forum: Linux on PINE A64-LTS / SOPINE (https://forum.pine64.org/forumdisplay.php?fid=69)
+--- Thread: Warning: Boot regression in latest kernels (4.19, 5.10 etc.) (/showthread.php?tid=13516)



Warning: Boot regression in latest kernels (4.19, 5.10 etc.) - kuleszdl - 03-28-2021

Hi folks,

after installing the latest kernel updates, two of my A64-LTS boxes stopped booting. Interestingly, my A64+ boards (not the LTS variants) were not affected. The issue was that the device did not detect the SD card anymore.

It took me quite a while to figure out what was wrong as reverting back to the old kernel did not help. It seems like the updated DTB files are the issue. Booting the new kernel using the old DTB files works fine. This issue affects both kernels from the stable (!) as well as unstable branches in Debian. The affected kernels in Debian are:

- 4.9.181-1 (2021-03-19)
- 5.10.24-1 (2021-03-19)

However, I suspect that this change might affect other distributions as well since the new DTB files were merged directly into the mainline kernel. I suspect the following commit to be causal for the issue:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/allwinner?h=linux-4.19.y&id=5401debf6e6ca67754760080c74f5735d81cc15d

Therefore, should you encounter the same issue, switch back to the DTB files from the previous kernel.


RE: Warning: Boot regression in latest kernels (4.19, 5.10 etc.) - xalius - 04-15-2021

The problem seems to be acknowledged upstream and a fix incoming:

https://lists.infradead.org/pipermail/linux-arm-kernel/2021-April/652071.html


RE: Warning: Boot regression in latest kernels (4.19, 5.10 etc.) - kuleszdl - 04-15-2021

Yes, actually I am directly in touch with upstream and another user who encountered the issue as well. There are various ideas how to fix this, but I suggest to simply use the previous version until the final fix is available.


RE: Warning: Boot regression in latest kernels (4.19, 5.10 etc.) - PakoSt - 04-16-2021

Thanks for the thread, @kuleszdl !
My pine64lts is now booting as expected with some help from @xalius - first time I saw dtc in action Smile
Strit has pushed an update in the Manjaro kernel with a patch so that the board will work - currently that is in the unstable branch: https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/commit/83c4902eec30f010c56cafea9702dc288e4b9dd2

In case someone has a system that can't boot at the moment but would like to, here is a summary of the great instructions from @xalius on how to adjust the dtb:
Code:
# Convert a dtb to text/source with
dtc -I dtb -O dts -o output.dts <input.dtb>

# Locate and change the following line which sets the state of the pin in the output.dts file from:
cd-gpios = <0x23 0x05 0x06 0x01>;
# to:
cd gpios = <0x23 0x05 0x06 0x00>;

# Compile back to dtb:
dtc -I dts -O dtb -o <newdtb>.dtb <input.dts>


Note:
You can see in the patch used for the kernel in Manjaro, that this changes the state from LOW (SoPine) to HIGH (Pine64-LTS).
Xalius posted a couple of images of the schematics on the #pine64 channel which outline the same.
Code:
# SoPine - Low
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 /
# Pine64-LTS - High
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; / PF6 */



RE: Warning: Boot regression in latest kernels (4.19, 5.10 etc.) - kuleszdl - 08-22-2021

The fix should have already made it into Debian 10 and my fresh installation of Debian 11 was not affected by the issue either - so the workaround should not be required anymore. Marking issue as solved.