Updates for running on Bullseye (#469)

* Conditionally use compiler flags needed for gcc 10+

* Cleanup

* Remove deprecated systemd options

* Better message
This commit is contained in:
Daniel Markstedt 2021-11-14 10:34:24 -08:00 committed by GitHub
parent df361f70d9
commit e1a4a963ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 7 deletions

View File

@ -79,8 +79,15 @@ function installRaScsi() {
cd "$BASE/src/raspberrypi" || exit 1
# Compiler flags needed for gcc v10 and up
if [[ `gcc --version | awk '/gcc/' | awk -F ' ' '{print $3}' | awk -F '.' '{print $1}'` -ge 10 ]]; then
echo -n "gcc 10 or later detected. Will compile with the following flags: "
COMPILER_FLAGS="-DSPDLOG_FMT_EXTERNAL -DFMT_HEADER_ONLY"
echo $COMPILER_FLAGS
fi
echo "Compiling with ${CORES-1} simultaneous cores..."
( make clean && make -j "${CORES-1}" all CONNECT_TYPE="${CONNECT_TYPE-FULLSPEC}" && sudo make install CONNECT_TYPE="${CONNECT_TYPE-FULLSPEC}" ) </dev/null
( make clean && EXTRA_FLAGS="$COMPILER_FLAGS" make -j "${CORES-1}" all CONNECT_TYPE="${CONNECT_TYPE-FULLSPEC}" && sudo make install CONNECT_TYPE="${CONNECT_TYPE-FULLSPEC}" ) </dev/null
sudo sed -i "s@^ExecStart.*@& -F $VIRTUAL_DRIVER_PATH@" /etc/systemd/system/rascsi.service
echo "Configured rascsi.service to use $VIRTUAL_DRIVER_PATH as default image dir."

View File

@ -9,8 +9,6 @@ ExecStart=/home/pi/RASCSI/src/oled_monitor/start.sh
ExecStop=/bin/echo "Shutting down the OLED Monitor gracefully..."
ExecStop=/bin/pkill --signal 2 -f "python3 rascsi_oled_monitor.py"
ExecStop=/bin/sleep 2
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=RASCSIMON
[Install]

View File

@ -17,8 +17,6 @@ ExecStart=/usr/local/bin/rascsi -r 7
# ExecStart=/usr/local/bin/rascsi -r 0,7
#
ExecStop=/usr/local/bin/rasctl -X
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=RASCSI
[Install]

View File

@ -6,8 +6,6 @@ After=network.target
Type=simple
Restart=always
ExecStart=/home/pi/RASCSI/src/web/start.sh
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=RASCSIWEB
[Install]