Install Barefoot SDE P4 Studio developed by Intel

# NOTE: This installation need to be performed on a virtual machine, such as, Ubuntu Server 16.04 LTS in CERN OpenStack
# P4Studio Installation: bf-sde-9.7.0.10175

# Copy files from local into the virtual machine
# Centos 8
scp -r bf-sde-9.7.0.10175-cpr.tgz root@p4lang-centos8-250GB-vm:/home/mmisamor/volume-disk
# Ubuntu
scp -r bf-sde-9.7.0.10175-cpr.tgz mmisamor@p4lang-ubuntu1604LTS-250GB-vm:~/volume-disk

# Connect to the virtual machine
# Centos 8
ssh root@p4lang-centos8-250GB-vm
# Ubuntu 
ssh mmisamor@p4lang-ubuntu1604LTS-250GB-vm
sudo su

# Untar bf-sde-9.7.0 compiler
tar xzvf bf-sde-9.7.0.10175-cpr.tgz
cd bf-sde-9.7.0.10175-cpr/p4studio

#### Verify if the repository PowerTools is properly set
#### These steps are only needed if Centos 8 virtual machine is used
#########################
#### Begin
grep -r "PowerTools" 
#### Edit and change "PowerTools" to "powertools" in all the files listed above, for example
vi dependencies/dependency_installer.py
#### Use recursive edit line in vim
:%s/PowerTools/powertools/g
:wq
#### Verify if PowerTools is now properly set: now no files should be listed...
grep -r "PowerTools" 
#### End
#########################

# Export environmental variable
export SDE=/home/mmisamor/volume-disk/bf-sde-9.7.0.10175-cpr
export SDE_INSTALL=$SDE/install
export PATH=$SDE_INSTALL/bin:$PATH

# Extract all packages
cd bf-sde-9.7.0.10175-cpr
./extract_all.sh

# Install dependencies
cd p4studio
./install-p4studio-dependencies.sh

# Launch p4studio tool to install the compiler in an interactive way
./p4studio interactive
Do you want to install dependencies? [Y/n]: yes
Do you want to build switch-p4-16? [y/N]: yes
Please provide the profile to build switch with (d2_tofino, j1_tofino, m1_tofino, x1_tofino, x2_tofino, y1_tofino2, y2_tofino2, z2_tofino2) [x1_tofino]: x1_tofino
Do you want to build bf-diags? [y/N]: no
Do you want to build P4-14 examples? [y/N]: no
Do you want to build P4-16 examples? [Y/n]: yes
Please provide architecture for bf-diags and p4-examples (tofino, tofino2, tofino2m, tofino2h, all) [tofino]: tofino
Do you want to build for HW? [y/N]: no (select 'yes' if is going to be installer on the real hardware)
Do you want to enable P4Runtime? [y/N]: no
Do you want to write it to a file? [y/N]: yes (write into a file)
Please provide the profile filename - [Example:profiles/my-profile.yaml]: profiles/carmen-sw-profile.yaml
Do you want to continue building SDE? [y/N]: yes
# The installation will take a while...

# Install Packet Test Framework Scapy
pip install --pre scapy
git clone https://github.com/p4lang/ptf
cp -rf ptf/ptf $SDE_INSTALL/bin
cp -rf ptf/src/* $SDE_INSTALL/lib/python2.7/site-packages

# Create a symbolic name for the compiler
ln -s /home/mmisamor/volume-disk/bf-sde-9.7.0.10175-cpr ~/sde
# Verify that the symbolic name works
cd ~/sde/p4studio

# Untar ica-tools and create symbolic link to ~/tools
tar xzvf ica-tools.tgz
ln -s /home/mmisamor/volume-disk/tools ~/tools
Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2021-10-06 - MariaDelCarmenMisaMoreira
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback