Files
firmware/variants/native/portduino.ini
1e3a38fc8a Add native Portduino mDNS discovery with Avahi and Bonjour (#12032)
* Add native Portduino mDNS discovery via Avahi and Bonjour

* Guard native discovery in Portduino WASM builds

* Add linux dependencies in packaging, support "buildroot"

Adds libavahi dependencies for Debian, RPM, Docker and CI.
Moves the libavahi definition to the shared `build_flags` (which is only consumed on Linux targets)

* Fix platformio formatting

* fix(portduino): disable Avahi when daemon unavailable

---------

Co-authored-by: Jake-B <jake-b@users.noreply.github.com>
Co-authored-by: vidplace7 <vidplace7@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:56:28 +00:00

91 lines
4.2 KiB
INI

; The Portduino based 'native' environment. Currently supported on Linux targets with real LoRa hardware (or simulated).
[portduino_base]
platform =
# renovate: datasource=git-refs depName=platform-native packageName=https://github.com/meshtastic/platform-native gitBranch=develop
https://github.com/meshtastic/platform-native/archive/86c62edfb7084d11669aa255411a70580e83823b.zip
framework = arduino
build_src_filter =
${env.build_src_filter}
-<platform/>
+<platform/portduino>
-<platform/portduino/wasm/> ; emscripten-only sources, built by [env:native-wasm] (pio run -e native-wasm)
-<nimble/>
-<mesh/wifi/>
-<mesh/http/>
+<mesh/raspihttp/>
-<mesh/eth/>
-<modules/esp32>
lib_deps =
${env.lib_deps}
${networking_base.lib_deps}
${networking_extra.lib_deps}
${radiolib_base.lib_deps}
${environmental_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic/Crypto packageName=https://github.com/meshtastic/Crypto gitBranch=main
https://github.com/meshtastic/Crypto/archive/1c817c2f27aa4593e07d0f7e13b3dbf8d980bcae.zip
# renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.28
; # renovate: datasource=git-refs depName=libch341-spi-userspace packageName=https://github.com/meshtastic/libch341-spi-userspace gitBranch=main
https://github.com/meshtastic/libch341-spi-userspace/archive/027cde5d9c0cecc91fffbd2d1ed4e41e32eeda79.zip
# renovate: datasource=custom.pio depName=adafruit/Adafruit seesaw Library packageName=adafruit/library/Adafruit seesaw Library
adafruit/Adafruit seesaw Library@1.7.9
# renovate: datasource=git-refs depName=RAK12034-BMX160 packageName=https://github.com/RAKWireless/RAK12034-BMX160 gitBranch=main
https://github.com/RAKWireless/RAK12034-BMX160/archive/dcead07ffa267d3c906e9ca4a1330ab989e957e2.zip
# renovate: datasource=github-tags depName=Adafruit_BME680 packageName=adafruit/Adafruit_BME680
https://github.com/adafruit/Adafruit_BME680/archive/refs/tags/2.0.6.zip
; Cross-platform build flags shared between native (Linux) and native-macos builds.
; Anything Linux-only (libbluetooth, libgpiod, libi2c, /sys/class/gpio,
; PORTDUINO_LINUX_HARDWARE, glibc-style _FORTIFY_SOURCE) goes in `build_flags`
; instead. UDP multicast also lives there because the firmware's
; UdpMulticastHandler.h unconditionally `#include <WiFi.h>` on non-NRF52
; targets, which requires the framework's bundled WiFi shim that we
; lib_ignore on macOS.
build_flags_common =
${arduino_base.build_flags}
-D ARCH_PORTDUINO
-fPIC
-Isrc/platform/portduino
-DRADIOLIB_EEPROM_UNSUPPORTED
-DMESHTASTIC_EXCLUDE_RTTTL ; No PWM/RTTTL ringtone playback support on this platform.
-lpthread
-lyaml-cpp
-ljsoncpp
!pkg-config --cflags jsoncpp --silence-errors || :
-luv
-std=gnu17
-std=gnu++20
-DMAX_TFT_COLOR_REGIONS=64
; Unity omits double support unless asked, compiling TEST_ASSERT_DOUBLE_* into an
; unconditional "Unity Double Precision Disabled" failure (test_gps_update_scheduling).
-DUNITY_INCLUDE_DOUBLE
build_flags =
${portduino_base.build_flags_common}
-DHAS_UDP_MULTICAST=1
-D_FORTIFY_SOURCE=2
-fstack-protector-all -Wstack-protector --param ssp-buffer-size=4
-DPORTDUINO_LINUX_HARDWARE
; BLE peripheral support via BlueZ D-Bus needs sdbus-c++; when the dev package is
; absent these lines emit nothing and BLE compiles out (HAS_BLUETOOTH stays 0,
; see src/platform/portduino/architecture.h). The second line flags the sdbus-c++
; 2.x API for src/platform/portduino/SdbusCompat.h. Scriptlet lines must not sit
; last in this list: native_base appends "-I ..." to the final line inline, and a
; trailing scriptlet would swallow it into the shell command.
!pkg-config --cflags --libs sdbus-c++ --silence-errors || :
!pkg-config --exists 'sdbus-c++ >= 2' && echo '-DMESHTASTIC_SDBUS_CPP_V2' || :
; mDNS discovery via Avahi (src/platform/portduino/NativeDiscovery.cpp); compiles out when absent.
!pkg-config --cflags --libs avahi-client --silence-errors || :
!pkg-config --exists avahi-client && echo -DMESHTASTIC_USE_AVAHI=1 || :
-lstdc++fs
-lbluetooth
-lgpiod
-li2c
lib_ignore =
Adafruit NeoPixel
Adafruit ST7735 and ST7789 Library
Adafruit SSD1306
SD