From 00ee36df4cfa13b85136d91d7778c42bbe49167e Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Mon, 13 Dec 2021 15:25:51 -0600 Subject: update to use newer commits --- build.sh | 6 ++++-- common.sh | 40 ++++++++++++++++++++++------------------ install.sh | 4 ++-- stable-commits | 7 ++++--- 4 files changed, 32 insertions(+), 25 deletions(-) diff --git a/build.sh b/build.sh index fab89f4..c0d40d3 100755 --- a/build.sh +++ b/build.sh @@ -72,12 +72,14 @@ fi if [[ "$BUILD_PACKAGE" = "1" ]]; then OUTPUT_DIR="snp-release-`date "+%F"`" rm -rf $OUTPUT_DIR - mkdir -p $OUTPUT_DIR/linux + mkdir -p $OUTPUT_DIR/linux/guest + mkdir -p $OUTPUT_DIR/linux/host mkdir -p $OUTPUT_DIR/usr cp -dpR $INSTALL_DIR $OUTPUT_DIR/usr/ if [ "$ID_LIKE" = "debian" ]; then - cp linux-*.deb $OUTPUT_DIR/linux -v + cp linux/linux-*-guest-*.deb $OUTPUT_DIR/linux/guest -v + cp linux/linux-*-host-*.deb $OUTPUT_DIR/linux/host -v else cp kernel-*.rpm $OUTPUT_DIR/linux -v fi 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() diff --git a/install.sh b/install.sh index c73911b..24a4eb0 100755 --- a/install.sh +++ b/install.sh @@ -10,7 +10,7 @@ else fi if [ "$ID_LIKE" = "debian" ]; then - dpkg -i linux/linux-image-*.deb + dpkg -i linux/host/linux-image-*.deb else rpm -ivh linux/kernel-*.rpm fi @@ -18,5 +18,5 @@ fi cp kvm.conf /etc/modprobe.d/ echo -echo "Reboot the host and select the SNP kernel" +echo "Reboot the host and select the SNP Host kernel" echo diff --git a/stable-commits b/stable-commits index bbe0759..7aa7ec8 100644 --- a/stable-commits +++ b/stable-commits @@ -4,12 +4,13 @@ # hypervisor commit KERNEL_GIT_URL="https://github.com/AMDESE/linux.git" -KERNEL_BRANCH="sev-snp-part2-v5" +KERNEL_HOST_BRANCH="sev-snp-part2-v6" +KERNEL_GUEST_BRANCH="sev-snp-v8" # qemu commit QEMU_GIT_URL="https://github.com/AMDESE/qemu.git" -QEMU_BRANCH="snp-rfc-v2" +QEMU_BRANCH="snp-v3" # guest bios OVMF_GIT_URL="https://github.com/AMDESE/ovmf.git" -OVMF_BRANCH="sev-snp-v6" +OVMF_BRANCH="snp-v14" -- cgit v1.2.3-71-gd317