- Goal: integrated Linux PDA OS for e-ink readers; current dev targets Kindle 3-class hardware (ARM11 ~532 MHz, 256 MB RAM, no GPU) but keep designs hardware-agnostic for future devices.
- Build: buildroot-based, repo is a buildroot external tree, buildroot subdirectory is a git submodule; make changes (config files, new buildroot packages, patches) to the external tree (repo root), not the buildroot checkout.
- Buildroot config workflow: when changing an existing output tree config, use
just config <configuration> ...(a thin wrapper aroundbuildroot/utils/config) instead of editing.configby hand, then refresh it viajust build <configuration> olddefconfig. Directbuildroot/utils/config --file output/<board>/.config ...remains available for unusual cases. - Buildroot build workflow: prefer the project wrapper
just build <configuration> [target ...](for examplejust build kindle3_mainline olddefconfig,just build kindle3_mainline <pkg>, orjust build kindle3_mainline <pkg>-rebuild). Direct targets through the generated Makefile inoutput/<configuration>/remain valid (make -C output/kindle3_mainline, etc.); do not invokemake -C buildroot ...directly for normal board builds because the output-tree Makefile already carries the correctO=andBR2_EXTERNAL=wiring. - Patch files: for the manual workflow, edit a copy directly and generate the patch via
diff -u; always add an email-style header to.patchfiles. For a Paper Resources package workspace, use ordinary Git commits and itsworkspace exportoperation, which deliberately usesgit format-patchand preserves the managed destination notes. - Commits: use descriptive Conventional Commit-style messages; use
git commit -mmultiple times (first for the subject, then a description of what the commit does and why it was needed when relevant). - Resource policy: musl, busybox, shared libs, dropbear, CLI/TUI-first; avoid heavy daemons and GUIs.
- External resources: Paper Resources is this project's custom MCP server and CLI for reference documents, immutable source revisions, provenance, and indexed code navigation. Prefer its MCP tools when available and read the authoritative
paper-resource://helpresource before a substantial hardware or kernel-archaeology investigation; the same guide is stored attools/paper-resources/src/paper_resources/agent-guide.md. Use equivalentjust resource ...commands when MCP is unavailable. - Kernel policy: prefer upstream kernels where hardware support is practical, but preserve vendor-kernel configurations where needed. The Kindle 3 vendor target uses Linux 2.6.26 RT and therefore expects old syscalls/APIs; keep those compatibility changes inside its selected patch layers and keep the syscall ABI intact when patching headers. Mainline targets must not select the 2.6.26 compatibility layer.
- Patch layering: every defconfig explicitly composes
BR2_GLOBAL_PATCH_DIRfrom global, kernel-compatibility, board-common, and board-variant layers as needed. Followpatches/README.md; do not make board- or kernel-specific patches global. - Current state: custom chroot with modern musl, busybox, wpa_supplicant, OpenSSL, curl, etc.; some patches applied. Aim to grow into full flashable OS (kernel + bootloader + userland).
- System glue: prefer built-in tools—busybox init/mdev/uevent helpers; no systemd or heavyweight supervisors.
- UX target: tinkerers/power users wanting distraction-free, keyboarded, pocket e-ink Linux for reading, notes, SSH, small terminal apps; battery life and low write/refresh churn are critical.
- Roadmap highlights: Emacs (possibly fbink GUI backend); session manager for launching, focus/display/keyboard arbitration, background pause, LRU killing; slim networking daemon using wpa_supplicant + netlink + busybox udhcpcd with lease-based radio control; power daemon; e-ink-optimized home screen and file manager.
- Design reminders: e-ink refresh latency is hundreds of ms; flash is slow; memory is tight; minimize radios-on time; be frugal with RAM/CPU and filesystem writes.
- Docs tone: stay generalized to e-ink readers—refer to “Kindle 3-class” only when necessary; avoid implying the project is Kindle-only.
- Configuration is machine-specific and gitignored: inspect it with
just resource envand discover the resolved directory withjust resource path; never assume a developer path. Population remains CLI-only throughjust resource populateandjust resource check. - For hardware-enablement questions, use
search_hardware_referenceswhen code and datasheets may both matter. Cite document manifest IDs with physical pages or sections, and distinguish datasheet guarantees from board wiring and observed behavior. - For source archaeology, use
search_code_tagsfor known language objects,search_source_textfor register names, compatible strings, configuration symbols, log text, and other literals, andoutline_filebefore reading large files. Directrgis still appropriate for a quick search in one worktree. - Compare bounded summaries and definitions before reading diffs: use
compare_revisions,compare_file_outlines, orcompare_symbol_definitions, then request only a selected tag region or one file. Use history, blame, and identical-blob tools when the question is about origin or change over time. - Treat
derived_fromas exact ancestry.reference_baseis approximate and its reason must accompany conclusions. Identical content does not by itself prove authorship, and code presence does not prove runtime use. - Git revisions are authoritative. The Ctags index is selective, so a missing tag is not proof that source is absent; use
describe_file_indexand Git-backed search or line reading when necessary. Public selectors are human-readablerepository,revision, andpath; tag IDs are opaque and database-local.
- Init/boot: stick with BusyBox init; generate rcS ordering at boot from
/etc/paper/services.depviatsort; keep scripts simple (start|stop|restart|status); preferstart-stop-daemon; no runtime supervision. - Networking daemon: orchestrates wpa_supplicant + busybox udhcpc; lease-based radio control so Wi-Fi powers up only when a lease is held; coordinates with session manager for user UI.
netctlor similar command to request, renew, and release leases holding the network online. - Session manager (home/launcher/compositor): owns framebuffer; keeps apps off
/dev/fb0; reads evdev directly and re-emits viauinput; TUIs run on PTYs; GUIs render to shared memory and send damage rects; arbitrates focus, refresh, freeze/thaw, LRU kill; protect it with high OOM priority. - App sandboxes/portal: per-app mount+net namespaces when available; default view is minimal;
paperfmacts as portal for open/save—session manager opens files and passes fds (SCM_RIGHTS) or bind-mounts selected paths into the app namespace; optional full-FS toggle. - File manager/home: custom e-ink-friendly file manager (
paperfm) plus lightweight home UI (not Emacs) integrated with the session manager and portal flow.