2017-04-11 109 views
0

我試圖交叉編譯爲ARM Linux內核4.10.8,但得到這個錯誤:編譯錯誤Linux內核4.10.8針對ARM

 CC [M] drivers/vhost/vhost.o 
In file included from ./include/uapi/linux/stddef.h:1:0, 
       from ./include/linux/stddef.h:4, 
       from ./include/uapi/linux/posix_types.h:4, 
       from ./include/uapi/linux/types.h:13, 
       from ./include/linux/types.h:5, 
       from ./include/uapi/asm-generic/fcntl.h:4, 
       from ./arch/arm/include/uapi/asm/fcntl.h:9, 
       from ./include/uapi/linux/fcntl.h:4, 
       from ./include/linux/fcntl.h:4, 
       from ./include/linux/eventfd.h:11, 
       from drivers/vhost/vhost.c:14: 
drivers/vhost/vhost.c: In function ‘vhost_vring_ioctl’: 
./include/linux/compiler.h:518:38: error: call to ‘__compiletime_assert_1357’ declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE 
    _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)enter 

不知道如何解決這個問題? 我不知道這個模塊用於什麼,所以我不知道我是否真的需要編譯它,但我無法找到在menuconfig中禁用此模塊的位置?

+0

有關如何構建的說明可以通過['Makefile']完成(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/vhost/ Makefile文件)。你可以看到這個符號是** CONFIG_VHOST **,它會被找到(通常)在['Kconfig'](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux .git/tree/drivers/vhost/Kconfig)放在同一個目錄下。您可以使用 '?'在'make menuconfig'中找到符號的位置。你有一個** VHOST_NET **,** VHOST_SCSI **或** VHOST_VSOCK **定義。它可能還有一些其他功能。 '?'也會提供這些信息。 –

回答

0

此模塊(CONFIG_VHOST)通常需要當您需要virtualization支持。如果您不需要,請在make menuconfig中禁用它。

如果您不需要虛擬化,您可以忽略它並繼續構建。