AWS文档说明您需要构建源以获得为Ubuntu AMI启用的增强联网: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sriov-networking.html#enhanced-networking-ubuntu
目前美国西部2-xenial,ami-835b4efa的AMI失败了:
Building module:
cleaning build area....
cd src/; make BUILD_KERNEL=4.4.0-1020-aws....(bad exit status: 2)
ERROR (dkms apport): binary package for ixgbevf: 3.1.2 not found
Error! Bad return status for module build on kernel: 4.4.0-1020-aws (x86_64)
Consult /var/lib/dkms/ixgbevf/3.1.2/build/make.log for more information.
答案 0 :(得分:9)
这是AWS内核命名对话的问题。
查看日志文件:
root@ip-10-16-80-225:/home/ubuntu# cat /var/lib/dkms/ixgbevf/3.1.2/build/make.log
DKMS make.log for ixgbevf-3.1.2 for kernel 4.4.0-1020-aws (x86_64)
Wed Jun 28 15:34:22 PDT 2017
make -C /lib/modules/4.4.0-1020-aws/build SUBDIRS=/var/lib/dkms/ixgbevf/3.1.2/build/src modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-1020-aws'
CC [M] /var/lib/dkms/ixgbevf/3.1.2/build/src/ixgbevf_main.o
In file included from /var/lib/dkms/ixgbevf/3.1.2/build/src/ixgbevf.h:41:0,
from /var/lib/dkms/ixgbevf/3.1.2/build/src/ixgbevf_main.c:53:
/var/lib/dkms/ixgbevf/3.1.2/build/src/kcompat.h:755:2: error: #error UTS_UBUNTU_RELEASE_ABI is too large...
#error UTS_UBUNTU_RELEASE_ABI is too large...
^
scripts/Makefile.build:258: recipe for target '/var/lib/dkms/ixgbevf/3.1.2/build/src/ixgbevf_main.o' failed
它抱怨UTS_UBUNTU_RELEASE_ABI
Ubuntu内核文档声明内核版本的第4个数字是ABI,https://wiki.ubuntu.com/KernelTeam/BuildSystem/ABI,但当前的AWS内核版本是:
Linux ip-10-16-89-81 4.4.0-1020-aws
查看/usr/src/ixgbevf/src/kcompat.h中有问题的代码:
#if UTS_UBUNTU_RELEASE_ABI > 255
#error UTS_UBUNTU_RELEASE_ABI is too large...
#endif /* UTS_UBUNTU_RELEASE_ABI > 255 */
人们可以看到这不会飞,1020是>超过255
这是一个脚本,我用它作为自定义包postinst来解决这个问题。如果您在〜/
中有来自https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/3.1.2/的源tgz,也可以直接从shell运行此脚本%> cat src/deb/control/postinst
#!/bin/bash -e
[ "${DEBUG}" ] && set -x
cd ~/ixgbevf
ver="3.1.2"
tar -xzf ~/ixgbevf-${ver}.tar.gz
rm -rf /usr/src/ixgbevf-${ver}
mv ixgbevf-${ver} /usr/src/
touch /usr/src/ixgbevf-${ver}/dkms.conf
kernelver=$(uname -r)
cat <<-EOT > /usr/src/ixgbevf-${ver}/dkms.conf
PACKAGE_NAME="ixgbevf"
PACKAGE_VERSION="${ver}"
CLEAN="cd src/; make clean"
MAKE="cd src/; make BUILD_KERNEL=\${kernelver}"
BUILT_MODULE_LOCATION[0]="src/"
BUILT_MODULE_NAME[0]="ixgbevf"
DEST_MODULE_LOCATION[0]="/updates"
DEST_MODULE_NAME[0]="ixgbevf"
AUTOINSTALL="yes"
EOT
# Hack for /usr/src/ixgbevf-3.1.2/src/kcompat.h:755:2: error: #error UTS_UBUNTU_RELEASE_ABI is too large...
# #if UTS_UBUNTU_RELEASE_ABI > 255
#
sed -i 's/#if UTS_UBUNTU_RELEASE_ABI > 255/#if UTS_UBUNTU_RELEASE_ABI > 99255/' /usr/src/ixgbevf-${ver}/src/kcompat.h
dkms remove ixgbevf -v ${ver} --all 2>/dev/null || true
dkms add -m ixgbevf -v ${ver}
dkms build -m ixgbevf -v ${ver}
dkms install -m ixgbevf --all
dkms autoinstall -m ixgbevf
update-initramfs -c -k all
modinfo ixgbevf
我已经向AWS通报了这一情况,但是在此期间,希望这将为其他人节省WTF时刻'这不是我今天想做的'
编辑:
获得AWS的跟进 - 他们正在向英特尔驱动程序支持团队推广。这是驾驶员的检查假设ABI&lt;已损坏的255,而不是AWS内核版本控制方案。
答案 1 :(得分:6)
此问题的解决方法是通过运行以下命令来禁用此检查:
$ sudo sed -i '/#if UTS_UBUNTU_RELEASE_ABI > 255/c\/*#if UTS_UBUNTU_RELEASE_ABI > 255' /usr/src/ixgbevf-2.16.4/src/kcompat.h