config environment and combine kernel mode