Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
voidanix opened this issue Sep 29, 2022 · 42 comments
Closed

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

voidanix opened this issue Sep 29, 2022 · 42 comments
Labels

Comments

@voidanix
Copy link

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.

@voidanix voidanix added the bug label Sep 29, 2022
@MarijnS95
Copy link
Contributor

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)?

@voidanix
Copy link
Author

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.

@MarijnS95
Copy link
Contributor

you can't boot due to transpower permission issue

@bartcubbins Such as? It boots fine here.

@voidanix
Copy link
Author

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.

@bartcubbins
Copy link
Contributor

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;)

@MarijnS95
Copy link
Contributor

🥷 (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?").

@Thaodan
Copy link

Thaodan commented Oct 3, 2022

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.

@KingProNoob2
Copy link

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

@jerpelea
Copy link
Collaborator

jerpelea commented Oct 4, 2022

@KingProNoob2 what phone do you have ?

@KingProNoob2
Copy link

pdx-201 (Seine platform)

@KingProNoob2
Copy link

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

@MarijnS95
Copy link
Contributor

@Thaodan
Copy link

Thaodan commented Oct 4, 2022 via email

@voidanix
Copy link
Author

voidanix commented Oct 4, 2022

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?

@jerpelea
Copy link
Collaborator

jerpelea commented Oct 5, 2022

I can confirm the reported issue

@jerpelea
Copy link
Collaborator

jerpelea commented Oct 5, 2022

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

@Thaodan
Copy link

Thaodan commented Oct 5, 2022 via email

@jerpelea
Copy link
Collaborator

jerpelea commented Oct 5, 2022

stuck at Sony logo

@jerpelea
Copy link
Collaborator

jerpelea commented Oct 5, 2022

@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

@Thaodan
Copy link

Thaodan commented Oct 11, 2022 via email

@sledges
Copy link

sledges commented Oct 30, 2022

@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:)

@Thaodan
Copy link

Thaodan commented Oct 31, 2022 via email

@voidanix
Copy link
Author

voidanix commented Nov 1, 2022

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.

voidanix added a commit to voidanix/android_kernel_sony_msm that referenced this issue Nov 1, 2022
…is set"

This reverts commit cb81ea9.

It seems that some our Sony devices require tampering with the sysfs before
the driver data is done being set, meaning that devices must be already
registered before being touched.

Fixes: 7354523 ("treewide: 4.19.247")
Link: sonyxperiadev/bug_tracker#788
Signed-off-by: voidanix <voidanix@keyedlimepie.org>
@voidanix
Copy link
Author

voidanix commented Nov 1, 2022

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

@KingProNoob2
Copy link

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

@KingProNoob2
Copy link

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

@voidanix
Copy link
Author

ping @KingProNoob2, any updates on this for seine?

@Thaodan
Copy link

Thaodan commented Dec 16, 2022

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

@voidanix
Copy link
Author

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.

@Thaodan
Copy link

Thaodan commented Dec 17, 2022 via email

@voidanix
Copy link
Author

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

@Thaodan
Copy link

Thaodan commented Dec 18, 2022 via email

@voidanix
Copy link
Author

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

@jerpelea
Copy link
Collaborator

does your device boot with the precompiled kernel?

@voidanix
Copy link
Author

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

@jerpelea
Copy link
Collaborator

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

@jerpelea
Copy link
Collaborator

jerpelea commented Dec 19, 2022

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

@voidanix
Copy link
Author

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?

@jerpelea
Copy link
Collaborator

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

@jerpelea
Copy link
Collaborator

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

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

@voidanix
Copy link
Author

voidanix commented Jan 3, 2023

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.

@jerpelea
Copy link
Collaborator

do you have the sensors working?

voidanix added a commit to voidanix/android_kernel_sony_msm that referenced this issue Feb 12, 2023
Adjusted commit e75b5ea ("mailbox: forward the hrtimer if not
queued and under a lock") for downstream 831c430 ("drivers:
mailbox: fix race resulting in multiple message submission").

Conflict with d221ce5 ("nfc: st21nfca: fix memory leaks in
EVT_TRANSACTION handling") resolved.

Skipped 67d5ad72940875dcc727 ("extcon: Modify extcon device to be created
after driver data is set") due to it rendering our devices unbootable.

Link: https://lore.kernel.org/r/20220613094908.257446132@linuxfoundation.org
Link: sonyxperiadev/bug_tracker#788
Signed-off-by: voidanix <voidanix@keyedlimepie.org>
enesykaya pushed a commit to aospa-op5-414/android_kernel_oneplus_msm8998 that referenced this issue Jul 17, 2023
Adjusted commit e75b5ea2d6b15ba769d7 ("mailbox: forward the hrtimer if not
queued and under a lock") for downstream 831c430 ("drivers:
mailbox: fix race resulting in multiple message submission").

Conflict with d221ce54ce331c1a23be ("nfc: st21nfca: fix memory leaks in
EVT_TRANSACTION handling") resolved.

Skipped 67d5ad72940875dcc727 ("extcon: Modify extcon device to be created
after driver data is set") due to it rendering our devices unbootable.

Link: https://lore.kernel.org/r/20220613094908.257446132@linuxfoundation.org
Link: sonyxperiadev/bug_tracker#788
Signed-off-by: voidanix <voidanix@keyedlimepie.org>
voidanix added a commit to voidanix/android_kernel_sony_msm that referenced this issue Oct 8, 2023
This reverts the changes introduced with upstream commit
cb81ea9 ("extcon: Modify extcon device to be created after
driver data is set").

It seems that some Sony devices (e.g. kumano) require tampering with the
sysfs before dev_set_drvdata() finishes.

Fixes: 7354523 ("treewide: 4.19.247")
Link: sonyxperiadev/bug_tracker#788
Signed-off-by: voidanix <voidanix@keyedlimepie.org>
jerpelea pushed a commit to sonyxperiadev/kernel that referenced this issue Oct 9, 2023
This reverts the changes introduced with upstream commit
cb81ea9 ("extcon: Modify extcon device to be created after
driver data is set").

It seems that some Sony devices (e.g. kumano) require tampering with the
sysfs before dev_set_drvdata() finishes.

Fixes: 7354523 ("treewide: 4.19.247")
Link: sonyxperiadev/bug_tracker#788
Signed-off-by: voidanix <voidanix@keyedlimepie.org>
@voidanix voidanix closed this as completed Oct 9, 2023
voidanix referenced this issue in sonyxperiadev/kernel-sony-msm-4.19-common Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants