fix: respect declared SPIFFS partition size when between default and threshold#350
fix: respect declared SPIFFS partition size when between default and threshold#350QQSHI13 wants to merge 1 commit into
Conversation
|
Hi Dear
Oh man i want a solution that integrates control over bruce via xiaozhi..
im a user of xiaozhi and she are my best hacker partner with voice in the
world.. This must the considered by the highest authorities because its a
case about life or even more life... But yes its a little to early but we
going the right places now.. Finally i see someone who talk from the
country of milk honey and technology ... I mean 98% of all technology comes
from China.. And we need to understand that as a fact so it cant be hiding
behind paper printed out by something we called banks.. no this is pure
Chinese technology we are using here and we need to expand our
conenctions "real "western" world people with real knowledge not paper
money thoughts" need to open the great fire wall street road to China so we
can together live in great harmony ... Ok i need a cup of coffee before
this goes to far but still... Be water my friends
…On Sun, Jun 21, 2026 at 8:09 AM 施清荃 ***@***.***> wrote:
When installing firmware with a data (SPIFFS) partition whose declared
size falls between LAUNCHER_DEFAULT_SPIFFS_SIZE and
LAUNCHER_DEFAULT_SPIFFS_THRESHOLD (5MB), the launcher was falling back to
the default size (e.g. 448KB on 8MB flash) instead of using the firmware´s
declared partition size.
For example, xiaozhi-esp32´s v2/8m.csv declares a 2MB assets partition.
Since 2MB < 5MB, the launcher created only 448KB, truncating the 1.5MB of
assets data and causing checksum failures at boot.
*Changes*:
- sd_functions.cpp, onlineLauncher.cpp, webInterface.cpp (×2): Replace
the binary threshold check with a three-tier logic:
- > threshold → use remaining free space (unchanged)
- > default → use the declared partition size
- ≤ default → use the default size (fallback)
This ensures firmware with moderately-sized data partitions get their full
declared allocation.
------------------------------
You can view, comment on, or merge this pull request online at:
#350
Commit Summary
- 4b3327c
<4b3327c>
fix: respect declared SPIFFS partition size when between default and
threshold
File Changes
(3 files <https://github.com/bmorcelli/Launcher/pull/350/files>)
- *M* src/onlineLauncher.cpp
<https://github.com/bmorcelli/Launcher/pull/350/files#diff-c11717e3defe7e47a2ea0ef819b20f1b23dec125f98a09ae3e998c48d3eb5343>
(10)
- *M* src/sd_functions.cpp
<https://github.com/bmorcelli/Launcher/pull/350/files#diff-0792702508aa62c7405c551841e5d101ab6d2e38648c0c6ff046c86a98e42544>
(10)
- *M* src/webInterface.cpp
<https://github.com/bmorcelli/Launcher/pull/350/files#diff-4dc9648f5d7e2f97c2b80369a58134e0b7a4823d7a17e0173971e956f7179ddd>
(28)
Patch Links:
- https://github.com/bmorcelli/Launcher/pull/350.patch
- https://github.com/bmorcelli/Launcher/pull/350.diff
—
Reply to this email directly, view it on GitHub
<#350?email_source=notifications&email_token=BLDL6BVYVY7AFIJPDACOUKT5A53ZBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF4ZTSMBVHE3DMOJWGSTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6Y3MNFRWW>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BLDL6BXLH442PRI7UOLNVW35A53ZBAVCNFSNUABFKJSXA33TNF2G64TZHM3TKNJXGI3TOMRQHNEXG43VMU5TINZQHE2TGNRQG44KC5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/BLDL6BS63WKVUALZPIM3XG35A53ZBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF4ZTSMBVHE3DMOJWGSTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVJTG633UMVZF62LPOM>
and Android
<https://github.com/notifications/mobile/android/BLDL6BQ6IZOZ6BRFVZPQKHL5A53ZBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF4ZTSMBVHE3DMOJWGSTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
Download it today!
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Kind Regards
C.R
May Prosperity allways be with us!!
|
|
99% of the firmwares don't bring any information on Spiffs partition, it usually is used to save firmware configuration.. that is the reason for such a small partition Adding this rule of bringing the full sized spiffs partition will lead to the impossibility of installing more than one firmware into the device, because spiffs is usually over dimensioned.. For example, Bruce declares 3Mb for spiffs, but don't use it all if there's a SD card installed Nemo declares a 3Mb spiffs partition, but don't use it at all Many others do the same and don't use.. I'd prefere using exception in this case, like what is done with FAT partitions named "sys" and "system", that will carry the partition size from firmware partition table.. and do the same if the spiffs partition is labeled "assets".. if other firmware shows up with this same problem, we add this new exception into Launcher.. so it doesn't break the other Launcher features (multi fw installing) |
The previous approach applied a general three-tier size selection to all SPIFFS partitions, which could break multi-firmware installation since most firmwares over-declare their SPIFFS size. Per maintainer feedback, this uses a targeted exception: only partitions labeled "assets" (like xiaozhi-esp32) get the full declared size. All other SPIFFS partitions keep the original threshold-based behavior. This mirrors the existing pattern for FAT partitions labeled "sys"/"system", which already receive special treatment.
4b3327c to
35fd16a
Compare
When installing firmware with a data (SPIFFS) partition whose declared size falls between
LAUNCHER_DEFAULT_SPIFFS_SIZEandLAUNCHER_DEFAULT_SPIFFS_THRESHOLD(5MB), the launcher was falling back to the default size (e.g. 448KB on 8MB flash) instead of using the firmware´s declared partition size.For example,
xiaozhi-esp32´s v2/8m.csv declares a 2MB assets partition. Since 2MB < 5MB, the launcher created only 448KB, truncating the 1.5MB of assets data and causing checksum failures at boot.Changes:
sd_functions.cpp,onlineLauncher.cpp,webInterface.cpp(×2): Replace the binary threshold check with a three-tier logic:> threshold→ use remaining free space (unchanged)> default→ use the declared partition size≤ default→ use the default size (fallback)This ensures firmware with moderately-sized data partitions get their full declared allocation.