sonyxperiadev/bug_tracker

[4.19][12/13][bahamut] Stuck at bootloader logo

Closed this issue · 42 comments

Platform: kumano
Device: bahamut
Kernel version: 4.19.248
Android version: 12.1 and 13
Software binaries version: SW_binaries_for_Xperia_Android_12_4.19_v3a_kumano.img

Previously working on
Last kernel checkout at sonyxperiadev/kernel@b162c36

Description
Device is stuck at bootloader logo (SONY) with a red notification LED, unable to boot into Android.

Not sure if 13 is supposed to boot at this time on kumano, but it does currently not: building 12.1 confirms that it does not boot there either.

Purely guessing, sonyxperiadev/kernel#2533 might have something to do with this.

How to reproduce
Build cleanly either T or S, both should not boot.

Additional context
No idea how to pull any logs from this state.

Not sure if 13 is supposed to boot at this time on kumano, but it does currently not

Probably, can you try that with the kernel that was previously working (rebuild kernel, reflash boot+dtbo, eventually vbmeta)?

Hey Marijn, I can confirm that using the kernel at the previously working commit above makes 12.1 boot.

Will bisect to find a little more about this.

you can't boot due to transpower permission issue

@bartcubbins Such as? It boots fine here.

After bisecting it seems that 4.19.247 (sonyxperiadev/kernel@7354523) is the culprit of this.

If anybody else with the same issue could confirm this, it would be great.

you can't boot due to transpower permission issue

@bartcubbins Such as? It boots fine here.

I deleted my comment immediately after I posted it, I don't know how you managed to catch it;)

🥷 (might have clicked the notification quickly, and GH isn't responsive enough to remove the message in time?)

Feel free to edit/strikethrough/amend - or even hide - your comment in that case, deleting it outright makes things confusing ("I just read that, where has it gone to?").

After bisecting it seems that 4.19.247 (sonyxperiadev/kernel@7354523) is the culprit of this.

If anybody else with the same issue could confirm this, it would be great.

Please post the contents of /sys/fs/pstore.

Hello, I have I different phone, but the same kernel and the same symptoms. In a few hours I should be able to post /sys/fs/pstore

@KingProNoob2 what phone do you have ?

pdx-201 (Seine platform)

Sooo... I mounted system.img and /sys was empty. Then I opened the ramdisk and it was empty too. Are those symlinks to somewhere?

Please post the contents of /sys/fs/pstore.

How would this be done? Should the broken kernel be booted and then the directory somehow pulled from recovery by flashing a working boot image?

I can confirm the reported issue

after a quick look the issue is caused by the clang commits from Sep 19, 2022
https://github.com/sonyxperiadev/kernel-sony-msm-4.19-common/commits/aosp/LA.UM.9.12.r1

reverting those commits and rebuilding the kernel fixes the boot

stuck at Sony logo

@bartcubbins resetting the git
https://github.com/sonyxperiadev/kernel-sony-msm-4.19-common/commits/aosp/LA.UM.9.12.r1
to 75a0a7591db276128bb2fd9033672596f692ad89 and rebuilding the kernel results in a working kernel

@bartcubbins resetting the git https://github.com/sonyxperiadev/kernel-sony-msm-4.19-common/commits/aosp/LA.UM.9.12.r1 to 75a0a7591db276128bb2fd9033672596f692ad89 and rebuilding the kernel results in a working kernel

Building with the latest kernel-sony-msm-4.19-common (544e0e90768068fe2b5923960980d1ec721ff660) ends with build error in my test env:

$ cat out/target/product/pdx213/obj/kernel/build.log
  ...
  VDSOA   arch/arm64/kernel/vdso/gettimeofday.o
<instantiation>:1:5: error: expected absolute expression
.if (. - jumptable) != 4 * (0)
    ^
.../kernel/sony/msm-4.19/kernel/arch/arm64/kernel/vdso/gettimeofday.S:201:2: note: while in macro instantiation
 jump_slot jumptable, 0, realtime
 ^
<instantiation>:2:2: error: Jump slot index mismatch
 .error "Jump slot index mismatch"
 ^
.../kernel/sony/msm-4.19/kernel/arch/arm64/kernel/vdso/gettimeofday.S:201:2: note: while in macro instantiation
 jump_slot jumptable, 0, realtime
 ^
make[2]: *** [.../kernel/sony/msm-4.19/kernel/arch/arm64/kernel/vdso/Makefile:52: arch/arm64/kernel/vdso/gettimeofday.o] Error 1
make[1]: *** [arch/arm64/Makefile:201: vdso_prepare] Error 2

Command line used: ./build-kernels-clang.sh -d pdx213 -O $ANDROID_ROOT/out/target/product/pdx213/obj/kernel.

Though I haven't tried a clean build yet, there's another case of such fail here: OnePlusOSS/android_kernel_oneplus_sm8150#8 The advice was to use clang, which I believe the among script did? (Haven't had time for more thorough investigation, sorry:)

Just an FYI: while making my way up to the latest 4.14 kernel for kumano, 4.14.283 manifests the same behavior described here.

Not coincidentally, the changes in both kernels are very much the same, so if the fix is found on one of them it can be carried over to the other.

The AOSP base is 11 in this case, which means an older clang too.

@KingProNoob2 can you test on seine if this branch boots for you on 12.1?

Yes, i can. I will build just the bootimage tho and use an older system.img (for speed reasons)

Edit: I don't think I can now, because i kinda broke my OS on my pc ( I use arch linux btw)

ping @KingProNoob2, any updates on this for seine?

Just wondering which driver is behaving wrong. I was asking for logs but none have been provided.

See the referenced commit above, from my investigation it seems to be extcon.

As for the logs, I still have no idea how to pull them as pstore does not seem to work and it just cannot get past the logo.

Didn't try that as it was not present in out/.

I have tried all of them so far (user, userdebug and user), but none of them boot nor have pstore.

does your device boot with the precompiled kernel?

No it does not, but I highly doubt it is related to the build script changes.

this is strange since I built bahamut on Friday and it boots to UI

@voidanix please flash your device with 55.0.A.11.25 then flash AOSP again (using the prebuilt kernel)

Flashing both 55.0.xxx and 55.1.xxx before AOSP did not work in my case.

Are you sure you are not using an old kernel checkout?

@voidanix please use the prebuilt kernel to rule out any variation from my build

@voidanix you should be able to build and boot the kernel for your device

sonyxperiadev/kernel-sony-msm-4.19-common@3cb5b93

Can confirm that the latest prebuilt boots (tested on both 12.1 and 13), although is no modem at all now (unsure if related to T, but qcrilhook is kinda dead).

Let me know if I should open an issue about this as well.

do you have the sensors working?