Skip to content

Commit

Permalink
Merge branch 'master' into fix-issue-#5193
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-bennett authored Nov 13, 2024
2 parents 351926d + f4908fa commit 2b3065b
Show file tree
Hide file tree
Showing 162 changed files with 1,378 additions and 1,088 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_esp32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
required: true
type: string

permissions: read-all

jobs:
build-esp32:
runs-on: ubuntu-latest
Expand All @@ -24,6 +26,7 @@ jobs:
./arch/esp32/esp32s2.ini
./arch/esp32/esp32s3.ini
./arch/esp32/esp32c3.ini
./arch/esp32/esp32c6.ini
build-script-path: bin/build-esp32.sh
ota-firmware-source: firmware.bin
ota-firmware-target: release/bleota.bin
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build_esp32_c3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ jobs:
./arch/esp32/esp32s2.ini
./arch/esp32/esp32s3.ini
./arch/esp32/esp32c3.ini
./arch/esp32/esp32c6.ini
build-script-path: bin/build-esp32.sh
ota-firmware-source: firmware-c3.bin
ota-firmware-target: release/bleota-c3.bin
artifact-paths: |
release/*.bin
release/*.elf
include-web-ui: true
arch: esp32c3
1 change: 1 addition & 0 deletions .github/workflows/build_esp32_c6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ jobs:
artifact-paths: |
release/*.bin
release/*.elf
include-web-ui: true
arch: esp32c6
3 changes: 3 additions & 0 deletions .github/workflows/build_esp32_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
required: true
type: string

permissions: read-all

jobs:
build-esp32-s3:
runs-on: ubuntu-latest
Expand All @@ -24,6 +26,7 @@ jobs:
./arch/esp32/esp32s2.ini
./arch/esp32/esp32s3.ini
./arch/esp32/esp32c3.ini
./arch/esp32/esp32c6.ini
build-script-path: bin/build-esp32.sh
ota-firmware-source: firmware-s3.bin
ota-firmware-target: release/bleota-s3.bin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_raspbian_armv7l.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
- name: Install libbluetooth
shell: bash
run: |
apt-get update -y --fix-missing
apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev
sudo apt-get update -y --fix-missing
sudo apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev
- name: Checkout code
uses: actions/checkout@v4
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/package_amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
mkdir -p .debpkg/etc/meshtasticd/available.d
mkdir -p .debpkg/usr/lib/systemd/system/
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
shopt -s dotglob nullglob
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then mv .debpkg/usr/share/doc/meshtasticd/web/build/* .debpkg/usr/share/doc/meshtasticd/web/; fi
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/doc/meshtasticd/web/build; fi
if [ -d .debpkg/usr/share/doc/meshtasticd/web/.DS_Store]; then rm -f .debpkg/usr/share/doc/meshtasticd/web/.DS_Store; fi
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
cp release/meshtasticd_linux_x86_64 .debpkg/usr/sbin/meshtasticd
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/package_raspbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
mkdir -p .debpkg/etc/meshtasticd/available.d
mkdir -p .debpkg/usr/lib/systemd/system/
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
shopt -s dotglob nullglob
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then mv .debpkg/usr/share/doc/meshtasticd/web/build/* .debpkg/usr/share/doc/meshtasticd/web/; fi
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/doc/meshtasticd/web/build; fi
if [ -d .debpkg/usr/share/doc/meshtasticd/web/.DS_Store]; then rm -f .debpkg/usr/share/doc/meshtasticd/web/.DS_Store; fi
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
cp release/meshtasticd_linux_aarch64 .debpkg/usr/sbin/meshtasticd
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/package_raspbian_armv7l.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
mkdir -p .debpkg/etc/meshtasticd/available.d
mkdir -p .debpkg/usr/lib/systemd/system/
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
shopt -s dotglob nullglob
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then mv .debpkg/usr/share/doc/meshtasticd/web/build/* .debpkg/usr/share/doc/meshtasticd/web/; fi
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/doc/meshtasticd/web/build; fi
if [ -d .debpkg/usr/share/doc/meshtasticd/web/.DS_Store]; then rm -f .debpkg/usr/share/doc/meshtasticd/web/.DS_Store; fi
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
cp release/meshtasticd_linux_armv7l .debpkg/usr/sbin/meshtasticd
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
Expand Down
10 changes: 5 additions & 5 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
version: 0.1
cli:
version: 1.22.7
version: 1.22.8
plugins:
sources:
- id: trunk
ref: v1.6.4
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- [email protected].2
- [email protected].6
- [email protected]
- [email protected]
- [email protected].276
- [email protected].287
- [email protected]
- [email protected]
#- [email protected]
- [email protected]
- [email protected].1
- [email protected].3
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected].3
- [email protected].4
- [email protected]
- [email protected]
- [email protected]
Expand Down
1 change: 1 addition & 0 deletions arch/esp32/esp32.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ lib_deps =
${arduino_base.lib_deps}
${networking_base.lib_deps}
${environmental_base.lib_deps}
${radiolib_base.lib_deps}
https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2
h2zero/NimBLE-Arduino@^1.4.2
https://github.com/dbSuS/libpax.git#7bcd3fcab75037505be9b122ab2b24cc5176b587
Expand Down
1 change: 1 addition & 0 deletions arch/esp32/esp32c6.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ lib_deps =
${arduino_base.lib_deps}
${networking_base.lib_deps}
${environmental_base.lib_deps}
${radiolib_base.lib_deps}
lewisxhe/XPowersLib@^0.2.6
https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f
rweather/Crypto@^0.4.0
Expand Down
3 changes: 3 additions & 0 deletions arch/nrf52/nrf52.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ build_flags =
-Wno-unused-variable
-Isrc/platform/nrf52
-DLFS_NO_ASSERT ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818
-DMESHTASTIC_EXCLUDE_AUDIO=1
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1

build_src_filter =
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>

lib_deps=
${arduino_base.lib_deps}
${radiolib_base.lib_deps}
rweather/Crypto@^0.4.0

lib_ignore =
Expand Down
2 changes: 2 additions & 0 deletions arch/portduino/portduino.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ build_src_filter =
lib_deps =
${env.lib_deps}
${networking_base.lib_deps}
${radiolib_base.lib_deps}
rweather/Crypto@^0.4.0
https://github.com/lovyan03/LovyanGFX.git#1401c28a47646fe00538d487adcb2eb3c72de805

Expand All @@ -32,6 +33,7 @@ build_flags =
-Isrc/platform/portduino
-DRADIOLIB_EEPROM_UNSUPPORTED
-DPORTDUINO_LINUX_HARDWARE
-lstdc++fs
-lbluetooth
-lgpiod
-lyaml-cpp
1 change: 1 addition & 0 deletions arch/rp2xx0/rp2040.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ lib_ignore =
lib_deps =
${arduino_base.lib_deps}
${environmental_base.lib_deps}
${radiolib_base.lib_deps}
rweather/Crypto
1 change: 1 addition & 0 deletions arch/rp2xx0/rp2350.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ lib_ignore =
lib_deps =
${arduino_base.lib_deps}
${environmental_base.lib_deps}
${radiolib_base.lib_deps}
rweather/Crypto
3 changes: 2 additions & 1 deletion arch/stm32/stm32.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ upload_protocol = stlink
lib_deps =
${env.lib_deps}
charlesbaynham/OSFS@^1.2.3
jgromes/[email protected]
https://github.com/caveman99/Crypto.git#f61ae26a53f7a2d0ba5511625b8bf8eff3a35d5e

lib_ignore =
mathertel/OneButton@~2.6.1
mathertel/[email protected]
Wire
15 changes: 0 additions & 15 deletions bin/config-dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@ I2C:

Display:

### Waveshare 2.8inch RPi LCD
# Panel: ST7789
# CS: 8
# DC: 22 # Data/Command pin
# Backlight: 18
# Width: 240
# Height: 320
# Reset: 27
# Rotate: true
# Invert: true

### Waveshare 1.44inch LCD HAT
# Panel: ST7735S
# CS: 8 #Chip Select
Expand Down Expand Up @@ -148,10 +137,6 @@ Touchscreen:
# IRQ: 24
# I2CAddr: 0x38

# Module: XPT2046 # Waveshare 2.8inch
# CS: 7
# IRQ: 17

### You can also specify the spi device for the touchscreen to use
# spidev: spidev0.0

Expand Down
9 changes: 9 additions & 0 deletions bin/config.d/lora-MeshAdv-900M30S.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Lora:
Module: sx1262
CS: 21
IRQ: 16
Busy: 20
Reset: 18
TXen: 13
RXen: 12
DIO3_TCXO_VOLTAGE: true
28 changes: 18 additions & 10 deletions bin/device-install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

set PYTHON=python

:: Determine the correct esptool command to use
where esptool >nul 2>&1
if %ERRORLEVEL% EQU 0 (
set "ESPTOOL_CMD=esptool"
) else (
set "ESPTOOL_CMD=%PYTHON% -m esptool"
)

goto GETOPTS
:HELP
echo Usage: %~nx0 [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME^|FILENAME]
Expand All @@ -24,32 +32,32 @@ IF NOT "__%1__"=="____" goto GETOPTS

IF "__%FILENAME%__" == "____" (
echo "Missing FILENAME"
goto HELP
goto HELP
)
IF EXIST %FILENAME% IF x%FILENAME:update=%==x%FILENAME% (
echo Trying to flash update %FILENAME%, but first erasing and writing system information"
%PYTHON% -m esptool --baud 115200 erase_flash
%PYTHON% -m esptool --baud 115200 write_flash 0x00 %FILENAME%
%ESPTOOL_CMD% --baud 115200 erase_flash
%ESPTOOL_CMD% --baud 115200 write_flash 0x00 %FILENAME%

@REM Account for S3 and C3 board's different OTA partition
IF x%FILENAME:s3=%==x%FILENAME% IF x%FILENAME:v3=%==x%FILENAME% IF x%FILENAME:t-deck=%==x%FILENAME% IF x%FILENAME:wireless-paper=%==x%FILENAME% IF x%FILENAME:wireless-tracker=%==x%FILENAME% IF x%FILENAME:station-g2=%==x%FILENAME% IF x%FILENAME:unphone=%==x%FILENAME% (
IF x%FILENAME:esp32c3=%==x%FILENAME% (
%PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota.bin
%ESPTOOL_CMD% --baud 115200 write_flash 0x260000 bleota.bin
) else (
%PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota-c3.bin
%ESPTOOL_CMD% --baud 115200 write_flash 0x260000 bleota-c3.bin
)
) else (
%PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota-s3.bin
) else (
%ESPTOOL_CMD% --baud 115200 write_flash 0x260000 bleota-s3.bin
)
for %%f in (littlefs-*.bin) do (
%PYTHON% -m esptool --baud 115200 write_flash 0x300000 %%f
%ESPTOOL_CMD% --baud 115200 write_flash 0x300000 %%f
)
) else (
echo "Invalid file: %FILENAME%"
goto HELP
goto HELP
) else (
echo "Invalid file: %FILENAME%"
goto HELP
goto HELP
)

:EOF
24 changes: 18 additions & 6 deletions bin/device-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

PYTHON=${PYTHON:-$(which python3 python | head -n 1)}

# Determine the correct esptool command to use
if "$PYTHON" -m esptool version >/dev/null 2>&1; then
ESPTOOL_CMD="$PYTHON -m esptool"
elif command -v esptool >/dev/null 2>&1; then
ESPTOOL_CMD="esptool"
elif command -v esptool.py >/dev/null 2>&1; then
ESPTOOL_CMD="esptool.py"
else
echo "Error: esptool not found"
exit 1
fi

set -e

# Usage info
Expand Down Expand Up @@ -49,19 +61,19 @@ shift "$((OPTIND - 1))"

if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
"$PYTHON" -m esptool erase_flash
"$PYTHON" -m esptool write_flash 0x00 ${FILENAME}
$ESPTOOL_CMD erase_flash
$ESPTOOL_CMD write_flash 0x00 ${FILENAME}
# Account for S3 board's different OTA partition
if [ -n "${FILENAME##*"s3"*}" ] && [ -n "${FILENAME##*"-v3"*}" ] && [ -n "${FILENAME##*"t-deck"*}" ] && [ -n "${FILENAME##*"wireless-paper"*}" ] && [ -n "${FILENAME##*"wireless-tracker"*}" ] && [ -n "${FILENAME##*"station-g2"*}" ] && [ -n "${FILENAME##*"unphone"*}" ]; then
if [ -n "${FILENAME##*"esp32c3"*}" ]; then
"$PYTHON" -m esptool write_flash 0x260000 bleota.bin
$ESPTOOL_CMD write_flash 0x260000 bleota.bin
else
"$PYTHON" -m esptool write_flash 0x260000 bleota-c3.bin
$ESPTOOL_CMD write_flash 0x260000 bleota-c3.bin
fi
else
"$PYTHON" -m esptool write_flash 0x260000 bleota-s3.bin
$ESPTOOL_CMD write_flash 0x260000 bleota-s3.bin
fi
"$PYTHON" -m esptool write_flash 0x300000 littlefs-*.bin
$ESPTOOL_CMD write_flash 0x300000 littlefs-*.bin

else
show_help
Expand Down
16 changes: 12 additions & 4 deletions bin/device-update.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

set PYTHON=python

:: Determine the correct esptool command to use
where esptool >nul 2>&1
if %ERRORLEVEL% EQU 0 (
set "ESPTOOL_CMD=esptool"
) else (
set "ESPTOOL_CMD=%PYTHON% -m esptool"
)

goto GETOPTS
:HELP
echo Usage: %~nx0 [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME^|FILENAME]
Expand All @@ -24,17 +32,17 @@ IF NOT "__%1__"=="____" goto GETOPTS

IF "__%FILENAME%__" == "____" (
echo "Missing FILENAME"
goto HELP
goto HELP
)
IF EXIST %FILENAME% IF NOT x%FILENAME:update=%==x%FILENAME% (
echo Trying to flash update %FILENAME%
%PYTHON% -m esptool --baud 115200 write_flash 0x10000 %FILENAME%
%ESPTOOL_CMD% --baud 115200 write_flash 0x10000 %FILENAME%
) else (
echo "Invalid file: %FILENAME%"
goto HELP
goto HELP
) else (
echo "Invalid file: %FILENAME%"
goto HELP
goto HELP
)

:EOF
Loading

0 comments on commit 2b3065b

Please sign in to comment.