* A detailed tutorial on kernel compilation can be found [here](https://help.ubuntu.com/community/Kernel/Compile).
* Create and enter a new folder, e.g. in your home directory that will store the newly compiled kernel.
* Run the following commands to download all resources required:
## Installation
```bash
sudo apt install libncurses5 libncurses5-dev
*See [Installing PRRT](https://git.nt.uni-saarland.de/LARN/PRRT/wikis/installation#python) for instructions on how to install it on your system for using it with C/C++ or Python.*
#### *Try PRRT on your system*
A [minimal receiver](examples/receiver.py), which takes the bind port as an argument, is created as follows:
```python
importsys
importprrt
port=int(sys.argv[1])
sudo apt build-dep linux-image-`uname-r`
apt source linux-image-`uname-r`
s=prrt.PrrtSocket(port=port,isSender=False)
cd linux-$(uname-r | awk'{split($1,a, "-"); print a[1]}')
whileTrue:
d=s.recv()
ifd!="Close":
printd
else:
break
```
* Copy the current kernel configuration to the current folder:
A [minimal sender](sender.py) is created as follows:
```python
importsys
importprrt
host=sys.argv[1]
port=int(sys.argv[2])
s=prrt.PrrtSocket(port=port,isSender=True)
s.connect(host,port)
foriinrange(10):
s.send("Packet {}".format(i))
s.send("Close")
```
Start the receiver by:
```bash
cp-vi /boot/config-`uname-r` .config
python receiver.py 5000
```
* Edit the `.config` file and ensure the following line is present (and the option is set to `y`):
In a separate terminal, run:
```bash
...
CONFIG_NETWORK_PHY_TIMESTAMPING=y
...
python sender.py 127.0.0.1 5000
```
* Call `make deb-pkg` (ideally with `-j5` or some other number to speed up the compilation by using multiple cores).
* Install the `linux-headers-*.deb` and `linux-image-*.deb` package via `dpkg -i` (where * stands for the respective kernel version).
* Reboot the system.
This should generate the following output in the receiver console:
```terminal
Packet 0
Packet 1
...
Packet 9
```
## Docker
## For more information
The following shows how to run the PRRT sender and receiver on a host with OpenvSwitch.