Common instruction to prepare a bootable usb stick for scu

  • featuring etherbone, saftlib, pcie kernel driver, fesl, silecs, ...

  • For me the ethernet controller was renamed from eth0 to eth1, resulting in a wrong configuration in /etc/network/interfaces
    • make sure that firmware-realtek is installed ! (
    • Check dmesg | grep 'Ethernet'
    • Check ifconfig eth0
    • Check ifconfig eth1
    • Rename eth0 to eth1 in /etc/network/interfaces
    • Check if you can ping the SCU
    • Stefan Rauch owns a SCU which has an VGA-Output .. use it for debugging if there are problems

change /etc/ssh/sshd_config
PermitRootLogin yes

etherbone / saftlib

apt-get install linux-headers-4.9.0-4-rt-amd64 linux-image-4.9.0-4-rt-amd64 lsb-core xsltproc pkg-config libglibmm-2.4-dev socat autoconf libtool libreadline-dev ntp
// Note: ntp is needed for git certificates ( see here ) // Note: eb / saftlib needs a rt-kernel ! // Remove the old non-rt kernel

// TODO: check if saft / eb as well compiles without this lib .. it pulls alot of stuff which is not realy needed
apt-get install docbook-utils

// Manual can be found here:
git clone
cd bel_projects
git checkout cherry

Apply patch to wishbone, so it works with 4.x kernel
patch ip_cores/fpga-config-space/pcie-wb/wishbone.c < 0001-wishbone-changes-for-kernel-3.19.patch

make etherbone
make PREFIX=/ etherbone-install
make saftlib
make PREFIX=/ saftlib-install
make tools
make PREFIX=/ tools-install

// Install pci-express driver for wishbone - TODO: check if "make install" + "reboot" is sufficient ?
cd /root/bel_projects/ip_cores/fpga-config-space/pcie-wb
make install

touch /lib/systemd/system/saftlib.service
Description=saftlib daemon

ExecStart=/usr/local/sbin/saftd baseboard:dev/wbm0
ExecStop=/usr/local/bin/saft-ctl baseboard quit
Note: "saftd" seems to be in /usr/local/sbin, no matter which if PREFIX is set

@Detlev Penza: Thanks for the Fix!

In order to get the saft daemon automatically started after boot:
systemctl enable saftlib.service


apt-get install libboost-all-dev
cd /root
svn checkout --username schwinn feSupport

cd /root/feSupport
make test/SIS100InjKickerModuleCLI NUMBER_CORES=3 EB_HOME=/ SAFT_PATH=/lib SYSTEM_LIB=lib/x86_64-linux-gnu TIMING_CONFIGURATION_INCL=-I/root/feSupport/feSupport/utility


apt-get install libxml2-dev libcurl4-openssl-dev wget

cd /root
svn checkout --username schwinn generic-makefiles

git clone
cd /root/silecs
git checkout gsi-2.0.2_centOS7

cd /root/silecs/snap7

cd /root/silecs/silecs-communication-cpp
make -j4 COMMON_MAKE_PATH=/root/generic-makefiles SNAP7_BASE=../snap7/snap7-full

cd /root/silecs/silecs-cli-client
make -j4 COMMON_MAKE_PATH=/root/generic-makefiles SILECS_COMM_HOME=../silecs-communication-cpp/build SNAP7_BASE=../snap7/snap7-full

Add for SIS100 Kicker control stuff

cd /root
mkdir SIS100Kicker
scp SIS100Kicker
scp SIS100Kicker
scp SIS100Kicker
scp SIS100Kicker
scp -r SIS100Kicker

ln -s /root/SIS100Kicker/cli/ /bin/silecs_get_device
ln -s /root/SIS100Kicker/cli/ /bin/silecs_get_block
ln -s /root/SIS100Kicker/cli/ /bin/silecs_get_register_periodic
ln -s /root/feSupport/test/SIS100InjKickerModuleCLI /bin/SIS100InjKickerModuleCLI

Backup the usb stick to disc

It may happen that
  • The stick gets old ( read/write cycles are limited )
  • Somebody coorrupts the stick / breaks the OS

So it is a good idea to backup the data:
  • Either via dd : Like that. Either overnight, or use usb3
  • Or via rsync ( better if you plan to persist later changes )
Topic revision: r4 - 12 Oct 2023, AlexanderSchwinn
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback