This is actually the easiest route.
Because the M5 Lite shipped with Android 8 (Oreo), it supported Project Treble. This means you don't need a device-specific ROM.
Unlock Bootloader: This process varies by device. For Huawei devices, it typically involves applying through the official Huawei bootloader unlock page. Be aware that unlocking the bootloader may void your warranty and can potentially brick your device if not done correctly.
For educational purposes, here is what the custom ROM scene would look like based on the Kirin 710 chipset:
| ROM Type | Examples | Feasibility |
|----------|----------|--------------|
| GSI (Generic System Image) | LineageOS 18.1/19, crDroid, Evolution X | Theoretically possible if Project Treble support exists (EMUI 9+ has it). |
| Kirin-Specific ROMs | OpenKirin ROMs (omniROM, Resurrection Remix) | OpenKirin project ended support for Kirin 710 devices in 2022. |
| Stock-Based Custom ROM | LeWa, MIUI ports | None developed. |