From efb10c557b32a0e4e627a63e88652a393c2b8a5d Mon Sep 17 00:00:00 2001 From: vidplace7 Date: Wed, 6 Nov 2024 09:04:18 -0500 Subject: [PATCH 1/3] uclibc compatibility Adds compatibility with uclibc, the officially supported toolchain of the luckfox pico --- src/mesh/StreamAPI.h | 1 + src/modules/PositionModule.cpp | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesh/StreamAPI.h b/src/mesh/StreamAPI.h index 45cbb231c7..6e0364bc13 100644 --- a/src/mesh/StreamAPI.h +++ b/src/mesh/StreamAPI.h @@ -3,6 +3,7 @@ #include "PhoneAPI.h" #include "Stream.h" #include "concurrency/OSThread.h" +#include // A To/FromRadio packet + our 32 bit header #define MAX_STREAM_BUF_SIZE (MAX_TO_FROM_RADIO_SIZE + sizeof(uint32_t)) diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index b7def82426..1374681c4a 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -17,9 +17,7 @@ #include "sleep.h" #include "target_specific.h" -extern "C" { #include -} PositionModule *positionModule; From 54195021dd2716595875179596bbb69630ef3c8f Mon Sep 17 00:00:00 2001 From: vidplace7 Date: Wed, 6 Nov 2024 22:16:17 -0500 Subject: [PATCH 2/3] Cleanup whitespace --- src/modules/PositionModule.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 1374681c4a..f80d3eb679 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -16,7 +16,6 @@ #include "meshtastic/atak.pb.h" #include "sleep.h" #include "target_specific.h" - #include PositionModule *positionModule; From 2adb56c4f6be67c0238f865c2605bf5119260703 Mon Sep 17 00:00:00 2001 From: vidplace7 Date: Wed, 6 Nov 2024 23:39:35 -0500 Subject: [PATCH 3/3] Explicitly link stdc++fs for std::filesystem Bringing this over from buildroot-meshtastic --- arch/portduino/portduino.ini | 1 + variants/portduino/platformio.ini | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 976951b4f5..39d1c0b8ce 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -32,6 +32,7 @@ build_flags = -Isrc/platform/portduino -DRADIOLIB_EEPROM_UNSUPPORTED -DPORTDUINO_LINUX_HARDWARE + -lstdc++fs -lbluetooth -lgpiod -lyaml-cpp diff --git a/variants/portduino/platformio.ini b/variants/portduino/platformio.ini index 46417e388e..aa11142f71 100644 --- a/variants/portduino/platformio.ini +++ b/variants/portduino/platformio.ini @@ -2,7 +2,8 @@ extends = portduino_base ; The pkg-config commands below optionally add link flags. ; the || : is just a "or run the null command" to avoid returning an error code -build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino -I /usr/include +build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino + -I /usr/include !pkg-config --libs libulfius --silence-errors || : !pkg-config --libs openssl --silence-errors || : board = cross_platform