Huawei today released the kernel source code for Kirin 970 and 980 under GPL or General Public License. This source code is for Pie release. If you know, the GPL allows the user to get hands-on the kernel source code freely. Yes, Android has Linux kernel, and yes it comes under GPL as well.
Due to some unknown reasons, OEM has started locking their devices, by encrypting the kernel source code. Which in turn makes the system kind of device that can’t be rooted. However, on the other hand, we have some OEMs like Xiaomi who releases the source code and can be easily played with. Although Huawei has removed all the official unlocking tools, they still released the code. We don’t know, why.
You have some unofficial way to unlock the devices with Kirin 970 and 980, but, according to XDA, can be costly. You can read about the unlocking methods directly from their blog.
You can head to XDA for the download links of the kernel source code.
Also, read: Galaxy A8s might head straight to South Korea