Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
4e769ad
Add SSH config storage support
brainstorm Jun 1, 2025
c01b70d
Update references to sunset config system(s)
brainstorm Jun 12, 2025
dd07731
[ci skip] Continue adapting config/storage/flashstorage interfaces fr…
brainstorm Jun 16, 2025
359dede
[ci skip] Stubborn 'unresolved import' for SSHEncode/SSHDecode traits…
brainstorm Jun 17, 2025
717bed1
[ci skip] Same SSHDecode/SSHEncode 'unresolved import' issue /cc @mkj
brainstorm Jun 17, 2025
97f5338
[ci skip] Apply @mkj's fix for sshwire derive, compiles now, thx :D
brainstorm Jun 18, 2025
d46b3d5
[ci skip] Init config/storage from main, will most probably refactor …
brainstorm Jun 21, 2025
6bf0573
[ci skip] Pass config through tasks
brainstorm Jun 26, 2025
96c910a
Merge branch 'main' into fix_passwd_auth
brainstorm Jun 26, 2025
8077954
[ci skip] AnyPin::steal is unsafe(), need to find a way to safely rec…
brainstorm Jun 27, 2025
c981001
[ci skip] Switch to multi-thread (feature flag) in sunset-async to ge…
brainstorm Jun 28, 2025
e8b7cbe
[ci skip] Experiment with suggestions given on esp-rs/esp-hal matrix …
brainstorm Jul 1, 2025
7f98af9
[ci skip] This should be simpler, too much mutex/static cell/etc...
brainstorm Jul 6, 2025
30e2fe7
Use SunsetMutex() for the UART reconfiguration scheme.
brainstorm Jul 8, 2025
d416aea
Change default SSID string (instead of using server id string)
brainstorm Jul 9, 2025
517eed8
When updating espflash to 4.x, esp_bootloader_esp_idf::esp_app_desc()…
brainstorm Jul 9, 2025
ff30894
Disable custom partitions for now and SunsetMutex seems to interfere …
brainstorm Jul 9, 2025
90b4321
Merge branch 'main' into fix_passwd_auth
brainstorm Jul 9, 2025
0d6ee1a
Fix mutex issues with uart_task and draft PinConfig struct/impl for R…
brainstorm Jul 14, 2025
0419520
Merge branch 'fix_passwd_auth' of github.com:brainstorm/esp_hosted_ss…
brainstorm Jul 14, 2025
a0bebbd
Complex types such as Mutex<CriticalSectionRawMutex> complicate the s…
brainstorm Jul 16, 2025
24c009e
Cargo.lock
brainstorm Jul 16, 2025
7f9f399
[ci skip] Working through PinConfig types issues, small cleanup
brainstorm Jul 19, 2025
6be7ce2
Serializable type on Pinconfig.
brainstorm Jul 21, 2025
6630c64
[ci skip] Testing/refactoring idea proposed in https://github.com/bra…
brainstorm Jul 28, 2025
c35a3c6
[ci skip] Big mess, ignore macro-heavy experiment :-S
brainstorm Jul 29, 2025
becd503
Adding channels and realising that unsafe is almost surely needed for…
brainstorm Aug 4, 2025
bb7cdfa
Get rid of unsafe via .degrade and Option<> (thx @bugadani for the tip!)
brainstorm Aug 15, 2025
7e6ec0e
Cleanup before considering Signals (instead of channels) and how to p…
brainstorm Aug 20, 2025
9968552
Attempt to use automatic Send/Receive PinChannel struct... issue with…
brainstorm Aug 25, 2025
73e8c5c
Bit more cleanup
brainstorm Aug 25, 2025
a54ae13
Nightly works, AsyncFnOnce should be stabilised around 6 months to 1 …
brainstorm Aug 25, 2025
1ea08e8
Working on hardware now, the channels/signaling logic needs to be fix…
brainstorm Aug 29, 2025
d4f84cc
Available gpios, not just gpios
brainstorm Sep 9, 2025
c19423a
Event itself should trigger env/config/serialization
brainstorm Sep 9, 2025
bbcc09e
Re-enabled partitions.csv since it's needed for NVS/SSHConfig/FlashCo…
brainstorm Sep 21, 2025
53f1923
Separate sunset and ssh-stamp errors, add ipv6 stub to determine some…
brainstorm Sep 22, 2025
3dbcf3b
Merge channel_pins_nicer branch to fix_passwd_auth
brainstorm Sep 22, 2025
d461377
Config hash still on ~2 bytes offset, now getting PacketWrong while s…
brainstorm Sep 23, 2025
d9ccdd3
Feature-gate ipv6 for now, it was meant as an experiment to add/remov…
brainstorm Oct 1, 2025
d52ccff
[ci skip] New config serialised correctly... unsure if format is corr…
brainstorm Oct 6, 2025
fa70369
[ci skip] Back to shifted hash config error
brainstorm Oct 6, 2025
9a331fe
[ci skip] Fixed SSHEncode/Decode for SSHStampConfig, unfortunately it…
brainstorm Oct 7, 2025
e2ee151
[ci skip] Try to experiment with probe-rs debugging support on ESP ta…
brainstorm Oct 8, 2025
df554ee
Experiments with vscode/probe-rs debugging failed due to dev tooling …
brainstorm Nov 10, 2025
7cf834a
Only one admin key, do not use option_env because we'll be using ssh …
brainstorm Nov 11, 2025
821126b
Turns out that calc_hash was failing because we had SerdePinConfig wi…
brainstorm Nov 11, 2025
7a6eb55
Thorough dbg cleanup...
brainstorm Nov 11, 2025
aba0244
Refactor to accomodate SessionType and share channels between types.
brainstorm Nov 11, 2025
e79b485
cargo fmt
brainstorm Nov 17, 2025
70177c2
Separate 'regular' SSHConfig from Pins-related configuration and oper…
brainstorm Nov 17, 2025
e741242
Comment out SessionType(s) not needed for now
brainstorm Nov 17, 2025
8a8fe3d
Fix up PinChannel logic so that pins are updated on the connection_lo…
brainstorm Nov 17, 2025
81f50e7
[skip ci] Using SFTP pull request for sunset and sunset-async
jubeormk1 Dec 16, 2025
2514a57
[skip ci] Adding elements to branch the session to SFTP
jubeormk1 Dec 17, 2025
0f20637
[skip ci] WIP: Broken dependencies
jubeormk1 Dec 17, 2025
6013b88
fixing so it can compile and run
jubeormk1 Dec 18, 2025
19cc74f
Updating for compliance with REUSE Specification
gabriel-ku Dec 1, 2025
6922f03
[skip ci] Using SFTP pull request for sunset and sunset-async
jubeormk1 Dec 16, 2025
f6577ae
[skip ci] Adding elements to branch the session to SFTP
jubeormk1 Dec 17, 2025
eb1a174
[skip ci] WIP: Broken dependencies
jubeormk1 Dec 17, 2025
9c2fe3a
WIP: Fixing Cargo.{toml,lock} after rebasing
jubeormk1 Dec 19, 2025
50621ea
[skip ci] Added empty sftp event handling
jubeormk1 Dec 19, 2025
db761cd
git
jubeormk1 Dec 19, 2025
699c685
[skip ci] Added empty implementation of SftpServer
jubeormk1 Dec 19, 2025
1391559
[skip ci] fixing formating globally
jubeormk1 Dec 19, 2025
ec1afc2
[WIP] Added basic request handling to hook OTA
jubeormk1 Dec 19, 2025
922cf2c
[skip ci] Adding TODO task for evaluating removing rustc-hash and use…
jubeormk1 Jan 1, 2026
9dc0bc9
[skip ci] WIP: Preliminary definition of OTA. Will change
jubeormk1 Jan 3, 2026
a6350fe
[skip ci] WIP: Adding OTA package, failing to unit tests
jubeormk1 Jan 5, 2026
e491246
WIP: Fixed the issue running unit test in std
jubeormk1 Jan 5, 2026
458596d
WIP: Fixed the issue running unit test in std
jubeormk1 Jan 5, 2026
ab70801
Merge branch 'sftp-ota-tests' of http://github.com/jubeormk1/ssh-stam…
jubeormk1 Jan 6, 2026
8efcbd4
[skip ci] Added rountrip test for ota tlv
jubeormk1 Jan 6, 2026
b72e404
[skip ci] skeleton
jubeormk1 Jan 7, 2026
9513e7d
Smalls changes including ota size max 4GB
jubeormk1 Jan 7, 2026
e033f62
Tinkering before serialising executable and metadata
jubeormk1 Jan 7, 2026
71ddcfc
Adding tests for serializing/deserializing tlv into header
jubeormk1 Jan 8, 2026
0534494
WIP: ota-packer packing otas
jubeormk1 Jan 8, 2026
9e75603
[skip ci] WIP: Starting to deserialize the ota file with the utility …
jubeormk1 Jan 8, 2026
50e37bf
[skip ci] First version of ota-packer
jubeormk1 Jan 8, 2026
6f56dd9
[skip ci] Tidying up log uses and adding some notes
jubeormk1 Jan 8, 2026
63b3677
[skip ci] WIP Parsing metadata. Requiring changes
jubeormk1 Jan 9, 2026
55d07ac
[skip ci] Adding ota-packer as a cargo command via alias
jubeormk1 Jan 10, 2026
3c3fb11
[skip ci] Broken: Length of OtaTLV changed from u32 to u8
jubeormk1 Jan 10, 2026
bdc2205
[skip ci] WIP Refactor process_data_chunk moving decoding test detail…
jubeormk1 Jan 10, 2026
16d52d5
[skip ci] WIP: Verifying the integrity of ota but not writing it yet
jubeormk1 Jan 12, 2026
1de2743
[skip ci] On close the ota processor resets to be ready for next OTA
jubeormk1 Jan 12, 2026
d76fc23
[skip ci] Making ota fail quick
jubeormk1 Jan 12, 2026
98cc7c6
[skip ci] First complete ota upload but not applied yet. Bug in SFTP …
jubeormk1 Jan 12, 2026
ad0c14c
[skip ci] Fake OTA 1318766 bytes taking 36s (36kB/s)
jubeormk1 Jan 12, 2026
ca18d5b
[skip ci] Modifying partitions.csv for 4MB devices
jubeormk1 Jan 13, 2026
b5b130c
[skip ci] Notes on what is Finished for and why it ignores data
jubeormk1 Jan 13, 2026
dd8b12f
[skip ci] Refactoring ota lib as it was getting very large (+1200 lin…
jubeormk1 Jan 14, 2026
fd097a9
[skip ci] Bumping cc in cargo lock
jubeormk1 Jan 14, 2026
a0ea594
[skip ci] Renaming back the nvs partition to app_config
jubeormk1 Jan 14, 2026
fae1f0b
[skip ci] Moving flash storage details to a singleton storage package
jubeormk1 Jan 15, 2026
70e189e
[skip ci] Implementing validate_current_ota_partition
jubeormk1 Jan 15, 2026
3107f6b
[skip ci] WIP: Incomplete implementation of the target OtaWriter
jubeormk1 Jan 15, 2026
0af9a88
[skip ci] WIP: Changes required in sunset-sftp as target writer requi…
jubeormk1 Jan 15, 2026
609b9c3
[skip ci] Fixed SftpServer functions so they are async
jubeormk1 Jan 16, 2026
2ee062f
[skip ci] Fencing off some packets to avoid conflicts with ota-packer…
jubeormk1 Jan 16, 2026
3a4dc0a
[skip ci] More fencing of dependencies to avoid issues with ota-packer
jubeormk1 Jan 16, 2026
50e5b75
[skip ci] Some issues applying the OTA
jubeormk1 Jan 16, 2026
4aa6b5e
[skip ci] Fixed a bug reading partition tables
jubeormk1 Jan 17, 2026
239c7c9
Minor fixes, @jubeormk1, please #reviewthis. I'd like to avoid requir…
brainstorm Jan 17, 2026
78f5190
[skip ci] Investigating ota failure copy ok
jubeormk1 Jan 18, 2026
7aac1fa
[skip ci] going back to previous partitions
jubeormk1 Jan 18, 2026
a7d5a62
Merge branch 'sftp-ota' of http://github.com/jubeormk1/ssh-stamp into…
jubeormk1 Jan 18, 2026
f87dc0c
[skip ci] WIP: bumping ota-bootloader-esp-idf to latest Breaking changes
jubeormk1 Jan 19, 2026
1e92413
[skip ci] WIP Adapting the code for latest esp-bootloader-esp-idf
jubeormk1 Jan 19, 2026
85c1dbf
[skip ci] WIP: Bumping all esp-* dependencies
jubeormk1 Jan 20, 2026
2f60fe9
[skip ci] WIP: Updated ota and storage with new API
jubeormk1 Jan 20, 2026
030a2e8
[skip ci] WIP: Updated net with new esp-hal API
jubeormk1 Jan 20, 2026
a5c46fd
[skip ci] Finished fixing errors, Manually tested ota OK!!
jubeormk1 Jan 21, 2026
76c06e5
[skip ci] Adding instructions to perform an OTA
jubeormk1 Jan 21, 2026
c2a906c
[skip ci] Partitions.csv tuned for maximizing 4MB targets
jubeormk1 Jan 22, 2026
866dfaf
[skip ci] Added check for ota size
jubeormk1 Jan 22, 2026
985e2c9
[skip ci] First OTA automated test for HIL setup targeting esp32c6
jubeormk1 Jan 23, 2026
70ae8a5
Minor cleanup
brainstorm Jan 24, 2026
7905521
[skip ci] Refactoring ota and storage workspace package members
jubeormk1 Jan 26, 2026
117d7bc
[skip ci] Removing unused storagetraits usages
jubeormk1 Jan 27, 2026
025d2a4
[skip ci] Fixed validate_ota()
jubeormk1 Jan 30, 2026
5a4c9ff
Fixing github workflows
jubeormk1 Jan 30, 2026
d6eae63
[skip ci] Fixing CI
jubeormk1 Feb 2, 2026
a7ddd88
[skip ci] Explicitly disabling default features to exclude the defaul…
jubeormk1 Feb 2, 2026
20df1e2
Testing CI with act Xtensa Toolchain needs a rustc update 1.86.0->1.88.0
jubeormk1 Feb 2, 2026
896936a
Adding missing devices
jubeormk1 Feb 2, 2026
0fa05ef
renaming esp.rs to esp_ota.rs and enable all steps of ota/test-hil-...sh
jubeormk1 Feb 2, 2026
d85f5ee
Cleanup and vscode settings to allow rust-analyzer to use the right c…
jubeormk1 Feb 3, 2026
73e0d9e
Modifying OTA traits to reset predictably after validation
jubeormk1 Feb 3, 2026
1f4fd82
SFTP-OTA as a feature
jubeormk1 Feb 3, 2026
694fbd4
building ota-packer in the ci
jubeormk1 Feb 4, 2026
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
67 changes: 47 additions & 20 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,47 @@
# SPDX-License-Identifier: GPL-3.0-or-later

[alias]
build-esp32 = "build --release --target xtensa-esp32-none-elf --features esp32"
build-esp32c2 = "build --release --target riscv32imc-unknown-none-elf --features esp32c2"
build-esp32c3 = "build --release --target riscv32imc-unknown-none-elf --features esp32c3"
# No default features avoids selecting the default target (esp32c6) which would conflict with other target features.

build-esp32 = "build --release --target xtensa-esp32-none-elf --no-default-features --features esp32 -Z build-std=core,alloc"
build-esp32c2 = "build --release --target riscv32imc-unknown-none-elf --no-default-features --features esp32c2 "
build-esp32c3 = "build --release --target riscv32imc-unknown-none-elf --no-default-features --features esp32c3 "
# Available but not supported by esp-hal (yet).
#build-esp32c5 = "build --release --target riscv32imac-unknown-none-elf --features esp32c5"
build-esp32c6 = "build --release --target riscv32imac-unknown-none-elf --features esp32c6"
build-esp32s2 = "build --profile esp32s2 --target xtensa-esp32s2-none-elf --features esp32s2"
build-esp32s3 = "build --release --target xtensa-esp32s3-none-elf --features esp32s3"

run-esp32 = "run --release --target xtensa-esp32-none-elf --features esp32"
run-esp32c2 = "run --release --target riscv32imc-unknown-none-elf --features esp32c2"
run-esp32c3 = "run --release --target riscv32imc-unknown-none-elf --features esp32c3"
#build-esp32c5 = "build --release --target riscv32imac-unknown-none-elf --no-default-features --features esp32c5"
build-esp32c6 = "build --release --target riscv32imac-unknown-none-elf --no-default-features --features esp32c6"
# Debug build (too big for target and probe-rs doesn't work anyway)
#build-esp32c6 = "build --target riscv32imac-unknown-none-elf --no-default-features --features esp32c6"
build-esp32s2 = "build --profile esp32s2 --target xtensa-esp32s2-none-elf --no-default-features --features esp32s2 -Z build-std=core,alloc"
build-esp32s3 = "build --release --target xtensa-esp32s3-none-elf --no-default-features --features esp32s3 -Z build-std=core,alloc"

run-esp32 = "run --release --target xtensa-esp32-none-elf --no-default-features --features esp32 "
run-esp32c2 = "run --release --target riscv32imc-unknown-none-elf --no-default-features --features esp32c2 "
run-esp32c3 = "run --release --target riscv32imc-unknown-none-elf --no-default-features --features esp32c3 "
# Available but not supported by esp-hal (yet).
#run-esp32c5 = "run --release --target riscv32imac-unknown-none-elf --features esp32c5"
run-esp32c6 = "run --release --target riscv32imac-unknown-none-elf --features esp32c6"
run-esp32s2 = "run --profile esp32s2 --target xtensa-esp32s2-none-elf --features esp32s2"
run-esp32s3 = "run --release --target xtensa-esp32s3-none-elf --features esp32s3"
#run-esp32c5 = "run --release --target riscv32imac-unknown-none-elf --no-default-features --features esp32c5"
run-esp32c6 = "run --release --target riscv32imac-unknown-none-elf --no-default-features --features esp32c6"

# Debug build (too big for target and probe-rs doesn't work anyway)
#run-esp32c6 = "run --target riscv32imac-unknown-none-elf --no-default-features --features esp32c6"
run-esp32s2 = "run --profile esp32s2 --target xtensa-esp32s2-none-elf --no-default-features --features esp32s2 "
run-esp32s3 = "run --release --target xtensa-esp32s3-none-elf --no-default-features --features esp32s3 "

# Build ota-packer alias: I might need to modify it so when run it can run a build for target architecture, extract the binary from the elf image and then pack the ota file.
ota-packer = "run --package ota --bin ota-packer --target x86_64-unknown-linux-gnu"

# Test alias
test-ota = "test --package ota --target x86_64-unknown-linux-gnu"

[target.xtensa-esp32-none-elf]
runner = "espflash flash --baud=921600 --monitor --chip esp32"
rustflags = ["-C", "link-arg=-nostartfiles", '--cfg=feature="esp32"']
[target.riscv32imc-unknown-none-elf]
runner = "espflash flash --baud=921600 --monitor"
rustflags = [ "-C", "force-frame-pointers"]
rustflags = ["-C", "force-frame-pointers"]
[target.riscv32imac-unknown-none-elf]
runner = "espflash flash --baud=921600 --monitor"
rustflags = [ "-C", "force-frame-pointers"]
runner = "espflash flash --baud=921600 --partition-table partitions.csv --monitor"
rustflags = ["-C", "force-frame-pointers"]

[target.xtensa-esp32s2-none-elf]
runner = "espflash flash --baud=921600 --monitor --chip esp32s2"
rustflags = ["-C", "link-arg=-nostartfiles", '--cfg=feature="esp32s2"']
Expand All @@ -38,10 +52,23 @@ runner = "espflash flash --baud=921600 --monitor --chip esp32s3"
rustflags = ["-C", "link-arg=-nostartfiles", '--cfg=feature="esp32s3"']


# https://docs.espressif.com/projects/rust/esp-hal/1.0.0-beta.1/esp32c6/esp_hal/index.html#additional-configuration
[env]
ESP_LOG="INFO"
ESP_LOG = "info"
#ESP_HAL_CONFIG_PLACE_SWITCH_TABLES_IN_RAM=true
#ESP_HAL_CONFIG_PLACE_ANON_IN_RAM=false
#ESP_HAL_CONFIG_FLIP_LINK=false
#ESP_HAL_CONFIG_STACK_GUARD_OFFSET=4096
#ESP_HAL_CONFIG_STACK_GUARD_VALUE=3740121773
#ESP_HAL_CONFIG_IMPL_CRITICAL_SECTION=true


[build]
target = "riscv32imac-unknown-none-elf"
# target = "x86_64-unknown-linux-gnu"

[unstable]
build-std = ["core", "alloc"]
build-std = []

# build-std core and alloc has been moved as per alias parameter since
# `unstable` section MUST be global and cannot be definde per target.
27 changes: 23 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- main
- build-ota-packer
pull_request:
branches:
branches:
- main
- build-ota-packer
workflow_dispatch:

jobs:
Expand All @@ -20,7 +22,7 @@ jobs:
# RISC-V devices:
{ soc: "esp32c2", toolchain: "stable" },
{ soc: "esp32c3", toolchain: "stable" },
# { soc: "esp32c5", toolchain: "stable" },
## { soc: "esp32c5", toolchain: "stable" },
{ soc: "esp32c6", toolchain: "stable" },
# Xtensa devices:
{ soc: "esp32", toolchain: "esp" },
Expand All @@ -38,13 +40,13 @@ jobs:
with:
target: riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf
toolchain: stable
components: rust-src
components: rust-src, clippy, rustfmt
- name: Setup Rust toolchain for Xtensa
if: ${{ contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.device.soc) }}
uses: esp-rs/xtensa-toolchain@v1.5
with:
ldproxy: false
version: 1.86.0.0
version: 1.88.0.0 # Bumped from 1.86.0

