Skip to content

Add humility-caboose and humility-cmd-caboose#696

Open
mkeeter wants to merge 1 commit into
masterfrom
mkeeter/humility-caboose
Open

Add humility-caboose and humility-cmd-caboose#696
mkeeter wants to merge 1 commit into
masterfrom
mkeeter/humility-caboose

Conversation

@mkeeter

@mkeeter mkeeter commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

It is helpful to read the caboose without knowing anything about the image (e.g. no archive). Fortunately, that is part of the caboose's design! This PR adds a humility caboose read subcommand which prints a raw caboose.

It is a library-first PR:

  • humility-caboose is a library for pulling the caboose from an image, with strongly typed errors
  • humility-cmd-caboose is a wrapper which prints it out (and is linked into the main humility binary)
  • The library crate is fully documented (with #![warn(missing_docs)])
$ humility caboose read
humility: attached via CMSIS-DAP
humility: found flash base at 0x8000000 (pc at 0x804e574)
humility: found image header at 0x8000298
humility: found caboose at 0x8088000..0x8088100
[
    ("GITC", [
        "e0297c8596c90552f6258841d96212b9061277ab-dirty",
    ]),
    ("BORD", [
        "grapefruit-a",
    ]),
    ("NAME", [
        "grapefruit-a",
    ]),
]

There's a bit of copy-pasta from hubtools, but that implementation expects to operate on a HubrisArchive in memory (rather than a raw byte array). I think the copy-pasta is minimal / stable enough to not be a big deal, but can revisit if folks feel strongly about it.

@mkeeter mkeeter requested review from jamesmunns and labbott June 8, 2026 17:26
@mkeeter mkeeter force-pushed the mkeeter/humility-caboose branch 5 times, most recently from 941a313 to f6fc329 Compare June 10, 2026 17:36
@mkeeter mkeeter requested a review from Copilot June 10, 2026 19:37

This comment was marked as resolved.

@mkeeter mkeeter force-pushed the mkeeter/humility-caboose branch from f6fc329 to eed2667 Compare June 10, 2026 19:59
@mkeeter mkeeter force-pushed the mkeeter/humility-caboose branch from eed2667 to 6f811a9 Compare June 10, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants