Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
61fb04d3
Commit
61fb04d3
authored
Nov 16, 2015
by
Brenden Blanco
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #292 from iovisor/bblanco_dev
Updates to INSTALL.md for readability and ease of use
parents
782158bd
edf7baa6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
40 deletions
+74
-40
INSTALL.md
INSTALL.md
+74
-40
No files found.
INSTALL.md
View file @
61fb04d3
...
...
@@ -5,13 +5,18 @@
In general, to use these features, a Linux kernel version 4.1 or newer is
required. In addition, the following flags should be set:
-
`CONFIG_BPF=y`
-
`CONFIG_BPF_SYSCALL=y`
-
`CONFIG_NET_CLS_BPF=m`
[optional, for tc filters]
-
`CONFIG_NET_ACT_BPF=m`
[optional, for tc actions]
-
`CONFIG_BPF_JIT=y`
-
`CONFIG_HAVE_BPF_JIT=y`
-
`CONFIG_BPF_EVENTS=y`
[optional, for kprobes]
```
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
# [optional, for tc filters]
CONFIG_NET_CLS_BPF=m
# [optional, for tc actions]
CONFIG_NET_ACT_BPF=m
CONFIG_BPF_JIT=y
CONFIG_HAVE_BPF_JIT=y
# [optional, for kprobes]
CONFIG_BPF_EVENTS=y
```
# Ubuntu - Binary
...
...
@@ -19,9 +24,9 @@ Install a 4.3+ kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline,
for example:
```
bash
VER
=
4.3.0-
999
PREFIX
=
http://kernel.ubuntu.com/~kernel-ppa/mainline/
daily/2015-09-21-unstable
/
REL
=
2015
0920215
9
VER
=
4.3.0-
040300
PREFIX
=
http://kernel.ubuntu.com/~kernel-ppa/mainline/
v4.3-wily
/
REL
=
2015
1102094
9
wget
${
PREFIX
}
/linux-headers-
${
VER
}
-generic_
${
VER
}
.
${
REL
}
_amd64.deb
wget
${
PREFIX
}
/linux-headers-
${
VER
}
_
${
VER
}
.
${
REL
}
_all.deb
wget
${
PREFIX
}
/linux-image-
${
VER
}
-generic_
${
VER
}
.
${
REL
}
_amd64.deb
...
...
@@ -80,36 +85,65 @@ To build the toolchain from source, one needs:
*
Clang 3.7, built from the same tree as LLVM
*
cmake, gcc (>=4.7), flex, bison
*
Install build dependencies
*
`sudo apt-get -y install bison build-essential cmake flex git libedit-dev python zlib1g-dev`
*
Build LLVM and Clang development libs
*
`git clone http://llvm.org/git/llvm.git`
*
`cd llvm/tools; git clone http://llvm.org/git/clang.git`
*
`cd ..; mkdir -p build/install; cd build`
*
`cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install ..`
*
`make -j4`
*
`make install`
*
`export PATH=$PWD/install/bin:$PATH`
*
Install and compile BCC
*
`git clone https://github.com/iovisor/bcc.git`
*
`mkdir bcc/build; cd bcc/build`
*
`cmake .. -DCMAKE_INSTALL_PREFIX=/usr`
*
`make`
*
`sudo make install`
## Install build dependencies
```
VER=trusty
echo "deb http://llvm.org/apt/$VER/ llvm-toolchain-$VER-3.7 main
deb-src http://llvm.org/apt/$VER/ llvm-toolchain-$VER-3.7 main" | \
sudo tee /etc/apt/sources.list.d/llvm.list
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install bison build-essential cmake flex git libedit-dev \
libllvm3.7 llvm-3.7-dev libclang-3.7-dev python zlib1g-dev
```
## Install and compile BCC
```
git clone https://github.com/iovisor/bcc.git
mkdir bcc/build; cd bcc/build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
```
# Fedora - From source
*
Install build dependencies
*
`sudo dnf install -y bison cmake ethtool flex git iperf libstdc++-static python-netaddr python-pip gcc gcc-c++ make zlib-devel`
*
`sudo dnf install -y http://pkgs.repoforge.org/netperf/netperf-2.6.0-1.el6.rf.x86_64.rpm`
*
`sudo pip install pyroute2`
*
Install binary clang
*
`wget http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-x86_64-fedora22.tar.xz`
*
`sudo tar xf clang+llvm-3.7.0-x86_64-fedora22.tar.xz -C /usr/local --strip 1`
*
Install and compile BCC
*
`git clone https://github.com/iovisor/bcc.git`
*
`mkdir bcc/build; cd bcc/build`
*
[optional]
`export CC=/usr/local/bin/clang CXX=/usr/local/bin/clang++`
*
`cmake .. -DCMAKE_INSTALL_PREFIX=/usr`
*
`make`
*
`sudo make install`
## Install build dependencies
```
sudo dnf install -y bison cmake ethtool flex git iperf libstdc++-static \
python-netaddr python-pip gcc gcc-c++ make zlib-devel
sudo dnf install -y \
http://pkgs.repoforge.org/netperf/netperf-2.6.0-1.el6.rf.x86_64.rpm
sudo pip install pyroute2
```
## Install binary clang
```
wget http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-x86_64-fedora22.tar.xz
sudo tar xf clang+llvm-3.7.0-x86_64-fedora22.tar.xz -C /usr/local --strip 1
```
## Install and compile BCC
```
git clone https://github.com/iovisor/bcc.git
mkdir bcc/build; cd bcc/build
# optional
export CC=/usr/local/bin/clang CXX=/usr/local/bin/clang++
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
```
# [Old] Build LLVM and Clang development libs
```
git clone http://llvm.org/git/llvm.git
cd llvm/tools; git clone http://llvm.org/git/clang.git
cd ..; mkdir -p build/install; cd build
cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install ..
make -j4
make install
export PATH=$PWD/install/bin:$PATH
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment