Port bdinfo and mtdparts, both of which were dead on real captures - #27
Merged
Merged
Conversation
The engine's parsers for these produced nothing across all 31 corpus logs while two of those logs carry a full bdinfo dump, so this port began by fixing what was being ported. Engine side: BootIntel.com@ca2bd80e. Both blocks were command-gated: parsed only once the prompt regex had matched the line where the command was typed. bootintel-20 prints its dump after `Boot-> bdinfo`, which is not U-Boot's default prompt, so the gate never opened and nine fields of board information were read as nothing. They are recognised by their own shape here, the way the environment always has been. bdinfo needs a discriminator against the environment, since `baudrate` and `ethaddr` appear in both. It is the whitespace around the `=`: printenv emits `baudrate=115200`, bdinfo pads to a column. Tested in both directions. Two bugs fixed rather than faithfully reproduced: * `size` and `start` are not board-info keys. bootintel-5 prints an MTD table in a vendor format whose rows are exactly `size = 0x180000`, and `size` in the allowlist recorded that as board info on a real log. * The device pattern never matched U-Boot's actual output. It wanted `#parts` with no space and no bracketed chip id, while U-Boot prints `device nor0 <spi0.0>, # parts = 4`, so partitions parsed and the device they belong to did not. No corpus log has an mtdparts dump, which is why nothing caught it until a fixture was written for the documented format. That fixture is labelled SYNTHETIC in the generator, and it is the only one that is. A fixture nobody has seen in the wild is weaker evidence than one that came off a board, and the next person should know which kind they are reading. Nine fixtures now, eight of them real captures, reproduced byte for byte by both implementations. 364 tests, clippy clean under -D warnings, rustfmt clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Zenofex
added a commit
that referenced
this pull request
Sep 28, 2026
Version bump, lockfile, changelog. No code changes: everything here is on `main` and was reviewed in #27. ## What ships ``` 4 partitions on nor0 u-boot 0x00020000 @ 0x00000000 read-only kernel 0x00100000 @ 0x00020000 rootfs 0x006c0000 @ 0x00120000 art 0x00010000 @ 0x007f0000 read-only ``` `bdinfo` and the `mtdparts` table, with the `mask_flags` read-only marker — the column that says which partitions an operator at that prompt can rewrite. Both parsers were dead code before #27: across all 31 public corpus logs they produced nothing, while two of those logs carry a full bdinfo dump. Both were gated on the prompt regex matching the line where the command was typed, and `Boot-> bdinfo` is not U-Boot's default prompt. ## Why MINOR New output. No flag renamed or removed, no exit-code policy change, no output-format schema broken. ## Verification - `cargo test --workspace`: 369 passed, 0 failed - `clippy --workspace --all-targets -- -D warnings` and `fmt --all --check`: clean - `cargo build --release` then `bootintel --version` reports `bootintel 0.11.0` - Nine fixtures in the shared expectation, eight of them real captures, reproduced byte for byte by both implementations Both version bumps landed first try — fourth release running for `docs/releasing.md` step 1, which exists because the `bootintel-detectors` pin is not derived by cargo. After merge: dispatch `cli-release` for `0.11.0` with `publish_crates`, verify the draft against `SHA256SUMS`, publish and mark latest, then move the tap (step 7) and sync the in-repo reference copy. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Engine side: BootIntel.com@ca2bd80e.
This port started by measuring what it was porting. Across all 31 public corpus logs the engine's
bdinfoandmtdpartsparsers produced nothing — zero board info, zero devices, zero partitions — while two of those logs contain a full bdinfo dump.The read-only column is the operationally interesting one: it says which partitions an operator at that prompt can rewrite.
Why they were dead
Both blocks were parsed only once the prompt regex had matched the line where the command was typed.
bootintel-20prints its dump afterBoot-> bdinfo, andBoot->is not U-Boot's default prompt, so the gate never opened. They are now recognised by their own shape, which is how the environment has always worked and why the environment was never affected.bdinfo needs a discriminator against the environment, since
baudrateandethaddrappear in both. It is the whitespace around the=—printenvemitsbaudrate=115200, bdinfo pads to a column and emitsbaudrate = 115200 bps. Tested in both directions.Two bugs fixed rather than faithfully reproduced
sizeandstartare not board-info keys.bootintel-5prints an MTD table in a vendor format whose rows are exactlysize = 0x180000, andsizein the allowlist recorded that as board info. A live false positive on a real log.#partswith no space and no bracketed chip id, while U-Boot printsdevice nor0 <spi0.0>, # parts = 4. The partition rows parsed; the device they belong to did not.No corpus log contains an mtdparts dump, which is exactly why that second one survived — so the new
mtdparts.logfixture is labelled SYNTHETIC in the generator, and it is the only one that is. A fixture nobody has seen in the wild is weaker evidence than one that came off a board.Parity
The expectation renders bdinfo, the device and the partitions, restricted to
source == "uboot_mtdparts":mtd_partitionsalso carries rows from the kernel-log and vendor-format detectors that this crate does not implement, and rendering all of them would compare two different things and call the difference drift.Nine fixtures now, eight of them real captures, reproduced byte for byte by both implementations.
Verification
cargo test --workspace: 364 passed, 0 failedclippy --workspace --all-targets -- -D warningsandfmt --all --check: cleanci-api-regression, baseline-diffed with no new failures, deployed🤖 Generated with Claude Code