How can I disable the GPS functionality from my android phone at the kernel level?
Assuming you still have the original ROM installed on your mobile, this will not be possible, because on the original kernels there are no options in-build in the kernel to toggle the components at that level.

In case your phone is rooted, you can always use a custom kernel that would have this kind of option, which in my opinion is very rare because itsn't an option generally sought.

Also, assuming you can include a feature like this manually (in sources), you will have to re-compile the kernel, which is not necessarily easy for someone inexperienced in this field.