support for SM6150
plz i dont know how to write these config files so i want to ask yall to make config for SM6150 (snapdragon 675)
@nookgit12 i have init the project for xiaomi note 7 pro(violet), platform is sm6150 now it can build boot-violet.img, but need more time to dump the dsdt.aml from my cell phone
when i try to port edk2 to sm6150 platform, i had got some trouble like this
is any one can give me some advices....
can you send the boot-violet.img ? i used dipper img(personal modified version) to split emmc partitions to win esp etc ... so far i am not able to make a boot img for it
@Sasmithere in xiaomi_violet-edk2-boot-violet.zip contains 2 file, edk2-boot-violet.img and edk2-boot-violet-old.img
i'll try both and return with an update
@sndnvaps the old img one seems to boot into efi shell but my otg usb keyboard doesn't seem to work , i was wondering if you still have the .dsc , .fdf and .conf related files for it , i want to change the cmdline so it automatically boots to windows partition
@Sasmithere I have push the change to github https://github.com/sndnvaps/edk2-msm/commit/45b4445cec810481c8a7fba5ae69793d018e0b5c https://github.com/sndnvaps/edk2-msm/commit/e44c5ab0ff5978cb31743ed3b5e812c84517fa71 the efi binary and my port for button.dxe etc. https://github.com/sndnvaps/edk2-msm-binary/commit/c54e69c81c6357b334ac1f0c1f069933022834ef
i hope it can help you.
Hey @sndnvaps @Sasmithere
I came across this project and thought it might be useful for your work:
GitHub: https://github.com/Project-Aloha/mu_aloha_platforms Porting Guide: https://aloha.firmware.icu/PortingGuides/SimpleGuide.html
@Thirumal-Palwai i had also read the https://aloha.firmware.icu/PortingGuides/SimpleGuide.html , i made the change base on it ... what i port the dxe file use Ghidra but it seem had some bug on platform sm6150 ,made it cann't run . only work is UEFI Shell, pwm,vol_up,vol_down still not work... may be need uart debug to get the really problem.... i had one idea, use uart shell to get the problem of ui not work, but i dont known how to get the uart work
@sndnvaps thanks for the files , i think the tech stack which calls The graphicsconsoledxe.efi which also combines buttonsdxe is causing the ruckus I'll be approaching this issue in these ways :
- fix the graphicsconsoledxe.efi by dumping and recompiling then insert some dummy registers which are causing the issue and i did saw some registers having unknown as address (hard)
- use a dummy graphicsconsoledxe.efi which returns efi_success as true and goes to text based interface (medium)
- change the stack in which graphicsconsoledxe is called and remove it from there , inshort remove it from the call stack(hard)
- build graphicsconsoledxe from scratch myself from the xbl.elf file or search internet for something similar (very hard 💀)
- and last is i will try to change the bootdef.c and boot.c so it automatically boots into uefi boot menu
@sndnvaps
is emmc storage not supported ?
close 🤏🏻 but no touchscreen and pwm , vol_up and down work , just scripted to auto boot to simple-init
hey @sndnvaps still there ? i think i fixed it ? i dont know can you see this video log?
@sndnvaps i added this line in DSC to get all debug info , under
[PcdsFixedAtBuild.common] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xFFFFFFFF
@sndnvaps buttons are working vol_up and vol_down in tianocore but no touch , idk about power button since my phones power button is not working or i can say its damaged
here is the image :
Edit: power button is working , i used jumper cable on the motherboard
@Sasmithere
hey @sndnvaps still there ? i think i fixed it ? i dont know can you see this video log?
in PRC (China), because of gfw, i cann't play the video you shared... so, i don't known you progress,,, (can you share the video to https://pan.baidu.com/) in comment https://github.com/edk2-porting/edk2-msm/issues/411#issuecomment-3362716859 ,you pic look like you have great progress....
@sndnvaps touch is not working but power button and volume up and volume down button are working .....
https://github.com/user-attachments/assets/d08626bf-de7a-4c39-9628-71f0adcf0eee
@Sasmithere i have test on my phone. every thing is ok, touch_screen is not the quesion... pwm,vol_up,vol_down can work. it's the best . can you upload the change to you edk2-violet project
@Sasmithere i cherry-pick you changed, but still get dark screen. you need to push patched file to https://github.com/Sasmithere/edk2-msm-binary/tree/main/Drivers/sm6150 , so i can make a fully test
@sndnvaps i'll upload here my current working set, let me know if you want anything else , P.S: new DeviceTreeBlob (DTB) from my device , originally it was 670kb , mine is 692kb
@Sasmithere thks bro, i will do the test as soon as possible in touch_screen, i have some idea, it make need a touch_screen drv to make the touch work.
@sndnvaps i also thought of that as well , to use a passthrough for testing , but it generate errors while compiling and even tho it compiled , it would cause synchronous exception
@Sasmithere in this commit https://github.com/BigfootACA/simple-init/blob/29e062805776db5ab7a61d07ef040d43aed71161/libs/lvgl/README.md, Features, support touch screen, it make do some hack to make it work....
@Sasmithere i need more time to test what you changed. i had to reinit the build env base on you work flow.
@sndnvaps no worriers , the thing is i just included all drivers from QcomPkg/Drivers from xbl and i think the apriori should be ordered in such a manner that every requirement for DXE is fullfilled .... well thats what i found out anyway
@Sasmithere i replace the submobule path with china gitee.com .i just build the boot-violet.img, test every thing is ok(vol_up,vol_down,pwr), just touch_screen not working.
@sndnvaps TouchScreen config is in DisplayDxe.efi , but when i include it , it restarts the device
@Sasmithere in DisplayDxe.depex , i found 4 Guid_Protocol not defind in edk2 project dec file
use https://github.com/YangGangUEFI/DecGuidParser Extract GUID from Edk2 .dec file to json file.
use https://yangganguefi.github.io/Edk2DepexGUIDParser/Edk2DepexGuidVue3.html to parse the GUID from DisplayDxe.depex
{ 0x5bef7c41, 0xa560, 0x435b, { 0x83, 0x5b, 0x3c, 0x3e, 0xbf, 0x2b, 0xd1, 0x51 } }
(未知GUID)
{ 0xc1bff82d, 0x6c92, 0x48fb, { 0x83, 0x55, 0xc7, 0xfb, 0x42, 0x18, 0xa4, 0xea } }
(未知GUID)
{ 0xa966cc4f, 0xee6c, 0x424d, { 0xa7, 0x62, 0x8e, 0xd3, 0xb5, 0xa4, 0xa5, 0x01 } }
(未知GUID)
{ 0x47861dff, 0x556f, 0x4269, { 0x9b, 0x28, 0x06, 0x2e, 0xc3, 0xec, 0xb3, 0x0d } }
(未知GUID)
i got there defind in github
/* Protocol GUID definition */
/** @ingroup efi_pmicWled_protocol */
#define EFI_PMIC_WLED_PROTOCOL_GUID \
{ 0x5bef7c41, 0xa560, 0x435b, { 0x83, 0x5b, 0x3c, 0x3e, 0xbf, 0x2b, 0xd1, 0x51 } }
https://github.com/Rivko/android-firmware-qti-sdm670/blob/20bb8ae36c93fc16bbadda0e0a83f930c0c8a271/boot_images/QcomPkg/Include/Protocol/EFIPmicWled.h#L41
/* Protocol GUID definition */
/** @ingroup @ingroup efi_pmicIbb_protocol */
#define EFI_PMIC_IBB_PROTOCOL_GUID \
{ 0xc1bff82d, 0x6c92, 0x48fb, { 0x83, 0x55, 0xc7, 0xfb, 0x42, 0x18, 0xa4, 0xea } }
https://github.com/Daniel224455/xbl2nd/blob/b3242a2e7f7fd4b90116611a13c28c1748f2f086/QcomPkg/Include/Protocol/EFIPmicIbb.h#L47
just only got the two of them.
the edk2 project cannot load DisplayDxe.efi ,it may be cause by loose of GUID protocol
From DisplayDxe.depex
these GUIDs are not defined in edk2 project , they're closed source , i found they correspond to WLED, IBB, LAB, LCDB :
PUSH { 0x5bef7c41, 0xa560, 0x435b, { 0x83, 0x5b, 0x3c, 0x3e, 0xbf, 0x2b, 0xd1, 0x51 } }
PUSH { 0xc1bff82d, 0x6c92, 0x48fb, { 0x83, 0x55, 0xc7, 0xfb, 0x42, 0x18, 0xa4, 0xea } }
PUSH { 0xa966cc4f, 0xee6c, 0x424d, { 0xa7, 0x62, 0x8e, 0xd3, 0xb5, 0xa4, 0xa5, 0x01 } }
PUSH { 0x47861dff, 0x556f, 0x4269, { 0x9b, 0x28, 0x06, 0x2e, 0xc3, 0xec, 0xb3, 0x0d } }
and these GUIDs are defined in QcomPkg.dec :
PUSH { 0x157a5c45, 0x21b2, 0x43c5, { 0xba, 0x7c, 0x82, 0x2f, 0xee, 0x5f, 0xe5, 0x99 } }
PUSH { 0xb0760469, 0x970c, 0x487a, { 0xa4, 0xb5, 0x28, 0xdb, 0x7b, 0x45, 0xce, 0xf1 } }
PUSH { 0xad9aec18, 0x7bf0, 0x4809, { 0x9e, 0x96, 0x30, 0x12, 0x30, 0x9f, 0x3d, 0xf7 } }
PUSH { 0xb27ae8b1, 0x3e10, 0x4d07, { 0xab, 0x5c, 0xeb, 0x9a, 0x6d, 0xc6, 0xfa, 0x8f } }
PUSH { 0x241afae6, 0x885f, 0x4f6c, { 0xa7, 0xea, 0xc2, 0x8e, 0xab, 0x79, 0xc3, 0xe5 } }
if we were to path DisplayDxe.depex then we'd need patch DisplayDxe.efi as well and protocol pointers to dereferenced as NULL