diff options
author | Christian Breunig <christian@breunig.cc> | 2024-07-25 15:31:26 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-07-25 15:31:26 +0200 |
commit | 0ce12e4c1a9d3aeffb4d59f262667d1f9e4d3de7 (patch) | |
tree | 1c526e499b781ab430034647ca42c5a4d4535806 | |
parent | 9cbc700aee4f05aab5f2c2d223c3af173ebeb4db (diff) | |
download | vyos-build-0ce12e4c1a9d3aeffb4d59f262667d1f9e4d3de7.tar.gz vyos-build-0ce12e4c1a9d3aeffb4d59f262667d1f9e4d3de7.zip |
Kernel: T6231: verify mellanox driver source by SHA1 hash
-rwxr-xr-x | packages/linux-kernel/build-mellanox-ofed.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/linux-kernel/build-mellanox-ofed.sh b/packages/linux-kernel/build-mellanox-ofed.sh index 0ddf084e..7418af61 100755 --- a/packages/linux-kernel/build-mellanox-ofed.sh +++ b/packages/linux-kernel/build-mellanox-ofed.sh @@ -21,6 +21,8 @@ url="https://www.mellanox.com/downloads/ofed/MLNX_OFED-24.04-0.6.6.0/MLNX_OFED_S cd ${CWD} DRIVER_FILE=$(basename ${url} | sed -e s/tar_0/tar/) +DRIVER_SHA1="003c1c022f9f6558d45750eacc0a64d06cf9cd42" + DRIVER_DIR="${DRIVER_FILE%.tgz}" DRIVER_NAME="ofed" DRIVER_PRFX="MLNX_OFED" @@ -42,6 +44,13 @@ if [ "$?" -ne "0" ]; then exit 1 fi +# Verify integrity +echo "${DRIVER_SHA1} ${DRIVER_FILE}" | sha1sum -c - +if [[ $? != 0 ]]; then + echo SHA1 checksum missmatch + exit 1 +fi + # Unpack archive if [ -d ${DRIVER_DIR} ]; then rm -rf ${DRIVER_DIR} |