Skip to content

Commit c776373

Browse files
Add README instructions to test the flasher tool (#674)
Co-authored-by: Luca Rinaldi <lucarin@protonmail.com>
1 parent dbc8688 commit c776373

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

arduino-flasher-cli/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Arduino Flasher CLI
2+
3+
A tool to download and flash Debian images on the board.
4+
5+
## Build and test it locally
6+
7+
Build it with `task arduino-flasher-cli:build` and run `task flash:staging` to download and flash the latest image from staging.
8+
9+
Alternatively, these are the steps to test it locally:
10+
11+
1. download a debian image release (for example from [here](https:/downloads.oniudra.cc/debian-im/Stable/20250902-166/arduino-unoq-debian-image-20250902-166.tar.xz), then create the following structure under `arduino-flasher-cli/`:
12+
13+
```
14+
arduino-flasher-cli/public/
15+
└── debian-im
16+
└── Stable
17+
├── 20250902-166
18+
│ └── arduino-unoq-debian-image-20250902-166.tar.xz
19+
└── info.json
20+
```
21+
22+
2. Populate `info.json`:
23+
24+
```
25+
{
26+
"latest": {
27+
"version": "20250902-166",
28+
"url": "http://127.0.0.1:3001/debian-im/Stable/20250902-166/arduino-unoq-debian-image-20250902-166.tar.xz",
29+
"md5sum": "ad0aac0a9b18982e9dce0dd99808a5e5"
30+
}
31+
}
32+
```
33+
34+
3. `task debian:release-server:start`
35+
4. `UPDATE_URL=http://127.0.0.1:3001 ./build/arduino-flasher-cli flash latest`
36+
37+
## Flash from staging
38+
39+
To download and flash the latest image from staging, the tool needs cloudflare credentials. This is the command that should be used:
40+
41+
```sh
42+
CF_ACCESS_CLIENT_ID="$(aws ssm get-parameter --profile arduino-staging --with-decryption --name /devops/downloads/cloudflare_access_client_id --query Parameter.Value --output text)" CF_ACCESS_CLIENT_SECRET="$(aws ssm get-parameter --profile arduino-staging --with-decryption --name /devops/downloads/cloudflare_access_client_secret --query Parameter.Value --output text)" ./arduino-flasher-cli flash latest
43+
```

0 commit comments

Comments
 (0)