[PATCH 1/1] snapcraft.yaml: Add check for nvidia firmware files
Aaron Jauregui
aaron.jauregui at canonical.com
Mon Jan 13 23:18:46 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2089509
Prevent builds with missing nvidia firmware files that may be
trimmed due to version mismatches from succeeding.
Signed-off-by: Aaron Jauregui <aaron.jauregui at canonical.com>
---
snapcraft.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 9e5ec26..c57dd33 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -96,4 +96,9 @@ parts:
# Check that only one nvidia series got shipped
if [ "$SNAPCRAFT_TARGET_ARCH" != "armhf" ]; then
[ $(ls "$SNAPCRAFT_STAGE"/modules/*/kernel/nvidia-*/bits/SHA256SUMS | wc -l) -eq 1 ]
+ # Make sure firmware blobs are present
+ modpath="$(find $SNAPCRAFT_STAGE/modules/*/kernel/nvidia-* -name nv.o)"
+ while IFS= read -r fw ; do
+ test -e "$SNAPCRAFT_STAGE/firmware/$fw"
+ done < <(strings -d "$modpath" | sed -n 's/^firmware=//p')
fi
--
2.43.0
More information about the kernel-team
mailing list