Ok, I’ve managed to make it work although not exactly as it should.
I’ve followed the instructions here: http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M3#Make_Your_Own_OS_Image
Specifically the sections:
[]Install Cross Compiler
[]Prepare mkimage
I’ve installed the u-boot-tools via
sudo apt-get install u-boot-tools
but follow the instructions on the aforementioned page if your distro does not provide this package.
Now execute the following commands:
git clone https://github.com/friendlyarm/linux-3.4.y.git
cd linux-3.4.y
git checkout nanopi2-lollipop-mr1
Then:
touch .scmversion
make nanopi3_linux_defconfig
make menuconfig
IMPORTANT: Go to File Systems → Network Filesystems and enable CIFS
then
make uImage
After a looooong time you’ll find the compiled uImage file in the arch/arm/boot/ subdirectory
I’ve copied this file in the boot partition of the SD card, but after booting up the M3 I’ve noticed no changes in behavior… CIFS shares still wouldn’t mount.
Then I’ve tried renaming the newly compiled uImage to uImage.hdmi and when I rebooted, CIFS magically worked.
Since I’m using the M3 as a headless machine, this is not relevant to me.
I’m not sure why DietPi is booting with the uImage.hdmi file by default, but I guess that those who need the LCD/HDMI support should fiddle with this section during the menuconfig phase.
Device Drivers -->
Graphics support -->
Nexell Graphics -->
[ ] LCD
[ ] HDMI
Maybe Fourdee would be able to explain this better. I’m sorry but I have not enough knowledge nor I’m skilled enough to go beyond this point 
Anyway… CIFS is now enabled. Yippee! 
If you run a headless machine too and you don’t want to compile the kernel yourself, you can also take the shortcut and download the kernel compiled by me here: http://www.mediafire.com/?romf7vmc7ta14
But remember to rename it uImage.hdmi before copying it onto the SD card or you won’t notice any changes.