Build a basic system with armbian build tool, you can select Nanopi M4 as build choice minimal to install Dietpi with the installer script.
No errors so far and hardware works i think, now i have soundcard options, i will further test all the hardware the next days and keep you informed.
I think i have the solution for 100% working Nanopi M4 system! 
Please check:
https://github.com/armbian/build
How does this compare with the prebuilt Armbian images?
All hardware seems to work wel using this method, and with the armbian prebuild image gotproblems using the dietpi installer script, and with that build script for armbian you can make a minimal terminal based system with all the hardware drivers, in the past i got errors and hardware trouble with armbian prebuild image.
Great, I’ll have to try that with my NanoPi NEO4 … It’s a brilliant piece of hardware (currently running a 15TB raid array as a backup NAS). I’m planning on adding Jellyfin to it soon.
In theory the image you created for your M4 should work on the NEO4 (The NEO4, M4 and T4 are all variations on the same hardware), I’d use the T4 image but that only supports EMMC and the NEO4 is SD only.
With the Armbian build tool you can choose your single board computer brand to build, if i am not wrong even the NanoPi NEO4, and then you choose to build a minimal terminal system and write it to microsd card en start the dietpi script on it. and that image is just part of the list!
Greeting
Did anyone test if M4/NEO4/T4 can run with the same image?
Will redo them with either the build tools or Armbian minimal server image the next days.
I just created a new image to test on my NEO4, I’ll generate an image for the M4 and see if it works on the NEO as well.
Looking on the Armbian forums it looks like they just got the M4v2 up and running https://forum.armbian.com/topic/11710-nanopi-m4-v2-m4-image-not-working/page/3/?tab=comments#comment-88869
So far the M4 image seems to be working fine, I’ve not been able to test wifi or video as this is a headless server
Here is its benchmark using the M4 image (and installed as a T4 using the prep script)
![]()

Just want to jump onboard and note that I followed the directions here: https://github.com/MichaIng/DietPi/issues/2399#issuecomment-478277872 with the latest Armbian image (19.11.13 buster) and ended up with a perfectly functional image that I have booting on 3 NanoPI M4s via SD.
post your benchmarks!
I’m guessing the M4 should have a bit of a performance bump over mine.