This commit is contained in:
Stavros Korokithakis 2021-08-18 13:44:53 +03:00
parent 89f7b8241e
commit f2141de749
No known key found for this signature in database
GPG Key ID: 26EA345ECD4C2A63
3 changed files with 35 additions and 3 deletions

View File

@ -43,14 +43,14 @@ git submodule update --init --recursive
git checkout Dockerfile
echo "RUN pip install intelhex" >> Dockerfile
echo 'ENV PATH="/home/ardupilot/.local/bin:/usr/lib/ccache:/ardupilot/Tools/autotest:/opt/'$(ls -1 /opt/ | grep gcc-arm-none-eabi)'/bin:${PATH}"' >> Dockerfile
echo 'ENV PATH="/home/ardupilot/.local/bin:/usr/lib/ccache:/opt/gcc-arm-none-eabi-10-2020-q4-major/bin:/ardupilot/Tools/autotest:${PATH}"' >> Dockerfile
cat Dockerfile
docker build . -t ardupilot
git checkout Dockerfile
docker run --rm -it -v "$(pwd)":/ardupilot ardupilot:latest ./waf configure --board="$BOARD"
docker run --rm -it -v "$(pwd)":/ardupilot ardupilot:latest ./waf build
docker run --rm -it -v "$(pwd)":/ardupilot ardupilot ./waf configure --board="$BOARD"
docker run --rm -it -v "$(pwd)":/ardupilot ardupilot ./waf build
```

View File

@ -9,3 +9,4 @@ insert_anchor_links = "right"
Click on a link in the list below to go to that page:
1. [Monero GUI syncing stuck with Ledger](../../software/monero-gui-syncing-stuck-with-ledger)
1. [Test and format SD cards](../../software/test-and-format-sd-cards)

View File

@ -0,0 +1,31 @@
+++
title = "Test and format SD cards"
weight = 2
sort_by = "weight"
insert_anchor_links = "right"
+++
I wrote a short bash script that tests SD cards with [F3](https://3ds.hacks.guide/f3-(linux).html) to see if they're fake, deletes everything on them, creates a new partition table and one exFAT partition on them.
Here it is:
```bash
#!/usr/bin/env bash
set -euox pipefail
sudo umount --force "$1"1 || true
sudo f3probe --destructive --time-ops "$1"
sudo parted --script "$1" "mklabel msdos" "mkpart primary ext4 0% 100%"
sleep 1
sudo mkfs.exfat -n Stavros "$1"1
eject "$1"
```
Save it as `formatsd.sh` and run it as `./formatsd.sh /dev/sdX`.
* * *
<p style="font-size:80%; font-style: italic">
Last updated on August 18, 2021. For any questions/feedback,
email me at <a href="mailto:hi@stavros.io">hi@stavros.io</a>.
</p>