Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info

If you want to make changes to a RPI which is already set up, you have to remount the read-only filesystem.

  • Install Raspbian Lite
  • Change password by using:
    passwd pi
  • Activate SSH: sudo systemctl enable ssh  and  sudo systemctl start ssh
  • Install and configure NTP
  • Install tmux: sudo apt install tmux
  • "Install" the RTI Connext libraries under /usr/local/lib/ by copying the arm-folder from the Main PC under opt/rti_connext_dds-6.0.0/lib/armv6vfphLinux3.xgcc4.7.2/. This can of course only be done after the ARM libraries have been installed on the Main Computer

...

pi@raspberrypi-06:~ $ find /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscppd.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscd.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddstransporttcpzd.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscpp2z.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcppz.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtimonitoringd.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddstransporttcp.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscpp2.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscpp2d.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtimonitoringz.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddstransporttcpd.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscz.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscppzd.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddsc.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddstransporttcpz.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcpp.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscpp.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscore.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtimonitoringzd.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscorez.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscppz.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscored.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcppd.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddsjava.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscpp2zd.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddsczd.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscorezd.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddsjavad.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtimonitoring.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcz.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcppzd.a
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlc.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcd.so
/usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlczd.a

Read-Only Filesystem

For the following steps, you may need writing access to the file system, which you should else have set to read only (because of the power situation, as the vehicles can be switched on and off without shutting down the system properly). To get writing access, use:

sudo mount -o remount,rw /

...

'Register' the Libraries

Make the libraries available. Insert /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2 into /etc/ld.so.conf. Then run sudo ldconfig.

...

Create a DHCP reservation for the Raspberry on the router. The vehicle ID is derived from the IP. The IP is 192.168.1.1XX where XX are the digits of the vehicle ID.

Read-Only Filesystem
Anchor
ro
ro

One crucial aspect regarding the Raspberry Pi is, that the vehicle will be turned off by using the switch on the bottom, mostly. That will directly cut off the power supply of the RPI. In order to avoid damage to the OS, it is important to configure the filesystem to be read-only. For that, follow the instructions on https://kofler.info/raspbian-lite-fuer-den-read-only-betrieb/ . (As alternative https://www.mehr4u.de/raspberry-pi-mit-readonly-filesystem.html may also be used. Vehicle 20 is created by following the first link but using "fastboot noswap ro" instead of "fastboot noswap" .)

In order to make NTP working properly with a read-only filesystem, it is also necessary to copy the following file

cp /lib/systemd/system/ntp.service /etc/systemd/system/ntp.service

and to comment out PrivateTmp=true in

/etc/systemd/system/ntp.service

If you need writing access to the file system, you can use (dependent on the folder you need access to)

sudo mount -o remount,rw /
sudo mount -o remount,rw /boot

to remount the system.

Troubleshooting

It might happen that the system clock is not automatically synchronizing via NTP if it differs too much from the real time. Firstly, take care that your timezone is set correctly:

sudo raspi-config --> 4 Localisation Options --> I2 Change Time Zone --> None of the above --> UTC

Furthermore, you can force NTP to set the time once. Therefore, stop the service, force it, and restart it again :

sudo /etc/init.d/ntp stop
sudo ntpd -qg
sudo /etc/init.d/ntp start

Afterwards, NTP should synchronize automatically.

Cross Compilation and Software Distribution

...