使用CONFIG_DEBUG_LOCK_ALLOC构建内核时,ZFS中的许可问题



当我在CONFIG_DEBUG_LOCK_ALLOC上构建主线Ubuntu内核(hirsute)时,构建过程失败,给出以下错误信息

configure: error: Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible with the CDDL license and will prevent the module linking stage from succeeding. You must rebuild your kernel without this option enabled.

表明使用CDDL许可证构建的ZFS会导致问题。我不需要ZFS支持,那么有没有一种方法可以在没有ZFS的情况下构建我的内核?或者,DKMS从互联网上获取ZFS deb文件,所以我可以在本地构建ZFS(在那里我将META文件中的许可证更改为GPL),并使内核使用它,而不是从互联网上获取包。

我按照这里给出的步骤来构建我的内核。

修复结果非常简单。我可以在构建内核时关闭zfs支持,方法是在amd64中将do_zfs标志置为false。

内核源文件