From: Stefano Stabellini Date: Fri, 24 Apr 2015 10:34:01 +0000 (+0000) Subject: raisin: add components/ovmf file, forgot from previous commit X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=58f1fb33b66e6bc3b4cfbf971b1bd535dca9edca;p=raisin.git raisin: add components/ovmf file, forgot from previous commit Signed-off-by: Stefano Stabellini --- diff --git a/components/ovmf b/components/ovmf new file mode 100644 index 0000000..a59a771 --- /dev/null +++ b/components/ovmf @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +function ovmf_check_package() { + local DEP_Debian_common="build-essential nasm uuid-dev python iasl" + local DEP_Debian_x86_32="$DEP_Debian_common" + local DEP_Debian_x86_64="$DEP_Debian_common" + local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_arm64="$DEP_Debian_common" + + local DEP_Fedora_common="make gcc gcc-c++ nasm libuuid-devel python acpica-tools" + local DEP_Fedora_x86_32="$DEP_Fedora_common" + local DEP_Fedora_x86_64="$DEP_Fedora_common" + + + if [[ $RAISIN_ARCH != "x86_64" ]] + then + echo ovmf is only supported on x86_64 + return + fi + echo Checking OVMF dependencies + eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH" +} + + +function ovmf_build() { + if [[ $RAISIN_ARCH != "x86_64" ]] + then + echo ovmf is only supported on x86_64 + return + fi + + cd "$BASEDIR" + git-checkout $OVMF_URL $OVMF_REVISION ovmf-dir + cd ovmf-dir + + make -C BaseTools/Source/C + OvmfPkg/build.sh -a X64 -b RELEASE -n 4 + cp Build/OvmfX64/RELEASE_GCC*/FV/OVMF.fd ovmf.bin + + cd "$BASEDIR" +} + +function ovmf_clean() { + cd "$BASEDIR" + if [[ -d ovmf-dir ]] + then + cd ovmf-dir + $GIT clean -fdx + cd .. + rm -rf ovmf-dir + fi +} + +function ovmf_configure() { + : +} + +function ovmf_unconfigure() { + : +}