Claude Code keeps per-project memory at <home>/.claude/projects/<key>/,
where <key> is the project's absolute path with every separator and the
drive colon turned into a dash. That makes it both rename-fragile and
machine-specific, and this project has hit each of those once:
- D:\DEV\Schunix -> D:\DEV\SchOS changed the key, and 43 memories were
invisible until moved across by hand.
- Development happens from Windows and from Linux, and each looks in a
different place for the same checkout.
Committing .claude/memory/ fixes both -- git carries it across renames
and between hosts -- and `import` puts it wherever the local machine
expects. .claude/settings.local.json stays ignored: those are per-machine
permissions.
The colon maps to a dash rather than being dropped. Deleting it gives
D-DEV-SchOS, which matches nothing and silently finds zero memories; that
was the first attempt. On Git Bash the key comes from `cygpath -w`,
because Claude Code is a Windows program and sees D:\DEV\SchOS, not
/d/DEV/SchOS.
45 lines
2.3 KiB
Markdown
45 lines
2.3 KiB
Markdown
---
|
|
name: schunix-usb-ids
|
|
description: "usb.ids ships as /usr/share/usb.ids, cached in dist/ and refreshed with `make usb-ids` — deliberately not on every build."
|
|
metadata:
|
|
node_type: memory
|
|
type: project
|
|
originSessionId: 9d8a2aef-bcf0-47a0-96c6-f706efab4a95
|
|
modified: 2026-08-08T22:10:41.961Z
|
|
---
|
|
|
|
Added 2026-08-09 at Nexoniarz's request. `dist/usb.ids` →
|
|
`sysroot/usr/share/usb.ids`, 730 KB, 25,673 lines, version 2026.06.26.
|
|
|
|
**Licence: dual GPL-2.0-or-later OR 3-clause BSD.** The file's own header says
|
|
nothing; the statement is on <http://www.linux-usb.org/usb-ids.html>: "under the
|
|
terms of either the GNU General Public License (version 2 or later) or of the
|
|
3-clause BSD License." Schunix takes the **BSD** option — the GPL one could not
|
|
be exercised, since Apache-2.0 and GPL-2.0-only cannot be combined. `NOTICE`
|
|
carries the attribution and says which option was taken.
|
|
|
|
## Two places I deliberately did not do what was asked
|
|
|
|
**"Update every compilation."** It is cached in `dist/` and refreshed only by
|
|
`make usb-ids`. Fetching per build would break offline builds, make the same
|
|
source produce different images on different days, and put a third-party web
|
|
server on the critical path of `make` — and `dist/` exists precisely so a
|
|
rebuild never needs the network (stated in `docs/layout.md`). The file is
|
|
committed and carries its own version and date, so what shipped is always
|
|
knowable. The update target validates the download (`grep -q "^# Version:"`)
|
|
before replacing the cached copy, so a truncated file or an error page cannot
|
|
silently destroy a good database.
|
|
|
|
**It is not in the kernel.** 730 KB against a ~770 KB kernel. Linux does not do
|
|
this either — the kernel reports vendor:product and `lsusb` resolves names from
|
|
`/usr/share/hwdata/usb.ids` in userspace. Same split here: `/proc/devices` and
|
|
the USB core report IDs; a future `lsusb` reads the database.
|
|
|
|
Also added to `RAMDISK_EXCLUDE` — 730 KB is 12% of the 6 MB ramdisk root and
|
|
nothing needs it to boot. Verified: `mkfs: excluding usr/share/usb.ids`, ramroot
|
|
metadata unchanged at 345 blocks. This is the second real use of that mechanism
|
|
(see [[schunix-ramdisk-root-sizing]]).
|
|
|
|
**Still to do:** nothing reads it yet. An `lsusb` in `cmd/` that walks the USB
|
|
core's device list and looks names up is the natural next step, and would make
|
|
`/proc/devices` far more legible than `1234:1111`.
|