Login
Check-in [32f9484084]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:kconfig: the zephyr dialect closer to Kconfiglib

- source globs as Python's glob does (no ** recursion, no {a,b}, hidden names only for a part starting with .), with a small fnmatch, not Crystal's Dir.glob; - calls to Zephyr's functions checked against kconfigfunctions.py's argument counts, with Kconfiglib's error; Linux's 15-argument limit does not apply there; - values as Kconfiglib calculates them where it differs from Linux's C: imply only while direct dependencies are met; an int/hex user value outside the range falls back on the defaults, and clamped values are written as Python writes them; a choice member set to n leaves the choice's default selected; - Cleave::Kconfig::Functions, an alias of Config::Functions. Specs for each, for optional choices, and for Glint's Kconfiglib values of PRIVILEGED_STACK_SIZE (arm64 2048, x86_64 none). Zephyr v4.4.2's whole tree for qemu_cortex_a53 still reads with no warnings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JaWisxTW4iSdvDGSTvJiiG

Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 32f9484084f97fe2e8f5a24e57df058c9ba9de8050c600feff3895728d570da9
User & Date: claude-49343b 2026-10-26 10:24:19.374
Context
2026-11-02
15:23
beagley-ai: load the modules of devices present at boot one modalias at a time

The seed's busybox modprobe takes only -r and -q (its usage on the board: modprobe -rq MODULE), so the mdev service's xargs modprobe -qa failed and loaded nothing at boot. On the first boot of the Wi-Fi image only cfg80211 and rfkill were loaded, the SDIO card (sdio:c00v0097d4077) stayed without cc33xx_sdio, there was no wlan0, and wpa_supplicant and udhcpc on wlan0 kept failing. busybox's modules.dep.bb does list cc33xx_sdio for sdio:c*v0097d4077*, so loading each alias should bring it in. Not yet boot-tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KL9SS32htCEqaYUV91 check-in: 9a0ea79b24 user: x86-1-cleave tags: trunk

2026-10-26
10:24
kconfig: the zephyr dialect closer to Kconfiglib

- source globs as Python's glob does (no ** recursion, no {a,b}, hidden names only for a part starting with .), with a small fnmatch, not Crystal's Dir.glob; - calls to Zephyr's functions checked against kconfigfunctions.py's argument counts, with Kconfiglib's error; Linux's 15-argument limit does not apply there; - values as Kconfiglib calculates them where it differs from Linux's C: imply only while direct dependencies are met; an int/hex user value outside the range falls back on the defaults, and clamped values are written as Python writes them; a choice member set to n leaves the choice's default selected; - Cleave::Kconfig::Functions, an alias of Config::Functions. Specs for each, for optional choices, and for Glint's Kconfiglib values of PRIVILEGED_STACK_SIZE (arm64 2048, x86_64 none). Zephyr v4.4.2's whole tree for qemu_cortex_a53 still reads with no warnings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JaWisxTW4iSdvDGSTvJiiG check-in: 32f9484084 user: claude-49343b tags: trunk

05:40
kconfig: a zephyr dialect (Kconfiglib), and errors at the line at fault

For Glint, whose task parses Zephyr's Kconfig (its report cleave-zephyr-kconfig-dialect.md). --dialect zephyr / Dialect::Zephyr is Linux's with Kconfiglib's additions, as Zephyr v4.4.2's scripts/kconfig has them: globbing source, rsource, osource, orsource (and gsource, grsource); optional choices; boolean, def_int, def_hex, def_string; configdefault; os.path.expandvars and backslash continuation in strings; a direct dependency of y for an unconditional definition; and kconfigfunctions.py: the arithmetic and string functions, and the dt_* functions answering as Kconfiglib does with no devicetree unless the caller gives answers (Config.load's functions, or --functions FILE). Zephyr v4.4.2's whole tree for qemu_cortex_a53 reads with no warnings, in about 5 s.

For every dialect: a syntax error now names the first line left unreduced inside the blocks, not the block's opening line; and the lexer handed the preprocessor byte offsets it read as character offsets, so after a character of more than one byte a $(...) expanded wrongly, and could loop forever. The BeagleY-AI kernel's syncconfig output is unchanged (.config and all 2,849 include/ files).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JaWisxTW4iSdvDGSTvJiiG check-in: 42316ae74d user: claude-49343b tags: trunk

Changes
Unified Diff Side-by-Side Diff Patch
Changes to docs/cleave-kconfig.md.
Changes to spec/kconfig_spec.cr.
Changes to src/cleave/kconfig/config.cr.
Changes to src/cleave/kconfig/parse.cr.
Changes to src/cleave/kconfig/preprocess.cr.
Changes to src/cleave/kconfig/zephyr.cr.