palm-client: install from the dev Mac over USB, drop the remote sync host
pilot-link's macOS backend talks to the cradle through IOKit (port usb:), so make install runs pilot-xfer locally.
This commit is contained in:
1 parent
f1159d6f48
commit
6ff51bea14
4 files changed
+17
-57
No files matched your search
+1
-1
@@ -22,7 +22,7 @@
|
||||
### Palm client
|
||||
- [x] Toolchain set up: prc-tools-remix 2.3.6 + PilRC + Palm OS 3.5 SDK in Docker (`palm-client/Dockerfile`)
|
||||
- [x] Scaffold: builds `visormesh.prc` (main form + "Query radio" → CMD_DEVICE_QUERY); protocol framing with host tests
|
||||
- [ ] Sync host (Mac mini, Debian 13): visor driver present ✓, build pilot-link into ~/.local, `make install` tested
|
||||
- [ ] Install over USB from the dev Mac: build pilot-link (desrod) into ~/.local, `make install` tested with the Visor
|
||||
- [ ] Emulator: CloudpilotEmu with a Palm OS 3.5 ROM (the Visor isn't emulated); optionally POSE + a Visor Neo ROM in a Windows VM
|
||||
- [ ] Original Handspring SDK headers (Springboard `HsCard*` APIs; the PalmOne `HsExt.h` lacks them), needed for module-ROM work only
|
||||
- [ ] Port springSD bus routines; SC16IS740 driver
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# make build build/visormesh.prc (in Docker if the toolchain isn't installed)
|
||||
# make test run the host-side protocol tests
|
||||
# make install copy the .prc to the sync host and install it over the USB cradle
|
||||
# make install install the .prc over the USB cradle (press HotSync when asked)
|
||||
# make clean
|
||||
|
||||
APP = visormesh
|
||||
@@ -16,9 +16,10 @@ CC = m68k-palmos-gcc
|
||||
CFLAGS = -palmos3.5 -O2 -Wall -Isrc
|
||||
PILRC = pilrc
|
||||
|
||||
# Linux host with the Visor USB cradle attached (see tools/cradle-install.sh).
|
||||
SYNC_HOST ?= roberholtzer@10.3.0.150
|
||||
SYNC_PORT ?= /dev/ttyUSB1
|
||||
# pilot-link built from source into ~/.local (see README). On macOS the
|
||||
# cradle is "usb:"; on Linux with the visor driver it's /dev/ttyUSB1.
|
||||
PILOT_XFER ?= $(firstword $(wildcard $(HOME)/.local/bin/pilot-xfer) pilot-xfer)
|
||||
PORT ?= usb:
|
||||
|
||||
DOCKER_IMAGE = visormesh-palm
|
||||
DOCKER_RUN = docker run --rm --platform linux/amd64 -v "$(CURDIR)":/src -w /src $(DOCKER_IMAGE)
|
||||
@@ -59,8 +60,8 @@ build:
|
||||
endif
|
||||
|
||||
install: all
|
||||
scp -q build/$(APP).prc $(SYNC_HOST):/tmp/$(APP).prc
|
||||
ssh $(SYNC_HOST) "bash -s -- /tmp/$(APP).prc $(SYNC_PORT)" < tools/cradle-install.sh
|
||||
@echo "Press the HotSync button on the Visor cradle..."
|
||||
$(PILOT_XFER) -p $(PORT) -i build/$(APP).prc
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
+9
-15
@@ -32,26 +32,20 @@ Creator ID is `VMsh`. The database has the backup bit set, so HotSync keeps a co
|
||||
|
||||
## Install on the Visor
|
||||
|
||||
The Visor's USB cradle is plugged into a Linux sync host: the Mac mini running Debian 13 at `roberholtzer@10.3.0.150`. `make install` builds the `.prc`, copies it there, and runs `tools/cradle-install.sh`. That script waits for you to press the HotSync button and then runs `pilot-xfer -i`.
|
||||
The Visor's USB cradle plugs straight into the dev Mac. `make install` builds the `.prc` and runs `pilot-xfer -p usb: -i`. Press the HotSync button when it asks.
|
||||
|
||||
pilot-link isn't in Homebrew any more, so build https://github.com/desrod/pilot-link (maintained by pilot-link's original author) into `~/.local`. Its macOS USB backend uses IOKit directly, so no driver is needed:
|
||||
|
||||
```sh
|
||||
make install # default SYNC_HOST is the Mac mini
|
||||
make install SYNC_HOST=user@host SYNC_PORT=usb: # another host, or pilot-link via libusb
|
||||
brew install autoconf automake libtool pkg-config libpng readline popt
|
||||
git clone https://github.com/desrod/pilot-link.git ~/src/pilot-link
|
||||
cd ~/src/pilot-link
|
||||
./autogen.sh --prefix=$HOME/.local && make -j"$(sysctl -n hw.ncpu)" && make install
|
||||
```
|
||||
|
||||
The sync host needs:
|
||||
- the kernel `visor` USB-serial driver. Debian 13 ships it as a module that loads when the Visor connects, and the Visor appears as `/dev/ttyUSB1` during HotSync.
|
||||
- membership in the `dialout` group to open the tty
|
||||
- `pilot-xfer`, from pilot-link. Debian 13 no longer packages it, so build https://github.com/desrod/pilot-link (maintained by pilot-link's original author) into `~/.local`:
|
||||
The Makefile uses `~/.local/bin/pilot-xfer` when it exists. On Linux, use the kernel `visor` driver and `make install PORT=/dev/ttyUSB1`.
|
||||
|
||||
```sh
|
||||
git clone https://github.com/desrod/pilot-link.git ~/src/pilot-link
|
||||
cd ~/src/pilot-link
|
||||
./autogen.sh --prefix=$HOME/.local && make -j"$(nproc)" && make install
|
||||
```
|
||||
- SSH key login from your dev machine
|
||||
|
||||
**Not tested end to end yet.**
|
||||
**Not tested end to end yet.** pilot-link's macOS USB support was tested with a Tungsten E2, not a Visor.
|
||||
|
||||
## Testing without hardware
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Runs on the sync host (piped over ssh by `make install`): installs a .prc onto the
|
||||
# Visor through its USB cradle using pilot-link.
|
||||
#
|
||||
# Usage: cradle-install.sh FILE.prc [PORT]
|
||||
# PORT defaults to /dev/ttyUSB1 (the kernel visor driver's HotSync port).
|
||||
# Use "usb:" instead if pilot-link was built with libusb.
|
||||
set -euo pipefail
|
||||
|
||||
# pilot-link is built from source into ~/.local (not packaged in Debian 13).
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
prc="$1"
|
||||
port="${2:-/dev/ttyUSB1}"
|
||||
|
||||
if ! command -v pilot-xfer >/dev/null; then
|
||||
echo "pilot-xfer not found on $(hostname). Install pilot-link first (see palm-client/README.md)." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Press the HotSync button on the Visor cradle..."
|
||||
|
||||
if [[ "$port" == /dev/* ]]; then
|
||||
# The visor driver only creates the tty once HotSync starts.
|
||||
for _ in $(seq 60); do
|
||||
[[ -e "$port" ]] && break
|
||||
sleep 1
|
||||
done
|
||||
if [[ ! -e "$port" ]]; then
|
||||
echo "Timed out waiting for $port. Is the visor kernel module loaded? (lsmod | grep visor)" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
pilot-xfer -p "$port" -i "$prc"
|
||||
Reference in new issue
Block a user