Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ has been automated using Docker. Steps are as follows:
```shell
git clone https://github.com/Coldcard/firmware.git
cd firmware
git submodule update --init

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also should not be needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked for 2026-03-05T2052-v5.5.0, but commit a4ae6c8 has changed submods-match, which was broken and was simply noop.

Just try it yourself

git clone https://github.com/Coldcard/firmware.git
cd firmware
# DOWNLOAD https://coldcard.com/downloads                                                                                                                                                                                                     
# get a copy of binary into ./releases/2026-03-05T2052-v5.5.0-mk-coldcard.dfu                                                                                                                                                                 
git checkout 2026-07-01T1730-v5.5.1
cd stm32
make -f MK-Makefile repro

And it fails like this:

...
HEAD is now at ae885935 New release: 2026-07-01T1730-v5.5.1
Checking submodule revisions: external/micropython external/ckcc-protocol external/mpy-qr external/libngu misc/gpu/external/stm32c0xx_hal_driver misc/gpu/external/cmsis_device_c0
-3d1dfa858beb58b8dac37d8c66d7aed2909812f2 ../external/ckcc-protocol
-537519a829259622ea6b0334fbafd6cae852852f ../external/libngu
-4107246f8a080807b62c3b4838e71e812ea68b6f ../external/micropython
-11347d83f4eb325b10676a4eb8e17deccfe0df44 ../external/mpy-qr
-7e32bf9d8117ee4c8f6a1d138b814fc24bf4c906 ../misc/gpu/external/cmsis_device_c0
-4c5e3e45a8478a33decb1f45d663f485f89c459b ../misc/gpu/external/stm32c0xx_hal_driver
make: *** [shared.mk:180: submods-match] Error 1

# DOWNLOAD https://coldcard.com/downloads
# get a copy of binary into ./releases/2026-03-05T2052-v5.5.0-mk-coldcard.dfu
git checkout 2026-03-05T2052-v5.5.0
# get a copy of binary into ./releases/2026-07-01T1729-v5.5.1-mk-coldcard.dfu
git checkout 2026-07-01T1730-v5.5.1
cd stm32
make -f MK4-Makefile repro
make -f MK-Makefile repro
```

4. At the end of the process a clear confirmation message is shown, or the differences.
Expand Down
12 changes: 12 additions & 0 deletions cli/signit.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ def show_version(fname):

print('{built}-v{ver}'.format(built=built, ver=ver))

@main.command('sha256sum')
@click.argument('files', nargs=-1, required=True, type=click.Path(exists=True))
def sha256sum(files):
"Print SHA256 checksum of file(s); portable stand-in for sha256sum(1)/shasum."
for fn in files:
h = sha256()
with open(fn, 'rb') as fd:
for chunk in iter(lambda: fd.read(1 << 20), b''):
h.update(chunk)
# match GNU sha256sum output: "<hex> <name>" (two spaces)
print("%s %s" % (h.hexdigest(), fn))

def dfu_parse(fd):
# do just a little parsing of DFU headers, to find start/length of main binary
# - not trying to support anything but what ../stm32/Makefile will generate
Expand Down
1 change: 1 addition & 0 deletions stm32/shared.mk
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ ifeq ($(PUBLISHED_BIN),)
@echo ""
else
@echo Comparing against: $(PUBLISHED_BIN)
@echo SHA256: `$(SIGNIT) sha256sum $(PUBLISHED_BIN)`
test -n "$(PUBLISHED_BIN)" -a -f $(PUBLISHED_BIN)
$(RM) -f check-fw.bin check-bootrom.bin
$(SIGNIT) split $(PUBLISHED_BIN) check-fw.bin check-bootrom.bin
Expand Down