How can I update old Android devices to get fixes? (for issues such as Dirty Cow)
Maybe this is more like what you are looking 
http://forum.xda-developers.com/galaxy-tab-2/galaxy-tab-2-unified/kernel-anykernel-t3484739/post69241933#post69241933

I dont know if this gonna work for you right out of the box probably needs to import the ramdisk files of your device and if its append dtb then you would need your dtb binary 

https://github.com/osm0sis/AnyKernel2