Wiki
Wiki
To build drivers and tools from GIT we first need to enter a maintenance chroot of the diskless system in question.
If git has not been installed yet through the package list facility of the diskless scripts, you have to install it now
yum install git
As root change to /root via
cd ~
and check out the white rabbit source tree:
git clone --recursive -b proposed_master https://github.com/stefanrauch/bel_projects.git
Enter source tree
cd bel_projects
and build programs and driver modules via:
make KERNELVER=3.6.11.9-rt42 etherbone tools eca tlu driver
Specifying the exact kernel version string with KERNELVER is crucial.
Here, KERNELVER=3.6.11.9-rt42 just serves as an example.
To list available valid kernel versions installed on the FEC, do
ls -l /boot/vmlinuz-* | sed -nre 's@.*vmlinuz-(.*).*@\1@p'
On successful built of tools and driver modules, deploy them via:
make KERNELVER=3.6.11.9-rt42 etherbone-install tools-install eca-install tlu-install driver-install
In case depmod fails, you might want depmod to only care about the specified Linux version.
To accomplish this, edit /root/bel_projects/ip_cores/fpga-config-space/vme-wb/Makefile,
changing line
[ $$(id -u) -ne 0 ] || depmod -a
to
[ $$(id -u) -ne 0 ] || depmod $(KERNELVER)
Depending on the used White Rabbit timing receiver, either Pexaria5 (PCIe) or Vetar (VME),
the appropriate init script need to be linked to the specific FEC.
Currently, on sdlx014 where the diskless mounts reside,
two relevant directories exist for this matter.
The directory that holds the “real” init scripts
sdlx014:/srv/diskless/fec/global/scripts/
is mounted on the FEC (exemplary sddsc043) at
sddsc043:/fec/global/scripts
For a specific FEC symlinks to the appropriate script are generated.
The symlinks reside in the FEC-specific directory
sdlx014:/srv/diskless/fec/local/sddsc043/etc/init.d/
which is mounted on the FEC at
sddsc043:/fec/local/etc/init.d
When creating symlinks on sdlx014 they must be follow the
mounting at the FEC, which is error prone some time.
Viewed from sdlx014 the symbolic link seems to link to a dead file,
marked by a blinking red link target.
Links can have arbitrary names. All init scripts in the directory will
be executed. However, the name should be prefixed with a number,
which allows for structured precedence. Scripts starting with lower
numbers are executed earlier. This is important in case of dependencies.
Let's assume, for VME FEC sddsc043, we want to link to the init script
for the Vetar VME White Rabbit card.
The script we're targeting resides in the global scripts directory
and is called vetar_load2.
On sdlx014 we have to do the following:
cd /srv/diskless/fec/local/sddsc043/etc/init.d/ ln -s /fec/global/scripts/vetar_load2 10_vetar