Update kernel-compile.py

move to util functions