summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/ovmf
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/ovmf')
-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 \
12 12
13SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588" 13SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588"
14 14
15inherit deploy
16
15PARALLEL_MAKE = "" 17PARALLEL_MAKE = ""
16 18
17S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
18 20
19DEPENDS_class-native="util-linux-native iasl-native ossp-uuid-native" 21DEPENDS_class-native="util-linux-native iasl-native ossp-uuid-native qemu-native"
20 22
21DEPENDS_class-target="ovmf-native" 23DEPENDS_class-target="ovmf-native"
22 24
@@ -97,9 +99,22 @@ do_compile_class-target() {
97 OVMF_ARCH="IA32" 99 OVMF_ARCH="IA32"
98 fi 100 fi
99 101
102 # ${WORKDIR}/ovmf is a well-known location where do_install and
103 # do_deploy will be able to find the files.
104 rm -rf ${WORKDIR}/ovmf
105 mkdir ${WORKDIR}/ovmf
106 OVMF_DIR_SUFFIX="X64"
107 if [ "${TARGET_ARCH}" != "x86_64" ] ; then
108 OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization
109 fi
100 FIXED_GCCVER=$(fixup_target_tools ${GCC_VER}) 110 FIXED_GCCVER=$(fixup_target_tools ${GCC_VER})
101 echo FIXED_GCCVER is ${FIXED_GCCVER} 111 bbnote FIXED_GCCVER is ${FIXED_GCCVER}
112 build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}"
113
102 ${S}/OvmfPkg/build.sh -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} 114 ${S}/OvmfPkg/build.sh -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER}
115 ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd
116 ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd
117 ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd
103} 118}
104 119
105do_install_class-native() { 120do_install_class-native() {
@@ -108,16 +123,21 @@ do_install_class-native() {
108} 123}
109 124
110do_install_class-target() { 125do_install_class-target() {
111 OVMF_DIR_SUFFIX="X64" 126}
112 if [ "${TARGET_ARCH}" != "x86_64" ] ; then
113 OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization
114 fi
115 install -d ${D}${datadir}/ovmf
116 127
117 FIXED_GCCVER=$(fixup_target_tools ${GCC_VER}) 128do_deploy() {
118 build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}" 129}
119 install -m 0755 ${build_dir}/FV/OVMF.fd \ 130do_deploy[cleandirs] = "${DEPLOYDIR}"
120 ${D}${datadir}/ovmf/bios.bin 131do_deploy_class-target() {
132 # For use with "runqemu ovmf".
133 for i in \
134 ovmf \
135 ovmf.code \
136 ovmf.vars \
137 ; do
138 qemu-img convert -f raw -O qcow2 ${WORKDIR}/ovmf/$i.fd ${DEPLOYDIR}/$i.qcow2
139 done
121} 140}
141addtask do_deploy after do_compile before do_build
122 142
123BBCLASSEXTEND = "native" 143BBCLASSEXTEND = "native"