summaryrefslogtreecommitdiff
path: root/meta/recipes-core/ovmf/ovmf_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/ovmf/ovmf_git.bb')
-rw-r--r--meta/recipes-core/ovmf/ovmf_git.bb42
1 files changed, 31 insertions, 11 deletions
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
index 13b583b05d..895ed6cfee 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -12,11 +12,13 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \
SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588"
+inherit deploy
+
PARALLEL_MAKE = ""
S = "${WORKDIR}/git"
-DEPENDS_class-native="util-linux-native iasl-native ossp-uuid-native"
+DEPENDS_class-native="util-linux-native iasl-native ossp-uuid-native qemu-native"
DEPENDS_class-target="ovmf-native"
@@ -97,9 +99,22 @@ do_compile_class-target() {
OVMF_ARCH="IA32"
fi
+ # ${WORKDIR}/ovmf is a well-known location where do_install and
+ # do_deploy will be able to find the files.
+ rm -rf ${WORKDIR}/ovmf
+ mkdir ${WORKDIR}/ovmf
+ OVMF_DIR_SUFFIX="X64"
+ if [ "${TARGET_ARCH}" != "x86_64" ] ; then
+ OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization
+ fi
FIXED_GCCVER=$(fixup_target_tools ${GCC_VER})
- echo FIXED_GCCVER is ${FIXED_GCCVER}
+ bbnote FIXED_GCCVER is ${FIXED_GCCVER}
+ build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}"
+
${S}/OvmfPkg/build.sh -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER}
+ ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd
+ ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd
+ ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd
}
do_install_class-native() {
@@ -108,16 +123,21 @@ do_install_class-native() {
}
do_install_class-target() {
- OVMF_DIR_SUFFIX="X64"
- if [ "${TARGET_ARCH}" != "x86_64" ] ; then
- OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization
- fi
- install -d ${D}${datadir}/ovmf
+}
- FIXED_GCCVER=$(fixup_target_tools ${GCC_VER})
- build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}"
- install -m 0755 ${build_dir}/FV/OVMF.fd \
- ${D}${datadir}/ovmf/bios.bin
+do_deploy() {
+}
+do_deploy[cleandirs] = "${DEPLOYDIR}"
+do_deploy_class-target() {
+ # For use with "runqemu ovmf".
+ for i in \
+ ovmf \
+ ovmf.code \
+ ovmf.vars \
+ ; do
+ qemu-img convert -f raw -O qcow2 ${WORKDIR}/ovmf/$i.fd ${DEPLOYDIR}/$i.qcow2
+ done
}
+addtask do_deploy after do_compile before do_build
BBCLASSEXTEND = "native"