]> xenbits.xensource.com Git - people/sstabellini/raisin.git/commitdiff
raisin: add components/ovmf file, forgot from previous commit
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 24 Apr 2015 10:34:01 +0000 (10:34 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 24 Apr 2015 10:34:01 +0000 (10:34 +0000)
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
components/ovmf [new file with mode: 0644]

diff --git a/components/ovmf b/components/ovmf
new file mode 100644 (file)
index 0000000..a59a771
--- /dev/null
@@ -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() {
+    :
+}