- name: Build project
run: cargo +${{ matrix.device.toolchain }} build-${{ matrix.device.soc }}
Expand All @@ -54,3 +56,20 @@ jobs:
run: |
cargo +${{ matrix.device.toolchain }} clippy --features ${{ matrix.device.soc }} --target riscv32imac-unknown-none-elf -- -D warnings
cargo +${{ matrix.device.toolchain }} fmt -- --check

build-ota-packer:
name: Check OTA Packer
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Stable Rust Toolchain
uses: dtolnay/rust-toolchain@v1
with:
target: riscv32imac-unknown-none-elf
# toolchain: nightly # Avoids issues with rust-src not available on stable
toolchain: stable # Avoids issues with rust-src not available on stable
- name: Build ota-packer
run: cargo build --package ota --bin ota-packer --target x86_64-unknown-linux-gnu
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ target/

# VSCode workspace(s)
*.code-workspace

# Temporarily ignore book from this branch
docs/book
20 changes: 19 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@
"svdFile": "${workspaceFolder}/docs/svd/esp32c6.svd"
}
]
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests 'ota'",
"cargo": {
"args": [
"test",
"--package=ota",
"--features=std",
"--target=x86_64-unknown-linux-gnu",
"--",
"--nocapture",
"--test-threads=1"
]
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
}
12 changes: 10 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"rust-analyzer.check.allTargets": false,
}
"rust-analyzer.cargo.target": "riscv32imac-unknown-none-elf",
"rust-analyzer.cargo.noDefaultFeatures": true,
"rust-analyzer.cargo.features": [
"esp32c6"
],
"rust-analyzer.cargo.extraArgs": [
"--release"
],
"rust-analyzer.check.allTargets": false
}
Loading
Loading