aboutsummaryrefslogtreecommitdiffstats
path: root/common.sh
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2021-12-13 15:25:51 -0600
committerBrijesh Singh <brijesh.singh@amd.com>2021-12-13 15:25:51 -0600
commit00ee36df4cfa13b85136d91d7778c42bbe49167e (patch)
tree70ceec64cf7d856f78e179604b37b64a519af00e /common.sh
parentf23f201ecb91420c2410b2397b3d844e9315982c (diff)
downloadcachepc-amdsev-00ee36df4cfa13b85136d91d7778c42bbe49167e.tar.gz
cachepc-amdsev-00ee36df4cfa13b85136d91d7778c42bbe49167e.zip
update to use newer commits
Diffstat (limited to 'common.sh')
-rwxr-xr-xcommon.sh40
1 files changed, 22 insertions, 18 deletions
diff --git a/common.sh b/common.sh
index 0ad240f..93aed13 100755
--- a/common.sh
+++ b/common.sh
@@ -12,33 +12,36 @@ run_cmd()
build_kernel()
{
- [ -d linux ] || {
- run_cmd git clone --single-branch -b ${KERNEL_BRANCH} ${KERNEL_GIT_URL} linux
- }
-
- [ -d linux-patches ] && {
- pushd linux >/dev/null
- run_cmd git checkout .
- popd >/dev/null
+ set -x
+ mkdir -p linux
+ pushd linux >/dev/null
- for P in linux-patches/*.patch; do
- run_cmd patch -p1 -d linux < $P
- done
- }
+ for V in guest host; do
+ [ -d ${V} ] || {
+ if [ "${1}" = "guest" ]; then
+ BRANCH="${KERNEL_GUEST_BRANCH}"
+ else
+ BRANCH="${KERNEL_HOST_BRANCH}"
+ fi
+ run_cmd git clone --single-branch -b ${BRANCH} ${KERNEL_GIT_URL} ${V}
+ }
- MAKE="make -C linux -j $(getconf _NPROCESSORS_ONLN) LOCALVERSION="
+ VER="-snp-${V}"
- for V in snp; do
- VER="-sev-es-$V"
+ MAKE="make -C ${V} -j $(getconf _NPROCESSORS_ONLN) LOCALVERSION="
run_cmd $MAKE distclean
- pushd linux >/dev/null
+ pushd ${V} >/dev/null
run_cmd "cp /boot/config-$(uname -r) .config"
run_cmd ./scripts/config --set-str LOCALVERSION "$VER"
run_cmd ./scripts/config --disable LOCALVERSION_AUTO
run_cmd ./scripts/config --disable CONFIG_DEBUG_INFO
+ run_cmd ./scripts/config --enable CONFIG_AMD_MEM_ENCRYPT
+ run_cmd ./scripts/config --enable AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT
+ run_cmd ./scripts/config --enable CONFIG_KVM_AMD_SEV
+ run_cmd ./scripts/config --module CRYPTO_DEV_CCP_DD
popd >/dev/null
yes "" | $MAKE olddefconfig
@@ -50,10 +53,11 @@ build_kernel()
run_cmd $MAKE bindeb-pkg
else
run_cmd $MAKE "RPMOPTS='--define \"_rpmdir .\"'" binrpm-pkg
-
- run_cmd mv linux/x86_64/*.rpm .
+ run_cmd mv ${1}/x86_64/*.rpm .
fi
done
+
+ popd
}
build_install_ovmf()