Install Linux 5.x to NanoPi M4

git clone https://github.com/heiher/kernel-nanopi-m4
 
cd kernel-nanopi-m4
 
./generate.sh /dev/mmcblk0
 
sudo dd if=output/boot/param.img of=/dev/mmcblk0 bs=1M seek=4
sudo dd if=output/boot/kernel.img of=/dev/mmcblk0 bs=1M seek=32
sudo dd if=output/boot/resource.img of=/dev/mmcblk0 bs=1M seek=20
sudo cp -a output/modules/* /usr/lib/modules/
sudo chown -R root:root /usr/lib/modules

Over!