Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uClibc compatibility #5270

Merged
merged 3 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/portduino/portduino.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ build_flags =
-Isrc/platform/portduino
-DRADIOLIB_EEPROM_UNSUPPORTED
-DPORTDUINO_LINUX_HARDWARE
-lstdc++fs
Copy link
Member Author

@vidplace7 vidplace7 Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows std::filesystem to function on uClibc

-lbluetooth
-lgpiod
-lyaml-cpp
1 change: 1 addition & 0 deletions src/mesh/StreamAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "PhoneAPI.h"
#include "Stream.h"
#include "concurrency/OSThread.h"
#include <cstdarg>
Copy link
Member Author

@vidplace7 vidplace7 Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

va_list type definition is not included in uClibc by default. Easy fix.


// A To/FromRadio packet + our 32 bit header
#define MAX_STREAM_BUF_SIZE (MAX_TO_FROM_RADIO_SIZE + sizeof(uint32_t))
Expand Down
3 changes: 0 additions & 3 deletions src/modules/PositionModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
#include "meshtastic/atak.pb.h"
#include "sleep.h"
#include "target_specific.h"

extern "C" {
#include <Throttle.h>
}

PositionModule *positionModule;

Expand Down
3 changes: 2 additions & 1 deletion variants/portduino/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +5 to +6
Copy link
Member Author

@vidplace7 vidplace7 Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I patch (remove) this value in buildroot-meshtastic, so I can use the includes that buildroot stages.
A separate line is just a more stable target for removing. Thanks!

!pkg-config --libs libulfius --silence-errors || :
!pkg-config --libs openssl --silence-errors || :
board = cross_platform
Expand Down
Loading