Skip to content

Commit 94a430f

Browse files
tirupatihemanthsaiarcot895
authored andcommitted
Fix trixie signing (sonic-net#52)
* Fix deb13 signing * [Debian 13] Fix Signing
1 parent 1ef4932 commit 94a430f

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

build_debian.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,9 @@ if [[ $SECURE_UPGRADE_MODE == 'dev' || $SECURE_UPGRADE_MODE == "prod" ]]; then
714714
-k ${FILESYSTEM_ROOT}/usr/lib/modules
715715

716716
# verifying vmlinuz file.
717-
sudo ./scripts/secure_boot_signature_verification.sh -e $FILESYSTEM_ROOT/boot/vmlinuz-${LINUX_KERNEL_VERSION}-${CONFIGURED_ARCH} \
718-
-c $SECURE_UPGRADE_SIGNING_CERT
717+
sudo ./scripts/secure_boot_signature_verification.sh -e $FILESYSTEM_ROOT/boot/vmlinuz-${LINUX_KERNEL_VERSION}+deb13-sonic-${CONFIGURED_ARCH} \
718+
-c $SECURE_UPGRADE_SIGNING_CERT \
719+
-k $FILESYSTEM_ROOT
719720
fi
720721
echo "Secure Boot support build stage: END."
721722
fi

scripts/signing_kernel_modules.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ if [ ! -f ${PEM_PRIVATE_KEY} ]; then
5454
exit 1
5555
fi
5656

57-
kbuild_ver_major="$(cut -d '.' -f 1 <<< "$LINUX_KERNEL_VERSION")"."$(cut -d '.' -f 2 <<< "$LINUX_KERNEL_VERSION")"
5857
if [ -z ${LOCAL_SIGN_FILE} ]; then
59-
LOCAL_SIGN_FILE="/usr/lib/linux-kbuild-${kbuild_ver_major}/scripts/sign-file"
58+
LOCAL_SIGN_FILE="/usr/lib/linux-kbuild-${LINUX_KERNEL_VERSION}/scripts/sign-file"
6059
fi
6160

6261
if [ ! -f ${LOCAL_SIGN_FILE} ]; then
@@ -66,7 +65,7 @@ if [ ! -f ${LOCAL_SIGN_FILE} ]; then
6665
fi
6766

6867
if [ -z ${LOCAL_EXTRACT_CERT} ]; then
69-
LOCAL_EXTRACT_CERT="/usr/lib/linux-kbuild-${kbuild_ver_major}/certs/extract-cert"
68+
LOCAL_EXTRACT_CERT="/usr/lib/linux-kbuild-${LINUX_KERNEL_VERSION}/certs/extract-cert"
7069
fi
7170

7271
if [ ! -f ${LOCAL_EXTRACT_CERT} ]; then

scripts/signing_secure_boot_dev.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ done
100100
## vmlinuz signing
101101
######################
102102

103-
CURR_VMLINUZ=$FS_ROOT/boot/vmlinuz-${LINUX_KERNEL_VERSION}-${CONFIGURED_ARCH}
103+
CURR_VMLINUZ=$FS_ROOT/boot/vmlinuz-${LINUX_KERNEL_VERSION}+deb13-sonic-${CONFIGURED_ARCH}
104104

105105
# clean old files
106106
clean_file ${CURR_VMLINUZ}-signed
@@ -116,6 +116,6 @@ mv ${CURR_VMLINUZ}-signed ${CURR_VMLINUZ}
116116
#########################
117117
# Kernel Modules signing
118118
#########################
119-
./scripts/signing_kernel_modules.sh -l $LINUX_KERNEL_VERSION -c ${PEM_CERT} -p ${PEM_PRIV_KEY} -k ${FS_ROOT}/usr/lib/modules
119+
./scripts/signing_kernel_modules.sh -l ${LINUX_KERNEL_VERSION}+deb13 -c ${PEM_CERT} -p ${PEM_PRIV_KEY} -k ${FS_ROOT}
120120

121121
echo "$0 signing & verifying EFI files and Kernel Modules DONE"

0 commit comments

Comments
 (0)