{"id":13643755,"url":"https://github.com/WOA-Project/Lumia950XLPkg","last_synced_at":"2025-04-21T02:31:28.594Z","repository":{"id":32260189,"uuid":"132070715","full_name":"WOA-Project/Lumia950XLPkg","owner":"WOA-Project","description":"Non-EOL (yes!) AArch64 UEFI firmware for Lumia 950 / Lumia 950 XL","archived":false,"fork":false,"pushed_at":"2024-01-01T23:12:22.000Z","size":7402,"stargazers_count":370,"open_issues_count":9,"forks_count":46,"subscribers_count":54,"default_branch":"master","last_synced_at":"2025-04-05T14:07:15.768Z","etag":null,"topics":["aarch64","armv8","edk2","firmware","lumia","uefi","windows-on-arm"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WOA-Project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-05-04T01:44:48.000Z","updated_at":"2025-04-02T11:12:35.000Z","dependencies_parsed_at":"2023-01-14T21:00:45.068Z","dependency_job_id":"2ee6418d-4891-49c3-8f48-518bb77f13a3","html_url":"https://github.com/WOA-Project/Lumia950XLPkg","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WOA-Project%2FLumia950XLPkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WOA-Project%2FLumia950XLPkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WOA-Project%2FLumia950XLPkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WOA-Project%2FLumia950XLPkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WOA-Project","download_url":"https://codeload.github.com/WOA-Project/Lumia950XLPkg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249986066,"owners_count":21356318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aarch64","armv8","edk2","firmware","lumia","uefi","windows-on-arm"],"created_at":"2024-08-02T01:01:52.153Z","updated_at":"2025-04-21T02:31:23.557Z","avatar_url":"https://github.com/WOA-Project.png","language":"C","funding_links":["https://www.paypal.com/paypalme/imbushuo"],"categories":["C"],"sub_categories":[],"readme":"# EDK2 UEFI Implementation for Lumia 950 and Lumia 950 XL\r\n\r\n## For users\r\n\r\nYou can download the latest UEFI build by clicking the Azure Pipelines icon below. Click Artifacts button in Azure Pipelines, then download UEFI.elf in ELF directory.\r\n\r\n[![Build Status (Visual Studio Team Services)](https://dev.azure.com/LumiaWoA/Lumia950XLPkg/_apis/build/status/Lumia950XLPkg%20CI%20build?branchName=master)](https://dev.azure.com/LumiaWoA/Lumia950XLPkg/_build/latest?definitionId=1\u0026branchName=master)\r\n\r\n## What's this?\r\n\r\nThis package demonstrates an AArch64 UEFI implementation for hacked Lumia 950 and Lumia 950 XL. Currently it is able to boot Windows 10 ARM64 as well as various Linux distros. See notes below for more details. Please be aware that MSM8992 devices have limited support.\r\n\r\nHapanero support has been dropped as of 2020/11. Hapanero users are expected to completely understand all hardware, firmware and software implementation details, thus there's no point to keep an untested target floating in this project. For existing Hapanero owners, please build and fix this firmware by yourself (use 950 XL configuration as the blueprint), but no PR regarding Hapanero will be accepted.\r\n\r\n## Support Status\r\nApplicable to all supported targets unless noted.\r\n\r\n- Low-speed I/O: I2C, SPI, GPIO, SPMI and Pinmux (TLMM).\r\n- Power Management: PMIC and Resource Power Manager (RPM).\r\n- High-speed I/O for firmware and HLOS: eMMC (SDR50 in firmware, HS200/HS400 in OS) and microSD (be aware that a few cards are unsupported), PCI Express (Firmware-configured, HLOS Only, x2 Lane)\r\n- Peripherals: Touchscreen (QUP I2C), side-band buttons (TLMM GPIO and PMIC GPIO) and Lattice UC120 (iCE5LP2K) FPGA configuration\r\n- Display FrameBuffer depends on stock Qualcomm UEFI for boostrapping, MDP is not fully implemented.\r\n\r\n## What can you do?\r\n\r\nI am too busy to write an average-user tutorial. So, if you are interested in, you are welcome to\r\ncontribute to an easy instruction for all Lumia 950 (XL) users.\r\n\r\nOr you can buy me a coffee: [PayPal](https://www.paypal.com/paypalme/imbushuo).\r\n\r\n## Build\r\n\r\nIf you are familiar with EDK2, you don't need to use my build script.\r\n\r\n- Checkout a copy of [EDK2](https://github.com/tianocore/edk2). We are currently tracking the `master` branch. At least commit `1b6b4a83e1d85e48837068dfe409f5557b50d71d` works without further modification.\r\n- Checkout this repository under EDK2's worktree.\r\n- Install ACPI tools from your package manager or ACPICA website.\r\n- Install `uuid-dev` and `python` (or equivalent package on your distribution).\r\n- Install [Linaro AArch64 GCC toolchains](http://releases.linaro.org/components/toolchain/binaries/), my build\r\nscript uses `gcc-linaro-7.5.0-2019.12`. Then untar them. I place everything under `/opt` directory, so I have \r\ndirectories like `/opt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-elf/bin`. If you placed it somewhere else, modify build scripts. If you are macOS user, bootstrap the toolchain using ct-ng.\r\n- Run EDK2 BaseTools setup (`make -C BaseTools`).\r\n- Copy `rundbbuild.sh` in `Tools` directory to your EDK2 worktree root directory.\r\n- By default only MSM8994 target is built. To build all, set environment variable `BUILDALL`.\r\n- Start build: `. rundbbuild.sh --950xl --development`\r\n\r\n## WSL Build Notes\r\n\r\nIf you checked out the EDK2 repository under Windows and build it using WSL, you will have trouble locating BaseTools Python classes due to [file case sensitive behavior changes](https://blogs.msdn.microsoft.com/commandline/2018/02/28/per-directory-case-sensitivity-and-wsl/) in WSL. Run the following PowerShell script under EDK2 directory prior to build:\r\n\r\n\tGet-ChildItem .\\BaseTools\\ -Directory -Recurse | Foreach-Object { fsutil.exe file setCaseSensitiveInfo $_.FullName }\r\n\r\nYou only need to run it once.\r\n\r\n## Run\r\n\r\nPer UEFI specification, ARM32 UEFI cannot boot ARM64 binaries directly. A recent engineering\r\nchange removed the dependency of Little Kernel. LK can still boot it, but the path is untested.\r\n\r\nTo run this UEFI build on Lumia 950 XL, the following procedure is required:\r\n\r\n- Check out [Boot Shim](https://github.com/imbushuo/boot-shim). This Boot Manager Application \r\nimplements a simple ELF loader for the kickstarter (LK) with Secure Monitor Call for EL1 transition.\r\nYou will need branch `msm8994-aa64`.\r\n- Place `UEFI.elf` in the WP EFIESP root directory, copy Boot Shim EFI application\r\nto the EFIESP partition, create a new BCD entry for it.\r\n- Select this boot entry to enter UEFI.\r\n\r\nTo re-flash UEFI, simply place new `UEFI.elf` in WP EFIESP root directory.\r\n\r\n## TZ Implementation Notes\r\n\r\nQualcomm Snapdragon MSM8992/MSM8994 implements a subset of [PSCI interface](http://infocenter.arm.com/help//topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf) for multi-processor startup. However, required\r\ncommands like `PSCI_SYSTEM_OFF` and `PSCI_SYSTEM_RESET` are not implemented. Hence we use PMIC to shutdown\r\nplatform (there's a bug in RT that will be fixed) instead of PSCI. Additionally, 8992/8994 uses HVC call for\r\nPSCI commands instead of SMC call.\r\n\r\n## Linux Notes\r\n\r\nThe ACPI tables are copied from stock Windows Phone FFU, hence these device IDs are likely not be recognized by Linux.\r\n\r\nTo get started, starts with the device tree of Qualcomm MSM8994 MTP. The repository `devicetree-rebasing` with \r\nDT content from Android Linux Kernel is sufficient for DT development. To boot with device tree, add it in your\r\nGRUB configuration:\r\n\t\r\n\tdevicetree /lumia-950-xl.dtb\r\n\tlinux /vmlinuz ..... acpi=no\r\n\r\nPSCI partially works in EL1. If you want to use PSCI for multi-processor startup, add the following code to your DT:\r\n\r\n\tpsci {\r\n\t\tcompatible\t= \"arm,psci-0.2\";\r\n\t\tmethod\t\t= \"hvc\";\r\n\t};\r\n\r\nAnd use `psci` for core-enable method. If you are using EL2 startup, use `spin-table` with `per_cpu_mailbox_addr + 0x8` as the release address.\r\n\r\nFor MSM8994, PCI Express Root Port 1 is **firmware-initialized**. Similarly, MSM8992 have PCI Express Root Port 0 initialized. Hence it is not necessary to supply `qcom,pcie` in device tree. Instead, supply a firmware-initialized PCI bus device `pci-host-ecam-generic`. ACPI MCFG table is supplied for your reference.\r\n\r\nNote: interrupt is not configured in the example below (therefore ath10k will crash the system if loaded.)\r\n\r\n\tpci@f8800000 {\r\n\t\tcompatible = \"pci-host-ecam-generic\";\r\n\t\tdevice_type = \"pci\";\r\n\t\t#address-cells = \u003c0x3\u003e;\r\n\t\t#size-cells = \u003c0x2\u003e;\r\n\t\tbus-range = \u003c0x0 0x1\u003e;\r\n\t\t#interrupt-cells = \u003c0x1\u003e;\r\n\r\n\t\treg = \u003c0xf8800000 0x200000\u003e;\r\n\t\tranges = \u003c0x02000000 0x0 0xf8a00000 0xf8a00000 0x0 0x600000\u003e;\r\n\r\n\t\tstatus = \"okay\";\r\n\t};\r\n\r\n## Acknowledgements\r\n\r\n- [EFIDroid Project](http://efidroid.org)\r\n- Andrei Warkentin and his [RaspberryPiPkg](https://github.com/andreiw/RaspberryPiPkg)\r\n- Sarah Purohit\r\n- [Googulator](https://github.com/Googulator/)\r\n\r\n## License\r\n\r\nAll code except drivers in `GPLDriver` directory are licensed under BSD 2-Clause. \r\nGPL Drivers are licensed under GPLv2 license.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWOA-Project%2FLumia950XLPkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWOA-Project%2FLumia950XLPkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWOA-Project%2FLumia950XLPkg/lists"}