mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-20 00:37:36 +00:00
YAML based config for PI / Portduino (#2943)
* Add configuration via /etc/meshtastic/config.yaml * Move example config, support more locations * Fix config check * Use access() to check for config file presence * Throw an error and exit on radio init fail * Adds error check for reading Bluetooth MAC * Settle on meshtasticd, add install script * Shell fixes * Fine. I'll put it back and then disable you * Get wrekt, shellchekt * Firat attempt at adding raspbian CI build * Tickle the workflow * Beatings will continue til morale improves * Permissions are overrated --------- Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
VERSION=`bin/buildinfo.py long`
|
||||
SHORT_VERSION=`bin/buildinfo.py short`
|
||||
VERSION=$(bin/buildinfo.py long)
|
||||
SHORT_VERSION=$(bin/buildinfo.py short)
|
||||
|
||||
OUTDIR=release/
|
||||
|
||||
@@ -13,11 +13,15 @@ mkdir -p $OUTDIR/
|
||||
rm -r $OUTDIR/* || true
|
||||
|
||||
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||
platformio pkg update
|
||||
platformio pkg update
|
||||
|
||||
pio run --environment native
|
||||
cp .pio/build/native/program $OUTDIR/meshtasticd_linux_amd64
|
||||
if command -v raspi-config &>/dev/null; then
|
||||
pio run --environment raspbian
|
||||
cp .pio/build/raspbian/program $OUTDIR/meshtasticd_linux_arm64
|
||||
else
|
||||
pio run --environment native
|
||||
cp .pio/build/native/program $OUTDIR/meshtasticd_linux_amd64
|
||||
fi
|
||||
|
||||
cp bin/device-install.* $OUTDIR
|
||||
cp bin/device-update.* $OUTDIR
|
||||
|
||||
|
||||
26
bin/config-dist.yaml
Normal file
26
bin/config-dist.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
# Define your devices here.
|
||||
# Use Broadcom pin numbering
|
||||
|
||||
#Waveshare SX126X XXXM
|
||||
|
||||
#USE_SX1262: true
|
||||
#SX126X_DIO2_AS_RF_SWITCH: true
|
||||
#SX126X_CS: 21
|
||||
#SX126X_DIO1: 16
|
||||
#SX126X_BUSY: 20
|
||||
#SX126X_RESET: 18
|
||||
|
||||
#Waveshare SX1302 LISTEN ONLY AT THIS TIME!
|
||||
|
||||
#USE_SX1262: true
|
||||
#SX126X_CS: 7
|
||||
#SX126X_DIO1: 17
|
||||
#SX126X_RESET: 22
|
||||
|
||||
#Adafruit RFM9x
|
||||
|
||||
#USE_RF95: true
|
||||
#RF95_RESET: 25
|
||||
#RF95_NSS: 7
|
||||
#RF95_IRQ: 22
|
||||
#RF95_DIO1: 23
|
||||
9
bin/meshtasticd.service
Normal file
9
bin/meshtasticd.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[unit]
|
||||
description=Meshtastic Native Daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/sbin/meshtasticd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
10
bin/native-install.sh
Executable file
10
bin/native-install.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cp release/meshtasticd_linux_arm64 /usr/sbin/meshtasticd
|
||||
mkdir /etc/meshtasticd
|
||||
if [[ -f "/etc/meshtasticd/config.yaml" ]]; then
|
||||
cp bin/config-dist.yaml /etc/meshtasticd/config-upgrade.yaml
|
||||
else
|
||||
cp bin/config-dist.yaml /etc/meshtasticd/config.yaml
|
||||
fi
|
||||
cp bin/meshtasticd.service /usr/lib/systemd/system/meshtasticd.service
|
||||
Reference in New Issue
Block a user