What causes kernel to be rebuilt? And how can I go back and build packages for an old kernel if need be?

Hi all,

I will be have many LEDE units out in the wild. I'm concerned that if I need to build a package, I'll need to build it for all the kernels out in the wild. I'd rather not have them all sysupgrade every-time.

After doing a bit of research it seems that the kernel version is based on the hash of the .config file? Is this correct? If so would it be possible just to use tags on ./script/env git repository. That way if I have different kernels in the wild I can go back to each kernel via its tag in ./script/env repo which will reload the exact same config file. Then build the package?

Also just out of curiosity what exactly cause the kernel to be rebuilt? I know that to build the kernel you run:

make target/linux

The target/linux must depend on prerequisites that cause it to be rebuilt. I'm finding it hard to trackdown this target though. So my final question I guess is what prerequisites cause the kernel to be rebuilt?

Thanks in advance