I build and have the mainline kernel running on my WD My Cloud Gen2.
The 4.11.x is well tested and running for weeks. The 4.12 isn’t well tested.
You find all files here https://github.com/Johns-Q/wdmc-gen2
You can download the 4.12 kernel image prebuild here https://github.com/Johns-Q/wdmc-gen2/raw/master/uImage
Just replace the orginal or clean debian kernel image in /boot/
If you need some modules the modules-4.12.tar.gz on github contains the same modules like the 3.10.x.
Extract the tar in the root of your file system.
Everything should work like the 3.10.39 or 3.10.70+