Skip to content

Instantly share code, notes, and snippets.

@iuridiniz
Last active November 9, 2021 19:31
Show Gist options
  • Save iuridiniz/1562fb3f708535d78995d66877727c9c to your computer and use it in GitHub Desktop.
Save iuridiniz/1562fb3f708535d78995d66877727c9c to your computer and use it in GitHub Desktop.
install_ena_2_5_0.sh
#!/bin/sh
# curl -k https://gist.githubusercontent.com/iuridiniz/1562fb3f708535d78995d66877727c9c/raw/install_ena_2_5_0.sh | sh
set -x -e
apt-get install -y \
linux-headers-`uname -r` \
wget \
curl \
build-essential \
rm -rf /usr/local/src/ena-2.5.0 && mkdir -p /usr/local/src/ena-2.5.0
wget https://github.com/amzn/amzn-drivers/archive/refs/tags/ena_linux_2.5.0.tar.gz -O - | tar -C /usr/local/src/ena-2.5.0 --strip-components=3 -xzf - amzn-drivers-ena_linux_2.5.0/kernel/linux/
make -C /usr/local/src/ena-2.5.0/ena
make -C /lib/modules/`uname -r`/build M=/usr/local/src/ena-2.5.0/ena modules_install
# make sure '/usr/lib/modules/*/extra/ena.ko' will have high priority than '/usr/lib/modules/*/kernel/drivers/net/ethernet/amazon/ena/ena.ko'
mkdir -p /etc/depmod.d/
echo "search extra" >/etc/depmod.d/extra.conf
depmod -n | grep '\bena.ko\b'
depmod
modinfo -F version ena
update-initramfs -c -k `uname -r`
set +x +e
echo
echo
echo "REBOOT THE MACHINE"
echo
echo
@iuridiniz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment