redesign kernel definition and compiling environments