The 6x12 console-font script carries its size in its name, like the 6x8 one
scripts/calculinux-console-font.sh is now calculinux-console-font-6x12.sh. Every reference follows: the setup script's hand-off, the 6x8 script's SHARED default and comments, the theme16 test that parses it, the module docstrings, the two manuals, the scripts index and CLAUDE.md. The font files it builds keep their names. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
4c5773191c
commit
49a609fabf
13 files changed
+27
-24
No files matched your search
@@ -17,6 +17,9 @@ allowed to change behaviour, not just add to it.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- **The 6×12 console-font script carries its size in its name**, `calculinux-console-font-6x12.sh`,
|
||||
like its 6×8 sibling always did. Same script, every reference updated.
|
||||
|
||||
- **Two installation manuals, one per handheld.** [`docs/picocalc.md`](docs/picocalc.md)
|
||||
takes a stock ClockworkPi PicoCalc from a shopping list to a Linux handheld running
|
||||
MeshTerm with a LoRa radio soldered inside — the Lyra swap, writing Calculinux, the setup
|
||||
|
||||
@@ -545,7 +545,7 @@ branch on the platform per frame, and never `from meshterm.platforms import PLAT
|
||||
`MapCanvas.to_ansi_lines`) — but the fold is the safety net, not the design.
|
||||
- The glyph contract is `ui/fontset.py` — the installed console font's exact codepoint
|
||||
inventory, device-verified. A character outside it is a test failure, not a tofu box
|
||||
found on-device. The font itself is built by `scripts/calculinux-console-font.sh`;
|
||||
found on-device. The font itself is built by `scripts/calculinux-console-font-6x12.sh`;
|
||||
the two files move in the same commit.
|
||||
- The 16-slot palette is `theme._VT_SLOTS` (programmed via `/etc/vtrgb`; same script).
|
||||
`MESH_THEME_16` speaks `color(0..15)` only; backgrounds stop at slot 7. Both themes
|
||||
|
||||
+3
-3
@@ -79,7 +79,7 @@ preview the handheld layout on a desktop, alongside `meshterm specimen` for the
|
||||
visual language on one card.
|
||||
|
||||
The console font is the part that needs building, and it is built **on the device** by
|
||||
[`calculinux-console-font.sh`](../scripts/calculinux-console-font.sh) rather than shipped as
|
||||
[`calculinux-console-font-6x12.sh`](../scripts/calculinux-console-font-6x12.sh) rather than shipped as
|
||||
a binary. Its only inputs are the stock Terminus console font the Calculinux image already
|
||||
carries and `python3`; every added glyph is generated geometry in the script itself. So
|
||||
nothing binary lives in the repo, and the base font is whatever your image installed rather
|
||||
@@ -187,7 +187,7 @@ the part worth reading.
|
||||
| **6. Clone** | The checkout at `/home/$DEPLOY_USER/MeshTerm`, pulled `--ff-only` if it is already there. See [Before you run it](#before-you-run-it). |
|
||||
| **7. venv and install** | `python3 -m venv ~/MeshTerm/.venv`, then `pip install -e .` with **`TMPDIR=$HOME/tmp`** — `/tmp` is a small RAM tmpfs and pip's C builds hit ENOSPC in it. |
|
||||
| **8. Login PATH** | Appends the venv's `bin` to the deploy user's `~/.profile` once, so `meshterm` is just a word. |
|
||||
| **9. Console font** | Hands off to `calculinux-console-font.sh` if it sits alongside, and otherwise tells you to run it yourself. |
|
||||
| **9. Console font** | Hands off to `calculinux-console-font-6x12.sh` if it sits alongside, and otherwise tells you to run it yourself. |
|
||||
|
||||
> **A Lyra with no Wi-Fi dongle attached takes about six minutes to boot past the kick**,
|
||||
> which waits a minute for the interface and then burns thirty rounds before exiting 0 — and
|
||||
@@ -200,7 +200,7 @@ The font script stands alone, which is what you want after a MeshTerm update tha
|
||||
glyph:
|
||||
|
||||
```bash
|
||||
sh calculinux-console-font.sh
|
||||
sh calculinux-console-font-6x12.sh
|
||||
```
|
||||
|
||||
It builds both fonts — the 6×8 one by handing off to
|
||||
|
||||
+2
-2
@@ -825,7 +825,7 @@ If an update adds new glyphs to the console font, rebuild it on its own afterwar
|
||||
|
||||
```bash
|
||||
# on the PicoCalc, as root
|
||||
sh calculinux-console-font.sh
|
||||
sh calculinux-console-font-6x12.sh
|
||||
```
|
||||
|
||||
**Changing Wi-Fi.** Run `uwific` as root, as in [Step 7](#step-7--join-wi-fi).
|
||||
@@ -844,7 +844,7 @@ You don't need to do anything to keep the shell's own font intact.
|
||||
| Wi-Fi never comes up | Is the dongle one of the tested chipsets (RTL8192CU / R8712U / RTL8188EU)? Remember the Lyra's USB port is **3.3 V** — a 5 V dongle won't work. |
|
||||
| `pip install` fails with `ENOSPC` | `/tmp` is a small RAM disk. `calculinux-setup.sh` already sets `TMPDIR=$HOME/tmp` for its own install; if you're running `pip` by hand, do the same. |
|
||||
| `meshterm: command not found` after setup | Log out and back in — the PATH line is added to `~/.profile`, which only takes effect on a fresh login shell. |
|
||||
| Tofu boxes instead of braille charts or node glyphs | The console font script hasn't run, or didn't persist. Re-run `sh calculinux-console-font.sh`, and check `/etc/vconsole.conf` has a `FONT=` line. |
|
||||
| Tofu boxes instead of braille charts or node glyphs | The console font script hasn't run, or didn't persist. Re-run `sh calculinux-console-font-6x12.sh`, and check `/etc/vconsole.conf` has a `FONT=` line. |
|
||||
| `meshterm` can't open `/dev/ttyS1` | Is the `meshterm` user in `dialout` (`groups`)? Group changes need a fresh login to take effect. |
|
||||
| Port opens but the radio never answers | Re-flash with the **`_serial`** environment, not `_ble` or `_usb` — only it defines `SERIAL_RX`/`SERIAL_TX`. The XIAO's USB serial should be silent once it's running the radio firmware; that's expected, not a fault. |
|
||||
| Still silent with wiring confirmed | Confirm the firmware actually carries the I²C remap (`PIN_WIRE_SCL=16`, `PIN_WIRE_SDA=17`) — a build without the patch's second hunk looks identical until you check this. |
|
||||
|
||||
@@ -178,7 +178,7 @@ _CONSOLE_SETUP_CHOICES: dict[str, str] = {
|
||||
"off": "Leave it alone",
|
||||
}
|
||||
|
||||
#: The two console fonts ``scripts/calculinux-console-font.sh`` (and its 6x8 companion)
|
||||
#: The two console fonts ``scripts/calculinux-console-font-6x12.sh`` (and its 6x8 companion)
|
||||
#: build for the PicoCalc's framebuffer panel. Each is named by its cell and by the screen
|
||||
#: that cell buys, because choosing a font here is choosing how much fits — not a bitmap.
|
||||
#: Plain ASCII ``x`` and not ``×``: the multiplication sign is not one of the 512 glyphs
|
||||
|
||||
@@ -39,7 +39,7 @@ from ..core.config import default_config_dir
|
||||
from ..persistence.logging import get_logger
|
||||
from ..platforms import get_platform
|
||||
|
||||
#: Where ``scripts/calculinux-console-font.sh`` and its 6x8 companion install the fonts.
|
||||
#: Where ``scripts/calculinux-console-font-6x12.sh`` and its 6x8 companion install the fonts.
|
||||
FONT_DIR = Path("/usr/share/consolefonts")
|
||||
|
||||
#: One preference value -> the file the build script writes for it. This map lives beside
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"""The PicoCalc console font's codepoint inventory — the glyph contract.
|
||||
|
||||
The PicoCalc panel draws through the kernel console with one 512-glyph PSF font
|
||||
(``meshterm.psf.gz``, built by ``scripts/calculinux-console-font.sh``): the stock
|
||||
(``meshterm.psf.gz``, built by ``scripts/calculinux-console-font-6x12.sh``): the stock
|
||||
Terminus 6×12 base (a Cyrillic-coverage table — note there are **no accented Latin
|
||||
letters**), the full braille block, MeshTerm's own marks drawn into donor slots, and a
|
||||
few aliases. A character outside this set renders as a blank on the panel, so *nothing
|
||||
|
||||
@@ -240,7 +240,7 @@ _VT_SLOTS: tuple[tuple[int, str, str], ...] = (
|
||||
#: The custom 16-slot remap P3 originally shipped (tailwind-family RGBs programmed via
|
||||
#: ``setvtrgb``) — **archived, not installed**: JP chose the standard palette but asked
|
||||
#: to keep this in case he changes his mind. Reinstall with
|
||||
#: ``MESHTERM_CUSTOM_PALETTE=1 sh scripts/calculinux-console-font.sh`` (whose opt-in
|
||||
#: ``MESHTERM_CUSTOM_PALETTE=1 sh scripts/calculinux-console-font-6x12.sh`` (whose opt-in
|
||||
#: block a test keeps byte-identical to :func:`vtrgb_lines`); MESH_THEME_16 would then
|
||||
#: want re-tuning against it (see git history at c6485c6 for the matching theme).
|
||||
_VT_SLOTS_CUSTOM: tuple[tuple[int, str, str], ...] = (
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ it is, and what has only ever been proven on one bench. The table below is the i
|
||||
| File | Runs on | What it does |
|
||||
| --- | --- | --- |
|
||||
| [`calculinux-setup.sh`](calculinux-setup.sh) | the Lyra (root) | One-time bring-up: python packages, the Wi-Fi boot-scan kick, a boot clock sync (there is no RTC), the deploy user, the checkout, the venv and `pip install -e .`, the login PATH, and the console font. Idempotent. |
|
||||
| [`calculinux-console-font.sh`](calculinux-console-font.sh) | the Lyra (root) | Just the console font: builds, installs and persists the 512-glyph **meshterm** PSF (braille, node marks, rounded frame corners, the list cursor) and restores the stock 16-slot palette. Calls the 6×8 build below when it sits alongside. Run it alone after a MeshTerm update. |
|
||||
| [`calculinux-console-font-6x12.sh`](calculinux-console-font-6x12.sh) | the Lyra (root) | Just the console font: builds, installs and persists the 512-glyph **meshterm** PSF (braille, node marks, rounded frame corners, the list cursor) and restores the stock 16-slot palette. Calls the 6×8 build below when it sits alongside. Run it alone after a MeshTerm update. |
|
||||
| [`calculinux-console-font-6x8.sh`](calculinux-console-font-6x8.sh) | the Lyra (root) | The shorter-cell companion font, **meshterm8** (6×8 → 53×40), for anyone who wants more rows than the 6×12 default gives. Its base bitmap is the kernel's `font_6x8`, so this one file and the PSF it builds are **GPL-2.0-only** ([`LICENSE.GPL-2.0`](LICENSE.GPL-2.0)); it reads the donor/alias/keeper tables out of the script above rather than keeping a second copy. Pick between the two fonts from MeshTerm's Preferences page. |
|
||||
| [`calculinux-wifi-set.sh`](calculinux-wifi-set.sh) | the Lyra (sudo) | Interactive Wi-Fi join: prompts for an SSID and passphrase, writes iwd's credentials, connects now. This is how a network *becomes* known to the boot kick. |
|
||||
| [`calculinux-radio-bridge.sh`](calculinux-radio-bridge.sh) | the Lyra (root) | **Unfinished, unsupported.** An early UART-to-TCP pump, superseded by `xiao-radio/lyra-setup.sh`; its header describes routing it does not contain. See the manual before reading it. |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# calculinux-console-font.sh -- build, install, and persist the "meshterm" console fonts
|
||||
# calculinux-console-font-6x12.sh -- build, install, and persist the "meshterm" console fonts
|
||||
# and the 16-slot palette.
|
||||
#
|
||||
# MeshTerm runs on a Luckfox Lyra inside a ClockworkPi PicoCalc under Calculinux, drawing
|
||||
@@ -42,7 +42,7 @@
|
||||
# Everything else is pure geometry, generated on-device; only the stock Terminus font and
|
||||
# python3 are required. Run as root on the Lyra (serial console is fine):
|
||||
#
|
||||
# sh calculinux-console-font.sh
|
||||
# sh calculinux-console-font-6x12.sh
|
||||
#
|
||||
# Idempotent -- safe to re-run after a MeshTerm update or a font tweak. Also manages the
|
||||
# 16-slot palette: a default run restores the stock VT palette (theme._VT_SLOTS) and
|
||||
@@ -294,7 +294,7 @@ fi
|
||||
# (theme._VT_SLOTS). The custom tailwind-family remap originally shipped is ARCHIVED,
|
||||
# one environment variable away for anyone who wants it back:
|
||||
#
|
||||
# MESHTERM_CUSTOM_PALETTE=1 sh calculinux-console-font.sh
|
||||
# MESHTERM_CUSTOM_PALETTE=1 sh calculinux-console-font-6x12.sh
|
||||
#
|
||||
# The opt-in block's values match theme.vtrgb_lines() / theme._VT_SLOTS_CUSTOM exactly (a
|
||||
# test keeps them in sync). A DEFAULT run removes any previously-installed remap and
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# WHERE THE SHARED PARTS LIVE. The donor, alias and keeper tables, the braille generator
|
||||
# and the PSF2 writer are NOT duplicated here. They are read out of
|
||||
# calculinux-console-font.sh (Apache-2.0), between its "shared generator (BEGIN)" and
|
||||
# calculinux-console-font-6x12.sh (Apache-2.0), between its "shared generator (BEGIN)" and
|
||||
# "(END)" marker lines, and exec'd -- so the two fonts can never drift, and a repo test
|
||||
# that parses those tables has exactly one file to parse. That file must sit beside this
|
||||
# one; point SHARED at it if it does not. The shared generator is additionally offered
|
||||
@@ -28,7 +28,7 @@
|
||||
# named in Cyrillic draws as tofu in this font. The keeper list drops the Cyrillic canary
|
||||
# accordingly, and only pi is checked.
|
||||
#
|
||||
# Run as root on the Lyra, either on its own or through calculinux-console-font.sh, which
|
||||
# Run as root on the Lyra, either on its own or through calculinux-console-font-6x12.sh, which
|
||||
# calls it:
|
||||
#
|
||||
# sh calculinux-console-font-6x8.sh
|
||||
@@ -43,7 +43,7 @@ FONT_NAME=meshterm
|
||||
CONSOLEFONTS=/usr/share/consolefonts
|
||||
OUT8="$CONSOLEFONTS/${FONT_NAME}8.psf.gz"
|
||||
HERE=$(dirname "$0")
|
||||
SHARED=${SHARED:-"$HERE/calculinux-console-font.sh"} # Apache-2.0; holds the shared tables
|
||||
SHARED=${SHARED:-"$HERE/calculinux-console-font-6x12.sh"} # Apache-2.0; holds the shared tables
|
||||
|
||||
# --- preflight: fail early with a plain reason, never half-apply -----------------------
|
||||
[ "$(id -u)" = 0 ] || { echo "error: run as root (writes $CONSOLEFONTS)" >&2; exit 1; }
|
||||
@@ -57,7 +57,7 @@ import os
|
||||
import re
|
||||
|
||||
# --- the shared generator, borrowed rather than copied ---------------------------------
|
||||
# Everything between the two marker lines in calculinux-console-font.sh: the braille
|
||||
# Everything between the two marker lines in calculinux-console-font-6x12.sh: the braille
|
||||
# generator, art(), DONORS, ALIASES, KEEP_COMMON, BANDS8 and build(). One copy of those
|
||||
# tables, in the Apache-2.0 file, both fonts built from it.
|
||||
SHARED = os.environ["SHARED"]
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
# 7. venv + install A venv + `pip install -e .`. pip's C builds hit ENOSPC because /tmp
|
||||
# is a tiny RAM tmpfs, so TMPDIR is redirected to $HOME/tmp on /data.
|
||||
# 8. PATH Put the venv's `meshterm` on that user's login PATH via ~/.profile.
|
||||
# 9. console font Hand off to calculinux-console-font.sh (braille + node glyphs +
|
||||
# 9. console font Hand off to calculinux-console-font-6x12.sh (braille + node glyphs +
|
||||
# rounded frame corners + the list cursor the bare console can't draw).
|
||||
#
|
||||
# Two prerequisites this script cannot safely embed and will check for / guide you through:
|
||||
@@ -348,10 +348,10 @@ fi
|
||||
|
||||
# --- 8. console font -------------------------------------------------------------------
|
||||
log "9/9 console font"
|
||||
if [ -f "$SCRIPT_DIR/calculinux-console-font.sh" ]; then
|
||||
sh "$SCRIPT_DIR/calculinux-console-font.sh"
|
||||
if [ -f "$SCRIPT_DIR/calculinux-console-font-6x12.sh" ]; then
|
||||
sh "$SCRIPT_DIR/calculinux-console-font-6x12.sh"
|
||||
else
|
||||
info "calculinux-console-font.sh not alongside this script -- skipping (run it separately)"
|
||||
info "calculinux-console-font-6x12.sh not alongside this script -- skipping (run it separately)"
|
||||
fi
|
||||
|
||||
# --- done ------------------------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@ from meshterm.ui import theme
|
||||
from meshterm.ui.fontset import FONT_CODEPOINTS
|
||||
from meshterm.ui.theme import MESH_THEME, MESH_THEME_16, fold_text, glyph, name_style
|
||||
|
||||
_FONT_SCRIPT = Path(__file__).resolve().parent.parent / "scripts" / "calculinux-console-font.sh"
|
||||
_FONT_SCRIPT = Path(__file__).resolve().parent.parent / "scripts" / "calculinux-console-font-6x12.sh"
|
||||
|
||||
|
||||
# -- the two themes -------------------------------------------------------------------
|
||||
@@ -133,7 +133,7 @@ def test_deploy_script_carries_the_archived_custom_palette() -> None:
|
||||
"""
|
||||
script = _FONT_SCRIPT.read_text(encoding="utf-8")
|
||||
assert "MESHTERM_CUSTOM_PALETTE" in script, "the opt-in gate vanished"
|
||||
assert theme.vtrgb_lines() in script, "scripts/calculinux-console-font.sh vtrgb drifted"
|
||||
assert theme.vtrgb_lines() in script, "scripts/calculinux-console-font-6x12.sh vtrgb drifted"
|
||||
for index, (_, _, hex_) in enumerate(theme._VT_SLOTS_CUSTOM):
|
||||
sequence = f"\\033]P{index:x}{hex_.lstrip('#').lower()}"
|
||||
assert sequence in script, f"OSC fallback missing slot {index}: {sequence}"
|
||||
|
||||
Reference in new issue
Block a user