[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 4/5] raisin: introduce ovmf



Add a component to build ovmf and pass the output binary to the xen
build.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 components/ovmf   |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 components/series |    1 +
 components/xen    |    3 ++-
 defconfig         |    6 ++++--
 4 files changed, 67 insertions(+), 3 deletions(-)
 create mode 100644 components/ovmf

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() {
+    :
+}
diff --git a/components/series b/components/series
index f0f3cfa..fe9092a 100644
--- a/components/series
+++ b/components/series
@@ -1,4 +1,5 @@
 seabios
+ovmf
 xen
 qemu
 qemu_traditional
diff --git a/components/xen b/components/xen
index b3426f0..b3a0c96 100644
--- a/components/xen
+++ b/components/xen
@@ -29,7 +29,8 @@ function xen_build() {
     cd xen-dir
     ./configure --prefix=$PREFIX 
--with-system-qemu=$PREFIX/lib/xen/bin/qemu-system-i386 \
         --disable-qemu-traditional --enable-rombios \
-        --with-system-seabios="$BASEDIR"/seabios-dir/out/bios.bin
+        --with-system-seabios="$BASEDIR"/seabios-dir/out/bios.bin \
+        --with-system-ovmf="$BASEDIR"/ovmf-dir/ovmf.bin
     $RAISIN_MAKE
     $RAISIN_MAKE install DESTDIR="$INST_DIR"
     cd "$BASEDIR"
diff --git a/defconfig b/defconfig
index d3ef283..7d2a3f7 100644
--- a/defconfig
+++ b/defconfig
@@ -1,12 +1,12 @@
 # Config variables for raisin
 
 # Components
-## All components: seabios xen qemu qemu_traditional grub libvirt
+## All components: seabios ovmf xen qemu qemu_traditional grub libvirt
 ## Core xen functionality: xen
 ## Remove a component from the list below, if you want to disable it
 ## You can manually overwrite this list using the COMPONENTS
 ## environmental variable.
-ENABLED_COMPONENTS="seabios xen qemu qemu_traditional grub libvirt"
+ENABLED_COMPONENTS="seabios ovmf xen qemu qemu_traditional grub libvirt"
 
 # Build config
 ## Make command to run
@@ -27,6 +27,7 @@ 
QEMU_TRADITIONAL_URL="git://xenbits.xen.org/qemu-xen-unstable.git"
 SEABIOS_URL="git://xenbits.xen.org/seabios.git"
 GRUB_URL="git://git.savannah.gnu.org/grub.git"
 LIBVIRT_URL="git://libvirt.org/libvirt.git"
+OVMF_URL="git://xenbits.xen.org/ovmf.git"
 
 # Software versions.
 XEN_REVISION="master"
@@ -35,3 +36,4 @@ QEMU_TRADITIONAL_REVISION="master"
 SEABIOS_REVISION="master"
 GRUB_REVISION="master"
 LIBVIRT_REVISION="master"
+OVMF_REVISION="master"
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.