build: add image_build.sh and erase_ota.sh scripts
This commit is contained in:
7
rust/erase_ota.sh
Executable file
7
rust/erase_ota.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
cargo espflash erase-parts otadata --partition-table "${SCRIPT_DIR}/partitions.csv"
|
||||
17
rust/image_build.sh
Executable file
17
rust/image_build.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
rm -f "${SCRIPT_DIR}/image.bin"
|
||||
|
||||
"${SCRIPT_DIR}/build_website.sh"
|
||||
|
||||
cargo build --release
|
||||
espflash save-image \
|
||||
--bootloader "${SCRIPT_DIR}/bootloader.bin" \
|
||||
--partition-table "${SCRIPT_DIR}/partitions.csv" \
|
||||
--chip esp32c6 \
|
||||
target/riscv32imac-unknown-none-elf/release/plant-ctrl2 \
|
||||
"${SCRIPT_DIR}/image.bin"
|
||||
Reference in New Issue
Block a user