kernel: Add support for custom build directory