34 lines
1.5 KiB
Bash
Executable File
34 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# install.sh - turn a freshly imaged LattePanda IOTA into a fire-watch tower host.
|
|
# Run it ON the device; --help lists every option. scripts/install-tower drives
|
|
# this for a whole install, prompting for what it needs; this stays usable alone.
|
|
#
|
|
# sudo ./install.sh --deps --preconditions
|
|
# ./install.sh --probe change nothing, report
|
|
# ./install.sh --stdout --axes yaw --loom standard --motor yaw.r_sense_ohm=0.075 ...
|
|
#
|
|
# Everything shared with the other boards' kits is in ../common/kit.sh. What is
|
|
# here is what differs on the IOTA.
|
|
#
|
|
set -euo pipefail
|
|
|
|
KIT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
KIT_BOARD=lattepanda-iota
|
|
KIT_FW_ENV=iota_rp2040
|
|
KIT_MCU_VID=2e8a
|
|
KIT_DEFAULT_AXES=yaw
|
|
KIT_IMU_DEVICE=/dev/ttyS0
|
|
KIT_IMU_NOTE="On the IOTA the only PCH serial on the header is COM1; confirm it enumerates first."
|
|
# No PCH-side I2C reaches the header, so an ambient sensor needs a USB-I2C bridge
|
|
# (MCP2221A) whose bus number depends on enumeration order: nothing to default to.
|
|
KIT_ENV_DEVICE=""
|
|
KIT_ENV_NOTE="MUST be a real I2C adapter, not SMBus-only: check with \`i2cdetect -F <n>\`.
|
|
The IOTA exposes no PCH-side I2C on the header, so this is normally a USB-I2C
|
|
bridge (MCP2221A), whose bus number depends on enumeration order."
|
|
|
|
# shellcheck source=../common/kit.sh
|
|
. "$KIT_DIR/../common/kit.sh"
|
|
# scripts/install-tower sources this file for the facts and probes alone.
|
|
[[ ${KIT_NO_MAIN:-0} == 1 ]] || kit_main "$@"
|