oxidecomputer/humility

would like an idempotent humility flash with verification

jclulow opened this issue · 0 comments

Right now, the humility flash --verify command does almost everything we want: it checks not merely the image ID but also the ROM contents to make sure they match the image. Somewhat regrettably it then exits with a non-zero status code if the image is actually correct, informing the user that they should rerun with --force if they want to rewrite the ROM even though it ostensibly matches.

I think this behaviour is useful in the cases where you expect that the ROM is not correct and want to know if your expectations are not met. However, in manufacturing we have to do basically this every time:

if ! humility flash --check; then
    humility flash --verify
fi

It would be really helpful if there was a humility flash --verify --idempotent (or whatever) that does what flash --verify does today, but which still exits 0 if it did not have to do any work.