Last active
March 28, 2018 09:15
-
-
Save bave/e3abb7ddea9913c58168 to your computer and use it in GitHub Desktop.
linux netmap patch script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
cd /tmp | |
apt-get update | |
apt-get -y install git build-essential | |
apt-get -y install linux-source linux-headers-generic | |
tar xvf /usr/src/linux-source-`uname -r | awk 'BEGIN { FS="-" } { print $1 }'`.tar.bz2 -C /usr/src | |
git clone https://github.com/luigirizzo/netmap.git | |
cd netmap/LINUX | |
SRC_VAR=/usr/src/linux-source-`uname -r | awk 'BEGIN { FS="-" } { print $1 }'` | |
./configure --kernel-sources=${SRC_VAR} | |
make KSRC=/usr/src/linux-headers-`uname -r` | |
cd ../sys/net | |
ln -s netmap.h /usr/include/net/netmap.h | |
ln -s netmap_user.h /usr/include/net/netmap_user.h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment