Skip to content

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

Open
mkeeter wants to merge 2 commits into
masterfrom
mkeeter/humility-caboose
Open

Add humility-caboose and humility-cmd-caboose#696
mkeeter wants to merge 2 commits 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 3 times, most recently from eb04008 to 6679400 Compare June 9, 2026 18:19
@mkeeter mkeeter force-pushed the mkeeter/humility-caboose branch from 6679400 to 941a313 Compare June 9, 2026 19:01
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.

1 participant