make the kernel compile process more generic