HMD Global, the company that has the rights to produce Nokia branded Android powered smartphones, has released the kernel source code for the Nokia 5.1. The code allows developers to create custom ROMs and recoveries for the phone, which was announced in late May. The bad news is that it would appear as though HMD has no interest in unlocking the phone's bootloader which makes this information superfluous.
But HMD is required to publish the kernel source code as part of the General Public License. And so here we are. The kernel source code for the Nokia 5.1 supports Android 8.1, which happens to be the version of the open source operating system that will come with the device right out of the box.
Other Nokia models with published kernel source codes include:
You can grab all of them directly from HMD's own website by clicking on the sourcelink below.