build kernel script