Fix configuration generation for kernel