Skip to content

Commit

Permalink
Merge pull request #68 from dongx1x/fix-build-version
Browse files Browse the repository at this point in the history
tools: fix build version error and rtmr parameter error
  • Loading branch information
ruomengh authored May 9, 2024
2 parents b097878 + 3cbcd79 commit 641645f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions tools/build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ build_ubuntu_kernel() {
else
CHANGELOG="debian.master/changelog"
fi
LATEST_VERSION=$(sed -n '1 s/linux.*(\(.*\)) noble.*$/\1/p' ${CHANGELOG})
CCNP_VERSION=${LATEST_VERSION}${CCNP_VERSION_SUFFIX}

# For generic kernel, the default version in changelog is linux (6.8.0-31.31),
# we want to change to ccnp version linux (6.8.0-31.31+ccnp1)
# For intel kernel, the default version in changelog is linux-intel (6.8.0-1001.7)
# we want to change it to linux-intel (6.8.0-1001.7+ccnp1)
LATEST_VERSION=$(sed -n '1 s/\(linux.*(.*\)) noble.*$/\1/p' ${CHANGELOG})
CCNP_VERSION="${LATEST_VERSION}${CCNP_VERSION_SUFFIX})"
sed "s/CCNP_VERSION/${CCNP_VERSION}/" \
"${KERNEL_DIR}/ubuntu/changelog" > "${KERNEL_DIR}/ubuntu/changelog.tmp"
sed -i "0 r ${KERNEL_DIR}/ubuntu/changelog.tmp" debian/changelog ${CHANGELOG}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ index 000000000000..3ed78ad754dd
+ memcpy(data, digests[DEFAULT_SHA384_IDX].digest, sizeof(digests[DEFAULT_SHA384_IDX].digest));
+
+ /* Extend RTMR registers using "TDG.MR.RTMR.EXTEND" TDCALL */
+ rc = tdx_mcall_rtmr_extend(data, (u8)rtmr_idx);
+ rc = tdx_mcall_rtmr_extend((u8)rtmr_idx, data);
+ kfree(data);
+
+ return rc;
Expand Down
2 changes: 1 addition & 1 deletion tools/build/kernel/ubuntu/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
linux (CCNP_VERSION) noble; urgency=medium
CCNP_VERSION noble; urgency=medium

* [CCNP] Add CCNP kernel patches

Expand Down

0 comments on commit 641645f

Please sign in to comment.