reading and building the kernel