glasgow: print error message in case of firmware mismatch

If the firmware doesn't reproduce, this currently fails without any
error message.

Instead, print a proper error, and a diff with the desired firmware
image.
This commit is contained in:
Florian Klink
2026-07-16 23:43:37 +02:00
parent 3771f01f27
commit 3a707e29d6
+5 -1
View File
@@ -91,7 +91,11 @@ pythonPackages.buildPythonApplication rec {
firmware/glasgow.ihex firmware/glasgow.ihex
# Ensure the compiled firmware is exactly the same as the one shipped in the repo.
cmp -s firmware/glasgow.ihex software/glasgow/hardware/firmware.ihex
if ! cmp -s firmware/glasgow.ihex software/glasgow/hardware/firmware.ihex; then
echo >&2 "Firmware doesn't reproduce!"
diff -u software/glasgow/hardware/firmware.ihex firmware/glasgow.ihex
exit 1
fi
cd software
export PDM_BUILD_SCM_VERSION="${pdmVersion}"