-# EDK2 UEFI Firmware For Xiaomi MI 8 (Dipper)\r
-Attempt to create a normal EDK2 for Xiaomi MI8 - dipper.\r
+# EDK2 UEFI Firmware For Snapdragon 845 (sdm845)\r
\r
-Based on zhuowei's port for [Pixel3XL](https://github.com/Pixel3Dev/edk2-pixel3/).\r
-\r
-[](https://app.fossa.com/projects/git%2Bgithub.com%2FNekokeCore%2Fedk2-dipper?ref=badge_shield)\r
-[](https://app.fossa.com/projects/git%2Bgithub.com%2FNekokeCore%2Fedk2-dipper?ref=badge_small)\r
-\r
-## The Most Important\r
-DO NOT FLASH THIS UEFI FIRMWARE IN YOUR MAIN PHONE !!!\r
-\r
-It's very unstable and you may lost your data.\r
-\r
-## Status \r
- UFS WORK!\r
-\r
- Can boot Linux Arm\r
-\r
- Clock WORK!\r
-\r
- Test ACPI etc. tables removeed.\r
-\r
- And can load Windows PE.\r
-\r
-## Dev Logs\r
-2020.1.6 Fix 5 compiler error.\r
-\r
-2020.1.7 Start work and successfully run on my phone.\r
-\r
-2020.1.8 Fix Display.\r
-\r
-2020.4.17 Fix UFS drive and Fix MemoryMap(Thanks [Lemon1Ice](https://github.com/Lemon1Ice)).\r
-\r
-2020.4.19 Add ACPI etc. Tables and Fix DSDT 24 Errors. (PS.The ACPI and SSDT etc. Tables Provided by [5超级菜鸟5](https://github.com/sunshuyu)\r
-\r
-2020.4.24 Fix Clock and The Clock is work well && Add SmemDxe SPI SPMI HWIODxeDriver PmicDxe ButtonsDxe ChipInfoDxe to Binary && Add USB driver\r
-\r
-2020.4.30 Re added MemoryMap and can boot Windows to BlueScreen(Stop Code:Memory Managent) and (Stop Code:IRQL NOT LESS OR EQUAL)\r
-\r
-2020.5.6 Fix A Lot but Nothing.\r
-\r
-2020.5.8 Fix A Lot but Nothing.\r
-\r
-2020.5.10 Can boot WindowsPE . Thank for [Lemon1Ice](https://github.com/Lemon1Ice) patience and great help!\r
-\r
-## To-Do\r
-1.Fix fts touchscreen\r
-2.Fix ACPI tables\r
-3.Partition UFS\r
-4.make USB work\r
+Attempt to create a normal EDK2 for Snapdragon 845 platform.\r
\r
## Dependencies\r
\r
\r
\r
## Building\r
+\r
1.Clone edk2 and edk2-platforms (Place three directories side by side.)\r
\r
edk2:\r
```\r
\r
## Credits\r
+\r
MemoryMap thanks [Lemon1Ice](https://github.com/Lemon1Ice).\r
\r
ACPI etc. tables thanks [5超级菜鸟5](https://github.com/sunshuyu)\r
\r
-Orther edk2 project [EngLearnsh](https://github.com/EngLearnsh/edk2-dipper).\r
-\r
SimpleFbDxe screen driver is from imbushuo's [Lumia950XLPkg](https://github.com/WOA-Project/Lumia950XLPkg).\r
\r
Also thanks [edk2 website](https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC#Install_required_software_from_apt).\r
INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
FILE DRIVER = af9763a2-033b-4109-8e17-56a98d380c92 {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/HWIODxeDriver/HWIODxeDriver.depex
- SECTION PE32 = sdm845Pkg/Binary/HWIODxeDriver/HWIODxeDriver.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/HWIODxeDriver/HWIODxeDriver.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/HWIODxeDriver/HWIODxeDriver.efi
SECTION UI = "HWIODxeDriver"
}
FILE DRIVER = 4db5dea6-5302-4d1a-8a82-677a683b0d29 {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/ClockDxe/ClockDxe.depex
- SECTION PE32 = sdm845Pkg/Binary/ClockDxe/ClockDxe.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/ClockDxe/ClockDxe.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/ClockDxe/ClockDxe.efi
SECTION UI = "ClockDxe"
}
FILE DRIVER = 5776232e-082d-4b75-9a0e-fe1d13f7a5d9 {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/PmicDxe/PmicDxe.depex
- SECTION PE32 = sdm845Pkg/Binary/PmicDxe/PmicDxe.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/PmicDxe/PmicDxe.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/PmicDxe/PmicDxe.efi
SECTION UI = "PmicDxe"
}
FILE DRIVER = 5bd181db-0487-4f1a-ae73-820e165611b3 {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/ButtonsDxe/ButtonsDxe.depex
- SECTION PE32 = sdm845Pkg/Binary/ButtonsDxe/ButtonsDxe.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/ButtonsDxe/ButtonsDxe.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/ButtonsDxe/ButtonsDxe.efi
SECTION UI = "ButtonsDxe"
}
INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
FILE DRIVER = 3299a266-15f0-4346-8318-716336736d3e {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/UsbDeviceDxe/UsbDeviceDxe.depex
- SECTION PE32 = sdm845Pkg/Binary/UsbDeviceDxe/UsbDeviceDxe.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/UsbDeviceDxe/UsbDeviceDxe.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/UsbDeviceDxe/UsbDeviceDxe.efi
SECTION UI = "UsbDeviceDxe"
}
FILE DRIVER = 11faed4c-b21f-4d88-8e48-c4c28a1e50df {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/UsbPwrCtrlDxe/UsbPwrCtrlDxe.depex
- SECTION PE32 = sdm845Pkg/Binary/UsbPwrCtrlDxe/UsbPwrCtrlDxe.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/UsbPwrCtrlDxe/UsbPwrCtrlDxe.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/UsbPwrCtrlDxe/UsbPwrCtrlDxe.efi
SECTION UI = "UsbPwrCtrlDxe"
}
FILE DRIVER = 5af77f10-90df-4e7e-8325-a17ec09d5443 {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/UsbMsdDxe/UsbMsdDxe.depex
- SECTION PE32 = sdm845Pkg/Binary/UsbMsdDxe/UsbMsdDxe.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/UsbMsdDxe/UsbMsdDxe.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/UsbMsdDxe/UsbMsdDxe.efi
SECTION UI = "UsbMsdDxe"
}
FILE DRIVER = 94f8a6a7-dc34-4101-88c1-99179cceae83 {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/UsbfnDwc3Dxe/UsbfnDwc3Dxe.depex
- SECTION PE32 = sdm845Pkg/Binary/UsbfnDwc3Dxe/UsbfnDwc3Dxe.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/UsbfnDwc3Dxe/UsbfnDwc3Dxe.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/UsbfnDwc3Dxe/UsbfnDwc3Dxe.efi
SECTION UI = "UsbfnDwc3Dxe"
}
FILE DRIVER = cd823a4d-7dec-4531-ae5d-4134fa4127b8 {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/UsbConfigDxe/UsbConfigDxe.depex
- SECTION PE32 = sdm845Pkg/Binary/UsbConfigDxe/UsbConfigDxe.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/UsbConfigDxe/UsbConfigDxe.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/UsbConfigDxe/UsbConfigDxe.efi
SECTION UI = "UsbDeviceDxe"
}
INF sdm845Pkg/SimpleFbDxe/SimpleFbDxe.inf
FILE DRIVER = 0d35cd8e-97ea-4f9a-96af-0f0d89f76567 {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/UFSDxe/UFSDxe.depex
- SECTION PE32 = sdm845Pkg/Binary/UFSDxe/UFSDxe.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/UFSDxe/UFSDxe.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/UFSDxe/UFSDxe.efi
SECTION UI = "UFSDxe"
}
FILE DRIVER = 2a7b4bef-80cd-49e1-b473-374ba4d673fc {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/SPMI/SPMI.depex
- SECTION PE32 = sdm845Pkg/Binary/SPMI/SPMI.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/SPMI/SPMI.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/SPMI/SPMI.efi
SECTION UI = "SPMI"
}
FILE DRIVER = f541d663-4a48-40aa-aabf-ff158ccae34c {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/SmemDxe/SmemDxe.depex
- SECTION PE32 = sdm845Pkg/Binary/SmemDxe/SmemDxe.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/SmemDxe/SmemDxe.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/SmemDxe/SmemDxe.efi
SECTION UI = "SmemDxe"
}
FILE DRIVER = 10e193df-9966-44e7-b17c-59dd831e20fc {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/ChipInfo/ChipInfo.depex
- SECTION PE32 = sdm845Pkg/Binary/ChipInfo/ChipInfo.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/ChipInfo/ChipInfo.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/ChipInfo/ChipInfo.efi
SECTION UI = "ChipInfo"
}
FILE DRIVER = 7a32bd23-f735-4f57-aa1a-447d2fe3be0d {
- SECTION DXE_DEPEX = sdm845Pkg/Binary/SPI/SPI.depex
- SECTION PE32 = sdm845Pkg/Binary/SPI/SPI.efi
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/polaris/SPI/SPI.depex
+ SECTION PE32 = sdm845Pkg/Binary/polaris/SPI/SPI.efi
SECTION UI = "SPI"
}
# SECTION RAW = sdm845Pkg/AcpiTables/minimal/FACP.aml
# SECTION RAW = sdm845Pkg/AcpiTables/minimal/GTDT.aml
# SECTION RAW = sdm845Pkg/AcpiTables/minimal/APIC.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/DBG2.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/DSDT.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/CSRT.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/FADT.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/FACS.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/GTDT.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/IORT.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/MCFG.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/MADT.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/PPTT.aml
- SECTION RAW = sdm845Pkg/AcpiTables/test/TPM2.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/DBG2.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/DSDT.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/CSRT.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/FADT.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/FACS.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/GTDT.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/IORT.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/MCFG.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/MADT.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/PPTT.aml
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/TPM2.aml
SECTION UI = "AcpiTables"
}
# Defines Section - statements that will be processed to create a Makefile.
#
################################################################################
-[Defines]
- PLATFORM_NAME = sdm845Pkg
- PLATFORM_GUID = 28f1a3bf-193a-47e3-a7b9-5a435eaab2ee
- PLATFORM_VERSION = 0.1
- DSC_SPECIFICATION = 0x00010019
- OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
- SUPPORTED_ARCHITECTURES = AARCH64
- BUILD_TARGETS = DEBUG|RELEASE
- SKUID_IDENTIFIER = DEFAULT
- FLASH_DEFINITION = sdm845Pkg/sdm845Pkg.fdf
!include sdm845Pkg/CommonDsc.dsc.inc
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Alpha"
- # System Memory (5GB)
gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
- gArmTokenSpaceGuid.PcdSystemMemorySize|0x140000000
# We only boot one processor here!
gArmPlatformTokenSpaceGuid.PcdCoreCount|1
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
gsdm845PkgTokenSpaceGuid.PcdMipiFrameBufferAddress|0x9d400000
- gsdm845PkgTokenSpaceGuid.PcdMipiFrameBufferWidth|1080
- gsdm845PkgTokenSpaceGuid.PcdMipiFrameBufferHeight|2248
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20