accept KERNEL_DIR environment var