From 3a707e29d60d524e46fb1c3cae8cac45b9dc7a96 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 16 Jul 2026 21:49:31 +0200 Subject: [PATCH] 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. --- pkgs/by-name/gl/glasgow/package.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/gl/glasgow/package.nix b/pkgs/by-name/gl/glasgow/package.nix index ef05b07e02b4..c193c2029b45 100644 --- a/pkgs/by-name/gl/glasgow/package.nix +++ b/pkgs/by-name/gl/glasgow/package.nix @@ -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}"