edk2-msm icon indicating copy to clipboard operation
edk2-msm copied to clipboard

An explination of why patching buttonsdxe usbconfigdxe is needed?

Open bm16ton opened this issue 1 year ago • 4 comments

Prerequisites

  • [ ] Have you read the wiki? Yes and has an excellent how to patch these binaries when a patched bin for model exists
  • [ ] Is your device in the supported list? NOPE
  • [ ] Does the device have a Snapdragon SOC which is supported in this repo? Im not sure if the sm8550 has reached "supported", but code for sum of it exists.

Description

Hello, In general Im curious about the patching of buttonsdxe and usbconfigdxe. None of the info I can find mentions why these need to be patched in order to work, what function we are actually patching, and what information we are changing, and why what we are changing it to. The how to was great, unfortunately my OnePlus 12r uses sm8550 and I have not found a patched buttonsdxe for sm8550 (except for samsung zfold and its buttonsdxe differs greatly) And without this base knowledge trying to manually patch becomes considerably harder. Thank you guys, love the great work! edk2 is simply amazing.

bm16ton avatar Sep 09 '24 16:09 bm16ton

sar, buttonsdxe are for navigating in uefi, and usbconfigdxe is for usb

TrustedFloppa avatar Sep 09 '24 17:09 TrustedFloppa

@bm16ton buttonsdxe patches the char returned by powerkey to be enter

J0SH1X avatar Sep 09 '24 20:09 J0SH1X

@JOSH1X Thankyou! That is one down and currently the most important one. Tho with none of the buttons working it seems this patch issue is not the only one im facing. Plus Oneplus (all sm8550?) took volume down from regular gpio and added it to pmics along with power. And just a sidenote for anyone stumbling here, the device tree entries for Volume up list the keycode for volume down, and the the volume down (no longer in gpio keys section) lists the key for volume up. Despite this they both work correctly (vol+ = vol+ etc) so not sure where its being switched, food for thought.

bm16ton avatar Sep 09 '24 21:09 bm16ton

That device is ported in Silicium so you can take ( or repatch ) dxe from other project

Govro150 avatar Sep 10 '24 19:09 Govro150