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 --- common.sh | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'common.sh') 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() -- cgit v1.2.3-71-gd317