"Also you need to be on latest M firmware to flash the ROM." means I have to be on last Android M cm (aka cm 13) or last miui Android M?
I'm on MIUI 8 5.1.1 right now
Not MIUI 8 5.1.1 since its Lollipop, M is for Marshmallow....
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer? | Terms of Service