diff options
| author | Brijesh Singh <brijesh.singh@amd.com> | 2021-12-13 15:25:51 -0600 |
|---|---|---|
| committer | Brijesh Singh <brijesh.singh@amd.com> | 2021-12-13 15:25:51 -0600 |
| commit | 00ee36df4cfa13b85136d91d7778c42bbe49167e (patch) | |
| tree | 70ceec64cf7d856f78e179604b37b64a519af00e | |
| parent | f23f201ecb91420c2410b2397b3d844e9315982c (diff) | |
| download | cachepc-amdsev-00ee36df4cfa13b85136d91d7778c42bbe49167e.tar.gz cachepc-amdsev-00ee36df4cfa13b85136d91d7778c42bbe49167e.zip | |
update to use newer commits
| -rwxr-xr-x | build.sh | 6 | ||||
| -rwxr-xr-x | common.sh | 40 | ||||
| -rwxr-xr-x | install.sh | 4 | ||||
| -rw-r--r-- | stable-commits | 7 |
4 files changed, 32 insertions, 25 deletions
@@ -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 @@ -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() @@ -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" |
