One solution is to copy the header and library files over to the host system. The directories we need are /usr/include, /usr/lib, /opt/vc/include and /opt/vc/lib
rsync to the rescue
As both system as linux, we can use rsync. rsync is a utility that is used to keep two directories in sync ... exactly what we want. To begin with we need to install rsync on the pi as it is not installed in the base image.
ssh to the pi and execute the following command to do that:
sudo apt-get install rsync
One done, execute the following commands on the host linux system (changing 192.168.0.114 to the address of your raspberry pi).
cd ~/rpi mkdir root/opt mkdir root/usr rsync -e ssh -lr pi@192.168.0.114:/usr/includeroot/usr rsync -e ssh -lr pi@192.168.0.114:/usr/lib root/usr mkdir root/opt mkdir root/opt/vc rsync -e ssh -lr pi@192.168.0.114:/opt/vc/include root/opt/vc rsync -e ssh -lr pi@192.168.0.114:/opt/vc/lib root/opt/vc
This will synchronise the /usr/include and /usr/lib directories from the raspberry pi over to ~/rpi/root on the host system. Whenever you update the raspberry pi or add new packages, run the rsync commands again to make sure that the host is up to date.
No comments:
Post a Comment