Update VM install for 1.0
Remove all OpenFlow Ref kmod stuff.
This commit is contained in:
+42
-68
@@ -13,9 +13,7 @@ KERNEL_LOC=http://www.stanford.edu/~brandonh
|
|||||||
|
|
||||||
# Kernel params
|
# Kernel params
|
||||||
# These kernels have been tried:
|
# These kernels have been tried:
|
||||||
#KERNEL_NAME=2.6.29.6-custom
|
KERNEL_NAME=2.6.33.1-mininet
|
||||||
#KERNEL_NAME=2.6.33-custom
|
|
||||||
KERNEL_NAME=2.6.33.1-custom
|
|
||||||
#KERNEL_NAME=`uname -r`
|
#KERNEL_NAME=`uname -r`
|
||||||
KERNEL_HEADERS=linux-headers-${KERNEL_NAME}_${KERNEL_NAME}-10.00.Custom_i386.deb
|
KERNEL_HEADERS=linux-headers-${KERNEL_NAME}_${KERNEL_NAME}-10.00.Custom_i386.deb
|
||||||
KERNEL_IMAGE=linux-image-${KERNEL_NAME}_${KERNEL_NAME}-10.00.Custom_i386.deb
|
KERNEL_IMAGE=linux-image-${KERNEL_NAME}_${KERNEL_NAME}-10.00.Custom_i386.deb
|
||||||
@@ -25,12 +23,9 @@ KERNEL_IMAGE_OLD=linux-image-2.6.26-2-686
|
|||||||
|
|
||||||
DRIVERS_DIR=/lib/modules/${KERNEL_NAME}/kernel/drivers
|
DRIVERS_DIR=/lib/modules/${KERNEL_NAME}/kernel/drivers
|
||||||
|
|
||||||
OVS_RELEASE=openvswitch-0.99.2
|
OVS_RELEASE=openvswitch-1.0.1
|
||||||
#OVS_RELEASE=openvswitch
|
|
||||||
OVS_DIR=~/$OVS_RELEASE
|
OVS_DIR=~/$OVS_RELEASE
|
||||||
OVS_KMOD=openvswitch_mod.ko
|
OVS_KMOD=openvswitch_mod.ko
|
||||||
OF_DIR=~/openflow
|
|
||||||
OF_KMOD=ofdatapath.ko
|
|
||||||
|
|
||||||
function kernel {
|
function kernel {
|
||||||
echo "Install new kernel..."
|
echo "Install new kernel..."
|
||||||
@@ -81,7 +76,6 @@ function mn_deps {
|
|||||||
|
|
||||||
# The following will cause a full OF install, covering:
|
# The following will cause a full OF install, covering:
|
||||||
# -user switch
|
# -user switch
|
||||||
# -kernel switch
|
|
||||||
# -dissector
|
# -dissector
|
||||||
# The instructions below are an abbreviated version from
|
# The instructions below are an abbreviated version from
|
||||||
# http://www.openflowswitch.org/wk/index.php/Debian_Install
|
# http://www.openflowswitch.org/wk/index.php/Debian_Install
|
||||||
@@ -93,15 +87,10 @@ function of {
|
|||||||
sudo apt-get install -y git-core automake m4 pkg-config libtool make libc6-dev autoconf autotools-dev gcc
|
sudo apt-get install -y git-core automake m4 pkg-config libtool make libc6-dev autoconf autotools-dev gcc
|
||||||
git clone git://openflowswitch.org/openflow.git
|
git clone git://openflowswitch.org/openflow.git
|
||||||
cd ~/openflow
|
cd ~/openflow
|
||||||
git fetch
|
|
||||||
sudo regress/scripts/install_deps.pl
|
|
||||||
|
|
||||||
# Resume the install:
|
# Resume the install:
|
||||||
#git checkout -b release/0.8.9 origin/release/0.8.9
|
|
||||||
# Use temp 0.8.9 branch that compiles:
|
|
||||||
git checkout -b devel/brandonh/nlfix origin/devel/brandonh/nlfix
|
|
||||||
./boot.sh
|
./boot.sh
|
||||||
./configure --with-l26=/lib/modules/${KERNEL_NAME}
|
./configure
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
@@ -134,11 +123,6 @@ function ovs {
|
|||||||
sudo apt-get -y --force-yes install debian-backports-keyring
|
sudo apt-get -y --force-yes install debian-backports-keyring
|
||||||
sudo apt-get -y --force-yes -t lenny-backports install autoconf
|
sudo apt-get -y --force-yes -t lenny-backports install autoconf
|
||||||
|
|
||||||
#Install OVS from git
|
|
||||||
#git clone git://openvswitch.org/openvswitch
|
|
||||||
#cd openvswitch
|
|
||||||
#./boot.sh
|
|
||||||
|
|
||||||
#Install OVS from release
|
#Install OVS from release
|
||||||
cd ~/
|
cd ~/
|
||||||
wget http://openvswitch.org/releases/${OVS_RELEASE}.tar.gz
|
wget http://openvswitch.org/releases/${OVS_RELEASE}.tar.gz
|
||||||
@@ -150,9 +134,9 @@ function ovs {
|
|||||||
sudo make install
|
sudo make install
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install NOX
|
# Install NOX with tutorial files
|
||||||
function nox {
|
function nox {
|
||||||
echo "Install NOX..."
|
echo "Installing NOX w/tutorial files..."
|
||||||
|
|
||||||
#Install NOX deps:
|
#Install NOX deps:
|
||||||
sudo apt-get -y install autoconf automake g++ libtool python python-twisted swig libboost1.35-dev libxerces-c2-dev libssl-dev make
|
sudo apt-get -y install autoconf automake g++ libtool python python-twisted swig libboost1.35-dev libxerces-c2-dev libssl-dev make
|
||||||
@@ -162,13 +146,11 @@ function nox {
|
|||||||
|
|
||||||
#Install NOX:
|
#Install NOX:
|
||||||
cd ~/
|
cd ~/
|
||||||
#git clone git://noxrepo.org/noxcore
|
|
||||||
# Temporary tutorial repo
|
|
||||||
git clone git://openflowswitch.org/nox-tutorial noxcore
|
git clone git://openflowswitch.org/nox-tutorial noxcore
|
||||||
cd noxcore
|
cd noxcore
|
||||||
|
|
||||||
# With later autoconf versions this doesn't quite work:
|
# With later autoconf versions this doesn't quite work:
|
||||||
./boot.sh || true
|
./boot.sh --apps-core || true
|
||||||
# So use this instead:
|
# So use this instead:
|
||||||
autoreconf --install --force
|
autoreconf --install --force
|
||||||
mkdir build
|
mkdir build
|
||||||
@@ -185,6 +167,35 @@ function nox {
|
|||||||
#./nox_core -v -i ptcp:
|
#./nox_core -v -i ptcp:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Install OFtest
|
||||||
|
function oftest {
|
||||||
|
echo "Installing oftest..."
|
||||||
|
|
||||||
|
#Install deps:
|
||||||
|
sudo apt-get install -y tcpdump python-scapy
|
||||||
|
|
||||||
|
#Install oftest:
|
||||||
|
cd ~/
|
||||||
|
git clone git://openflow.org/oftest
|
||||||
|
cd oftest
|
||||||
|
cd tools/munger
|
||||||
|
sudo make install
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install cbench
|
||||||
|
function cbench {
|
||||||
|
echo "Installing cbench..."
|
||||||
|
|
||||||
|
sudo apt-get install -y libsnmp-dev
|
||||||
|
cd ~/
|
||||||
|
git clone git://www.openflow.org/oflops.git
|
||||||
|
cd oflops
|
||||||
|
sh boot.sh
|
||||||
|
./configure --with-openflow-src-dir=/home/mininet/openflow
|
||||||
|
make
|
||||||
|
sudo make install || true # make install fails; force past this
|
||||||
|
}
|
||||||
|
|
||||||
function other {
|
function other {
|
||||||
echo "Doing other setup tasks..."
|
echo "Doing other setup tasks..."
|
||||||
|
|
||||||
@@ -208,60 +219,22 @@ function other {
|
|||||||
|
|
||||||
#Reduce boot screen opt-out delay. Modify timeout in /boot/grub/menu.lst to 1:
|
#Reduce boot screen opt-out delay. Modify timeout in /boot/grub/menu.lst to 1:
|
||||||
sudo sed -i -e 's/^timeout.*$/timeout 1/' /boot/grub/menu.lst
|
sudo sed -i -e 's/^timeout.*$/timeout 1/' /boot/grub/menu.lst
|
||||||
}
|
|
||||||
|
|
||||||
function of_33 {
|
|
||||||
echo "Installing OpenFlow..."
|
|
||||||
cd ~/
|
|
||||||
cd openflow
|
|
||||||
./configure --with-l26=/lib/modules/${KERNEL_NAME}
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
}
|
|
||||||
|
|
||||||
# OVS v0.99.2 does not build on 2.6.33, and the master branch of OVS includes
|
|
||||||
# patches for OF1.0 support. It doesn't look like there's a supported branch
|
|
||||||
# for v0.99, so the script below applies a patch for this.
|
|
||||||
# Since the patch is in a makefile, we'll have to steal the makefile builder,
|
|
||||||
# boot.sh, from the OVS git repo.
|
|
||||||
function ovs_33 {
|
|
||||||
echo "Installing OpenVSwitch..."
|
|
||||||
cd ~/
|
|
||||||
git clone git://openvswitch.org/openvswitch
|
|
||||||
cp openvswitch/boot.sh $OVS_RELEASE
|
|
||||||
rm -rf openvswitch
|
|
||||||
cd ~/$OVS_RELEASE
|
|
||||||
git apply ~/mininet/util/ovs-fix-2.6.33.patch
|
|
||||||
./boot.sh
|
|
||||||
./configure --with-l26=/lib/modules/${KERNEL_NAME}/build
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
}
|
|
||||||
|
|
||||||
function linux_33 {
|
|
||||||
kernel
|
|
||||||
of_33
|
|
||||||
ovs_33
|
|
||||||
modprobe
|
|
||||||
|
|
||||||
# Clean unneeded debs:
|
# Clean unneeded debs:
|
||||||
rm -f ~/linux-headers-* ~/linux-image-*
|
rm -f ~/linux-headers-* ~/linux-image-*
|
||||||
}
|
}
|
||||||
|
|
||||||
# Script to copy built OVS and OF kernel modules to where modprobe will
|
# Script to copy built OVS kernel module to where modprobe will
|
||||||
# find them automatically. Removes the need to keep an environment variable
|
# find them automatically. Removes the need to keep an environment variable
|
||||||
# for each, and works nicely with multiple kernel versions.
|
# for insmod usage, and works nicely with multiple kernel versions.
|
||||||
#
|
#
|
||||||
# The downside is that after each recompilation of OVS or OF you'll need to
|
# The downside is that after each recompilation of OVS you'll need to
|
||||||
# re-run this script. If you're using only one kernel version, then it may be
|
# re-run this script. If you're using only one kernel version, then it may be
|
||||||
# a good idea to use a symbolic link in place of the copy below.
|
# a good idea to use a symbolic link in place of the copy below.
|
||||||
function modprobe {
|
function modprobe {
|
||||||
echo "Setting up modprobe for OVS kmod..."
|
echo "Setting up modprobe for OVS kmod..."
|
||||||
|
|
||||||
sudo cp $OVS_DIR/datapath/linux-2.6/$OVS_KMOD $DRIVERS_DIR
|
sudo cp $OVS_DIR/datapath/linux-2.6/$OVS_KMOD $DRIVERS_DIR
|
||||||
|
|
||||||
echo "Setting up modprobe for OF kmod..."
|
|
||||||
sudo cp $OF_DIR/datapath/linux-2.6/$OF_KMOD $DRIVERS_DIR
|
|
||||||
|
|
||||||
sudo depmod -a ${KERNEL_NAME}
|
sudo depmod -a ${KERNEL_NAME}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,6 +246,8 @@ function all {
|
|||||||
ovs
|
ovs
|
||||||
modprobe
|
modprobe
|
||||||
nox
|
nox
|
||||||
|
oftest
|
||||||
|
cbench
|
||||||
other
|
other
|
||||||
echo "Please reboot, then run ./mininet/util/install.sh -c to remove unneeded packages."
|
echo "Please reboot, then run ./mininet/util/install.sh -c to remove unneeded packages."
|
||||||
echo "Enjoy Mininet!"
|
echo "Enjoy Mininet!"
|
||||||
@@ -310,7 +285,7 @@ if [ $# -eq 0 ]
|
|||||||
then
|
then
|
||||||
all
|
all
|
||||||
else
|
else
|
||||||
while getopts 'acdfhkmntvxy' OPTION
|
while getopts 'acdfhkmntvx' OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
a) all;;
|
a) all;;
|
||||||
@@ -324,7 +299,6 @@ else
|
|||||||
t) other;;
|
t) other;;
|
||||||
v) ovs;;
|
v) ovs;;
|
||||||
x) nox;;
|
x) nox;;
|
||||||
y) linux_33;;
|
|
||||||
?) usage;;
|
?) usage;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
>From 0ccd7844bbe9f6014d162c573e796c8c6f3f707b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ben Pfaff <blp@nicira.com>
|
|
||||||
Date: Tue, 23 Mar 2010 09:27:08 -0700
|
|
||||||
Subject: [PATCH] datapath: Support 2.6.33 kernel layout in build system.
|
|
||||||
|
|
||||||
The 2.6.33 kernel moves generated header files to include/generated, so
|
|
||||||
we need to look for autoconf.h there.
|
|
||||||
|
|
||||||
Reported-by: Brandon Heller <brandonh@stanford.edu>
|
|
||||||
---
|
|
||||||
acinclude.m4 | 5 +++--
|
|
||||||
datapath/linux-2.6/Makefile.main.in | 7 +++++--
|
|
||||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/acinclude.m4 b/acinclude.m4
|
|
||||||
index e38676f..abbc57e 100644
|
|
||||||
--- a/acinclude.m4
|
|
||||||
+++ b/acinclude.m4
|
|
||||||
@@ -70,8 +70,9 @@ AC_DEFUN([OVS_CHECK_LINUX26], [
|
|
||||||
AC_ERROR([Linux kernel in build tree $KBUILD26 (source tree $KSRC26) is not version 2.6])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
- if ! test -e "$KBUILD26"/include/linux/version.h || \
|
|
||||||
- ! test -e "$KBUILD26"/include/linux/autoconf.h; then
|
|
||||||
+ if test ! -e "$KBUILD26"/include/linux/version.h || \
|
|
||||||
+ (test ! -e "$KBUILD26"/include/linux/autoconf.h && \
|
|
||||||
+ test ! -e "$KBUILD26"/include/generated/autoconf.h); then
|
|
||||||
AC_MSG_ERROR([Linux kernel source in $KBUILD26 is not configured])
|
|
||||||
fi
|
|
||||||
OVS_CHECK_LINUX26_COMPAT
|
|
||||||
diff --git a/datapath/linux-2.6/Makefile.main.in b/datapath/linux-2.6/Makefile.main.in
|
|
||||||
index fd231e6..cb2a042 100644
|
|
||||||
--- a/datapath/linux-2.6/Makefile.main.in
|
|
||||||
+++ b/datapath/linux-2.6/Makefile.main.in
|
|
||||||
@@ -42,9 +42,12 @@ ifeq (,$(wildcard $(VERSION_FILE)))
|
|
||||||
$(error Linux kernel source not configured - missing version.h)
|
|
||||||
endif
|
|
||||||
|
|
||||||
-CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
|
|
||||||
+CONFIG_FILE := $(KSRC)/include/generated/autoconf.h
|
|
||||||
ifeq (,$(wildcard $(CONFIG_FILE)))
|
|
||||||
- $(error Linux kernel source not configured - missing autoconf.h)
|
|
||||||
+ CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
|
|
||||||
+ ifeq (,$(wildcard $(CONFIG_FILE)))
|
|
||||||
+ $(error Linux kernel source not configured - missing autoconf.h)
|
|
||||||
+ endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
default:
|
|
||||||
--
|
|
||||||
1.6.6.1
|
|
||||||
Reference in New Issue
Block a user