• Stars
    star
    364
  • Rank 117,101 (Top 3 %)
  • Language
    C
  • License
    BSD 2-Clause "Sim...
  • Created over 6 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Non-EOL (yes!) AArch64 UEFI firmware for Lumia 950 / Lumia 950 XL

EDK2 UEFI Implementation for Lumia 950 and Lumia 950 XL

For users

You 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.

Build Status (Visual Studio Team Services)

What's this?

This 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.

Hapanero 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.

Support Status

Applicable to all supported targets unless noted.

  • Low-speed I/O: I2C, SPI, GPIO, SPMI and Pinmux (TLMM).
  • Power Management: PMIC and Resource Power Manager (RPM).
  • 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)
  • Peripherals: Touchscreen (QUP I2C), side-band buttons (TLMM GPIO and PMIC GPIO) and Lattice UC120 (iCE5LP2K) FPGA configuration
  • Display FrameBuffer depends on stock Qualcomm UEFI for boostrapping, MDP is not fully implemented.

What can you do?

I am too busy to write an average-user tutorial. So, if you are interested in, you are welcome to contribute to an easy instruction for all Lumia 950 (XL) users.

Or you can buy me a coffee: PayPal.

Build

If you are familiar with EDK2, you don't need to use my build script.

  • Checkout a copy of EDK2. We are currently tracking the master branch. At least commit 1b6b4a83e1d85e48837068dfe409f5557b50d71d works without further modification.
  • Checkout this repository under EDK2's worktree.
  • Install ACPI tools from your package manager or ACPICA website.
  • Install uuid-dev and python (or equivalent package on your distribution).
  • Install Linaro AArch64 GCC toolchains, my build script uses gcc-linaro-7.5.0-2019.12. Then untar them. I place everything under /opt directory, so I have directories 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.
  • Run EDK2 BaseTools setup (make -C BaseTools).
  • Copy rundbbuild.sh in Tools directory to your EDK2 worktree root directory.
  • By default only MSM8994 target is built. To build all, set environment variable BUILDALL.
  • Start build: . rundbbuild.sh --950xl --development

WSL Build Notes

If 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 in WSL. Run the following PowerShell script under EDK2 directory prior to build:

Get-ChildItem .\BaseTools\ -Directory -Recurse | Foreach-Object { fsutil.exe file setCaseSensitiveInfo $_.FullName }

You only need to run it once.

Run

Per UEFI specification, ARM32 UEFI cannot boot ARM64 binaries directly. A recent engineering change removed the dependency of Little Kernel. LK can still boot it, but the path is untested.

To run this UEFI build on Lumia 950 XL, the following procedure is required:

  • Check out Boot Shim. This Boot Manager Application implements a simple ELF loader for the kickstarter (LK) with Secure Monitor Call for EL1 transition. You will need branch msm8994-aa64.
  • Place UEFI.elf in the WP EFIESP root directory, copy Boot Shim EFI application to the EFIESP partition, create a new BCD entry for it.
  • Select this boot entry to enter UEFI.

To re-flash UEFI, simply place new UEFI.elf in WP EFIESP root directory.

TZ Implementation Notes

Qualcomm Snapdragon MSM8992/MSM8994 implements a subset of PSCI interface for multi-processor startup. However, required commands like PSCI_SYSTEM_OFF and PSCI_SYSTEM_RESET are not implemented. Hence we use PMIC to shutdown platform (there's a bug in RT that will be fixed) instead of PSCI. Additionally, 8992/8994 uses HVC call for PSCI commands instead of SMC call.

Linux Notes

The ACPI tables are copied from stock Windows Phone FFU, hence these device IDs are likely not be recognized by Linux.

To get started, starts with the device tree of Qualcomm MSM8994 MTP. The repository devicetree-rebasing with DT content from Android Linux Kernel is sufficient for DT development. To boot with device tree, add it in your GRUB configuration:

devicetree /lumia-950-xl.dtb
linux /vmlinuz ..... acpi=no

PSCI partially works in EL1. If you want to use PSCI for multi-processor startup, add the following code to your DT:

psci {
	compatible	= "arm,psci-0.2";
	method		= "hvc";
};

And 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.

For 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.

Note: interrupt is not configured in the example below (therefore ath10k will crash the system if loaded.)

pci@f8800000 {
	compatible = "pci-host-ecam-generic";
	device_type = "pci";
	#address-cells = <0x3>;
	#size-cells = <0x2>;
	bus-range = <0x0 0x1>;
	#interrupt-cells = <0x1>;

	reg = <0xf8800000 0x200000>;
	ranges = <0x02000000 0x0 0xf8a00000 0xf8a00000 0x0 0x600000>;

	status = "okay";
};

Acknowledgements

License

All code except drivers in GPLDriver directory are licensed under BSD 2-Clause. GPL Drivers are licensed under GPLv2 license.

More Repositories

1

WOA-Deployer-Rpi

WOA Deployer for Raspberry Pi
C#
966
star
2

WoA-Installer-Rpi

This repository was deprecated, use:
C#
850
star
3

WOA-Deployer-Lumia

Making your Lumias great again!
C#
481
star
4

SurfaceDuo-Guides

Guides for the Surface Duo
Python
280
star
5

Lumia-Drivers

Collection of driver binaries for Lumia devices
C#
187
star
6

mu_andromeda_platforms

Project Mu UEFI Firmware for Surface Duo Devices
C
159
star
7

SurfaceDuo-Drivers

Collection of driver binaries for Surface Duo devices
Batchfile
156
star
8

MSM8994-8992-NT-ARM64-Drivers

Desktop Windows (ARM64) driver collection for MSM8992/8994 SoCs.
137
star
9

guides

Guides relevant to WOA
110
star
10

WOA-Deployer

WOA Deployer
C#
90
star
11

Qualcomm-Reference-Drivers

Reference Drivers for Select Qualcomm Reference Platforms found on Windows Update
Batchfile
81
star
12

woadialer

A dialer based on UWP and .NET for the WoA on Lumia Project.
C#
80
star
13

img2ffu

Converts raw image (img) files into full flash update (FFU) files
C#
42
star
14

Chat

Send text messages using your device builtin phone modem.
C#
37
star
15

WOA-Device-Manager

WOA Device Manager helps you install, update and manage Windows on your Android device.
C#
35
star
16

DriverUpdater

Utility to update drivers on Lumia 950 and Surface Duo family of devices
C#
30
star
17

AndroidDebugBridge

The Android Debug Bridge Protocol, implemented in C# / .NET
C#
27
star
18

LumiaUSBC

USB-C controller driver for the Nokia Lumia 950 and 950XL
C
26
star
19

LumiaWOA

The github site for LumiaWOA
HTML
25
star
20

FastBoot

The FastBoot USB protocol, implemented in C# / .NET
C#
20
star
21

UEFIReader

Tool to generate .inf payloads for use in various other UEFI projects out of an existing UEFI volume
C#
16
star
22

LumiaApp

The Windows Settings app for LumiaWOA
C#
13
star
23

USBFunctionModeSwitcher

Switch USB port roles on phones running Windows Desktop
C++
12
star
24

SurfaceDuo-Releases

Released materials as part of the DuoWOA Project. Also contains release information and changelogs
12
star
25

Project-Croissant

Croissant aims to provide open source Windows Drivers for various Qualcomm Snapdragon Platforms as well as compatibility bridges for existing drivers whenever possible.
C
11
star
26

reg2inf

Convert reg driver to an installable inf (beta) - For splitted BSP regs
C#
10
star
27

windows_xde_emulator_oem_surface_dual_screen_arm_skin

Surface Duo Emulator Skin for Microsoft XDE Emulator
9
star
28

DisplayDockFlyout

A flyout for Microsoft HD-500 Display Dock
C#
9
star
29

RKHReader

A tool to read the root key hash from most Qualcomm signed binaries/dsp firmwares/partitions (works on both last decade and modern day devices!)
C#
9
star
30

FirmwareGen

Windows Desktop Firmware generation tool for Lumias. Builds Firmwares under 2 hours
C#
9
star
31

GlanceScreen

Settings application for Glance Screen
C++
8
star
32

windows_apps_oem_mmo_advanced_info

Advanced Info application for LumiaWOA
C++
7
star
33

DuoWOA

TypeScript
6
star
34

Project-Chocolatine

Chocolatine is a bridge enabling interopability between Qualcomm Technologies Properietary Windows Drivers and Croissant Windows Drivers
6
star
35

AeoBUtils

C#
5
star
36

PowerSupplyNotifier

Notifies the user when a power supply gets connected by playing a sound
C++
5
star
37

Community-Issues

A repository for hosting conversations and tracking issues related to anything about the project
5
star
38

ResignBSP

Tool meant to simplify resigning tasks of various subrepos.
C#
5
star
39

SurfaceApp

The Windows Settings app for DuoWOA
C++
4
star
40

Ice5Lp2k

Driver for Lattice UC120 USB-C PD PHY Chip based on Lattice iCE5LP2K FPGA
C
4
star
41

Specifics-Cityman

Lumia 950 XL Specific Drivers
4
star
42

SurfaceDuoDualBootKernelImagePatcher

Utility to help patch kernel images with ease to support SurfaceDuoPkg Dual Boot / Untethered Boot method
C#
4
star
43

firmware_oem_surface_dual_screen_zeta

Firmware files extracted from official OTA packages for Surface Duo 2
BitBake
4
star
44

SurfaceMini-Stuff

A collection of random Surface Mini related things
ASL
4
star
45

NTrig-Andromeda-Configurations

Repository holding the N-Trig Configuration Databases for the Surface Andromeda Family of devices
4
star
46

UnifiedFlashingPlatform

The Unified Flashing Platform Protocol, implemented in C# / .NET
C#
4
star
47

windows_hardware_usb_mux_fsa4480_src

Driver for the ON Semi. FSA4480 USB-C Audio Analog Switch/DP AUX
C
3
star
48

Deployment-Scripts

Deployment scripts for use with WOA Deployer
3
star
49

SurfaceDuoBinaries

This repository contains various UEFI firmwares extracted using https://github.com/WOA-Project/UEFIReader
BitBake
3
star
50

SurfaceDuo2Pkg

ASL
3
star
51

acpi_oem_surface_dual_screen_common

Windows ACPI 5.0 Firmware for Surface Duo Devices
ASL
3
star
52

Support-Desktop-Drivers

Support drivers for NT Desktop
Batchfile
3
star
53

UserFirstLogonExperience

Work in progress UI for selecting one shell for the LumiaWOA project
C#
3
star
54

SurfaceDisplayConfiguratorService

Configures Display Topology and Settings on device first run.
C++
3
star
55

windows_oem_surface_dual_screen_sensors_tests

Testing client for Andromeda Sensors (Fold, Flip, Posture...)
C++
3
star
56

LumiaNull

Common nulled devices for Lumia devices
C
3
star
57

RILServiceInit

Initializes a RIL on Windows systems
C
3
star
58

BoardIdDecode

Decode Linux Android (LA)'s Device Tree Board Applicability Parameters
C#
3
star
59

SurfaceSOCPartitionFilter

C
3
star
60

windows_silicon_qcom_kona

Platform drivers for Snapdragon 865 ("Kona") devices
3
star
61

Specifics-MMO-Drivers

MMO Specific drivers
Batchfile
2
star
62

DT2XmlPanelCmdConverter

An utility to convert Device Tree Panel Command sequences to Xml Command Sequences for Qualcomm Platforms
C#
2
star
63

windows_hardware_battery_bq27742_src

Fuel gauge drivers for Surface Duo
C
2
star
64

SubExtInfUpdater

An utility to help update Qualcomm Subsystem Extension INFs with newer binaries or different binaries
C#
2
star
65

QCBSPRenamer

C#
2
star
66

WMRilShim

Shim for WMRil
C++
2
star
67

windows_apps_oem_mmo_color_profile

Change the color profile of a Lumia display with windows native integration and night light support
C++
2
star
68

PhoneSvcPermissionUpdaterService

PhoneSvc Permission Updater Service
C++
2
star
69

windows_silicon_qcom_hana

Platform drivers for Snapdragon 855 ("Hana") devices
Roff
2
star
70

windows_andromeda_platforms

Windows Drivers for Andromeda Platforms
Batchfile
2
star
71

windows_qcom_platforms

Batchfile
2
star
72

windows_silicon_qcom_waipio

Platform drivers for Snapdragon 8 Gen 1 ("Waipio") devices
2
star
73

PDCAnalyser

PDCAnalyser is a set of tools designed to make you understand instead of wondering how PDC interrupts work on select Qualcomm Compute Platforms ACPI Tables and Driver sets
C#
2
star
74

GetMBNLoadInfo

Get load image information out of MBN files (e.g. Sizes)
C#
2
star
75

SurfaceTouchPanelAlignment

C
2
star
76

NTrigConfigurationTools

Enables decompiling, recompiling, parsing, dumping, editing Surface's N-Trig Digitizer Project Tuning Configuration Databases (PSDB/PS CFG DATA)
C#
2
star
77

SurfaceDuo-SensorSDK

2
star
78

windows_apps_oem_mmo_touch_settings

Settings application for the touch driver on Lumias
C++
1
star
79

LumiaWoA.github.io

Site
1
star
80

Specifics-Talkman

Lumia 950 Specific Drivers
1
star
81

DataManagementSvc

Data Management Service (DataManagementSvc) - Enables data connection on multi sim devices
C
1
star
82

MobileBridge

Mobile Bridge Services & Tools so Lumias can be made great again! (on Desktop or WCOS)
C
1
star
83

Not-NPETSEC

Modem activation bootstrapper library for Nokia's APPerso
C++
1
star
84

VibrationSettings

Brings vibration settings for Windows ARM64 phone devices
C++
1
star
85

TouchPower

The Touch Power driver used by Lumias for gating P-States linked to the digitizer.
C
1
star
86

Tips

Tips application for the LumiaWOA project
C#
1
star
87

windows_oem_surface_common

1
star
88

windows_oem_surface_dual_screen_epsilon

Roff
1
star
89

windows_silicon_qcom_lanai

Platform drivers for Snapdragon 8 Gen 3 ("Lanai") devices
1
star
90

windows_oem_surface_dual_screen_zeta

PowerShell
1
star
91

windows_oem_surface_dual_screen_common

Common drivers for Surface OEM Dual Screen devices
1
star
92

AutoRotate

Auto rotation tool for Phones
C++
1
star
93

windows_silicon_qcom_lahaina

Platform drivers for Snapdragon 888 ("Lahaina") devices
1
star
94

firmware_oem_surface_dual_screen_epsilon

Firmware files extracted from official OTA packages for Surface Duo (First Generation)
Roff
1
star
95

icaros_cam_esp_thermal

C
1
star
96

INFCleaner

Tool to help cleanup INF files
C#
1
star