Compare commits

...

4 Commits

Author SHA1 Message Date
Austin
de42d96adf
Actions: Fix issues with new Release process (#5845)
Some checks are pending
CI / build-esp32 (push) Blocked by required conditions
CI / build-esp32-s3 (push) Blocked by required conditions
CI / build-esp32-c3 (push) Blocked by required conditions
CI / build-esp32-c6 (push) Blocked by required conditions
CI / build-nrf52 (push) Blocked by required conditions
CI / build-rpi2040 (push) Blocked by required conditions
CI / build-stm32 (push) Blocked by required conditions
CI / package-raspbian (push) Waiting to run
CI / package-raspbian-armv7l (push) Waiting to run
CI / package-native (push) Waiting to run
CI / build-debian-src (push) Waiting to run
CI / test-native (push) Waiting to run
CI / build-docker (push) Waiting to run
CI / after-checks (push) Blocked by required conditions
CI / gather-artifacts (esp32) (push) Blocked by required conditions
CI / gather-artifacts (esp32c3) (push) Blocked by required conditions
CI / gather-artifacts (esp32c6) (push) Blocked by required conditions
CI / gather-artifacts (esp32s3) (push) Blocked by required conditions
CI / gather-artifacts (nrf52840) (push) Blocked by required conditions
CI / gather-artifacts (rp2040) (push) Blocked by required conditions
CI / gather-artifacts (stm32) (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
CI / release-firmware (esp32) (push) Blocked by required conditions
CI / release-firmware (esp32c3) (push) Blocked by required conditions
CI / release-firmware (esp32c6) (push) Blocked by required conditions
CI / release-firmware (esp32s3) (push) Blocked by required conditions
CI / release-firmware (nrf52840) (push) Blocked by required conditions
CI / release-firmware (rp2040) (push) Blocked by required conditions
CI / release-firmware (stm32) (push) Blocked by required conditions
Flawfinder Scan / Flawfinder (push) Waiting to run
2025-01-13 10:46:07 -06:00
Ben Meadors
e2dd845051
Fix devicestate protobuf / filesize allocation (#5835) 2025-01-13 08:30:20 -06:00
github-actions[bot]
6366633cd4
[create-pull-request] automated change (#5841)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2025-01-13 07:05:59 -06:00
Ben Meadors
1c0f43c8e2
NRF52 SafeFile should not remove / rename files (#5840) 2025-01-13 06:28:18 -06:00
4 changed files with 31 additions and 19 deletions

View File

@ -320,19 +320,23 @@ jobs:
run: ls -lR
- name: Add deb files to release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.long }}
files: |
./output/meshtasticd_${{ steps.version.outputs.long }}_arm64.deb
./output/meshtasticd_${{ steps.version.outputs.long }}_armhf.deb
./output/meshtasticd_${{ steps.version.outputs.long }}_amd64.deb
./output/meshtasticd-${{ steps.version.outputs.deb }}-src.zip
run: |
gh release upload v${{ steps.version.outputs.long }} ./output/meshtasticd_${{ steps.version.outputs.long }}_arm64.deb
gh release upload v${{ steps.version.outputs.long }} ./output/meshtasticd_${{ steps.version.outputs.long }}_armhf.deb
gh release upload v${{ steps.version.outputs.long }} ./output/meshtasticd_${{ steps.version.outputs.long }}_amd64.deb
gh release upload v${{ steps.version.outputs.long }} ./output/meshtasticd-${{ steps.version.outputs.deb }}-src.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bump version.properties
run: >-
bin/bump_version.py
- name: Install debian tools for changelog
run: |
sudo apt-get update -y
sudo apt-get install -y devscripts
- name: Update debian changelog
run: >-
debian/ci_changelog.sh
@ -397,9 +401,8 @@ jobs:
run: ls -lR
- name: Add bins and debug elfs to release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.long }}
files: |
./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
run: |
gh release upload v${{ steps.version.outputs.long }} ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
gh release upload v${{ steps.version.outputs.long }} ./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@ -1 +1 @@
Subproject commit c55f120a9c1ce90c85e4826907a0b9bcb2d5f5a2
Subproject commit 76f806e1bb1e2a7b157a14fadd095775f63db5e4

View File

@ -6,6 +6,11 @@
static File openFile(const char *filename, bool fullAtomic)
{
concurrency::LockGuard g(spiLock);
LOG_DEBUG("Opening %s, fullAtomic=%d", filename, fullAtomic);
#ifdef ARCH_NRF52
lfs_assert_failed = false;
return FSCom.open(filename, FILE_O_WRITE);
#endif
if (!fullAtomic)
FSCom.remove(filename); // Nuke the old file to make space (ignore if it !exists)
@ -14,7 +19,6 @@ static File openFile(const char *filename, bool fullAtomic)
// clear any previous LFS errors
lfs_assert_failed = false;
return FSCom.open(filenameTmp.c_str(), FILE_O_WRITE);
}
@ -57,6 +61,10 @@ bool SafeFile::close()
spiLock->lock();
f.close();
spiLock->unlock();
#ifdef ARCH_NRF52
return true;
#endif
if (!testReadback())
return false;

View File

@ -958,7 +958,7 @@ void NodeDB::loadFromDisk()
#endif
// static DeviceState scratch; We no longer read into a tempbuf because this structure is 15KB of valuable RAM
auto state = loadProto(prefFileName, sizeof(meshtastic_DeviceState) + MAX_NUM_NODES_FS * sizeof(meshtastic_NodeInfo),
auto state = loadProto(prefFileName, sizeof(meshtastic_DeviceState) + MAX_NUM_NODES_FS * meshtastic_NodeInfoLite_size,
sizeof(meshtastic_DeviceState), &meshtastic_DeviceState_msg, &devicestate);
// See https://github.com/meshtastic/firmware/issues/4184#issuecomment-2269390786
@ -1147,8 +1147,9 @@ bool NodeDB::saveDeviceStateToDisk()
#endif
// Note: if MAX_NUM_NODES=100 and meshtastic_NodeInfoLite_size=166, so will be approximately 17KB
// Because so huge we _must_ not use fullAtomic, because the filesystem is probably too small to hold two copies of this
return saveProto(prefFileName, sizeof(devicestate) + numMeshNodes * meshtastic_NodeInfoLite_size, &meshtastic_DeviceState_msg,
&devicestate, false);
size_t deviceStateSize;
pb_get_encoded_size(&deviceStateSize, meshtastic_DeviceState_fields, &devicestate);
return saveProto(prefFileName, deviceStateSize, &meshtastic_DeviceState_msg, &devicestate, false);
}
bool NodeDB::saveToDiskNoRetry(int saveWhat)