diff options
author | Pavel Zhukov <pavel@zhukoff.net> | 2025-03-07 10:52:57 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-08 18:08:04 +0000 |
commit | afcd27c4dddf4898b3a10b995ef7846c00889eb5 (patch) | |
tree | 6353563bcfa7920ea511ee57dc7451db82f3c3a5 /meta/recipes-core | |
parent | e9514130c79ec89c6a7b9507dc18b95eadd40ba1 (diff) | |
download | poky-afcd27c4dddf4898b3a10b995ef7846c00889eb5.tar.gz |
ovmf: Add PACKAGECONFIG[debug]
In release mode, OVMF does not output any debug information to the QEMU port, making it extremely difficult to debug boot issues.
This commit introduces packageconfig debug flag to enable it
Usage:
PACKAGECONFIG:append:pn-ovmf = " debug"
runqemu qemuparams="-debugcon file:debug.log -global isa-debugcon.iobase=0x402"
The OVMF debug console output will be written to debug.log.
(From OE-Core rev: 50393dadf4a0086334efa184dd249cdf7f543488)
Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/ovmf/ovmf_git.bb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb index 559c86b546..764d79854f 100644 --- a/meta/recipes-core/ovmf/ovmf_git.bb +++ b/meta/recipes-core/ovmf/ovmf_git.bb | |||
@@ -12,9 +12,11 @@ LIC_FILES_CHKSUM = "file://OvmfPkg/License.txt;md5=06357ddc23f46577c2aeaeaf7b776 | |||
12 | PACKAGECONFIG ??= "" | 12 | PACKAGECONFIG ??= "" |
13 | PACKAGECONFIG += "${@bb.utils.contains('MACHINE_FEATURES', 'tpm', 'tpm', '', d)}" | 13 | PACKAGECONFIG += "${@bb.utils.contains('MACHINE_FEATURES', 'tpm', 'tpm', '', d)}" |
14 | PACKAGECONFIG += "${@bb.utils.contains('MACHINE_FEATURES', 'tpm2', 'tpm', '', d)}" | 14 | PACKAGECONFIG += "${@bb.utils.contains('MACHINE_FEATURES', 'tpm2', 'tpm', '', d)}" |
15 | PACKAGECONFIG[debug] = ",,," | ||
15 | PACKAGECONFIG[secureboot] = ",,," | 16 | PACKAGECONFIG[secureboot] = ",,," |
16 | PACKAGECONFIG[tpm] = "-D TPM_ENABLE=TRUE,-D TPM_ENABLE=FALSE,," | 17 | PACKAGECONFIG[tpm] = "-D TPM_ENABLE=TRUE,-D TPM_ENABLE=FALSE,," |
17 | 18 | ||
19 | |||
18 | # GCC12 trips on it | 20 | # GCC12 trips on it |
19 | #see https://src.fedoraproject.org/rpms/edk2/blob/rawhide/f/0032-Basetools-turn-off-gcc12-warning.patch | 21 | #see https://src.fedoraproject.org/rpms/edk2/blob/rawhide/f/0032-Basetools-turn-off-gcc12-warning.patch |
20 | BUILD_CFLAGS += "-Wno-error=stringop-overflow" | 22 | BUILD_CFLAGS += "-Wno-error=stringop-overflow" |
@@ -67,6 +69,8 @@ OVMF_SECURE_BOOT_FLAGS = "-DSECURE_BOOT_ENABLE=TRUE ${OVMF_SECURE_BOOT_EXTRA_FLA | |||
67 | 69 | ||
68 | export PYTHON_COMMAND = "${HOSTTOOLS_DIR}/python3" | 70 | export PYTHON_COMMAND = "${HOSTTOOLS_DIR}/python3" |
69 | 71 | ||
72 | OVMF_BUILD_TYPE = "${@bb.utils.contains('PACKAGECONFIG', 'debug', 'DEBUG', 'RELEASE', d)}" | ||
73 | |||
70 | do_patch[postfuncs] += "fix_basetools_location" | 74 | do_patch[postfuncs] += "fix_basetools_location" |
71 | fix_basetools_location () { | 75 | fix_basetools_location () { |
72 | } | 76 | } |
@@ -200,11 +204,11 @@ do_compile:class-target() { | |||
200 | fi | 204 | fi |
201 | FIXED_GCCVER=$(fixup_target_tools ${GCC_VER}) | 205 | FIXED_GCCVER=$(fixup_target_tools ${GCC_VER}) |
202 | bbnote FIXED_GCCVER is ${FIXED_GCCVER} | 206 | bbnote FIXED_GCCVER is ${FIXED_GCCVER} |
203 | build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}" | 207 | build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/${OVMF_BUILD_TYPE}_${FIXED_GCCVER}" |
204 | 208 | ||
205 | bbnote "Building without Secure Boot." | 209 | bbnote "Building without Secure Boot." |
206 | rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX | 210 | rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX |
207 | ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} ${PACKAGECONFIG_CONFARGS} | 211 | ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b ${OVMF_BUILD_TYPE} -t ${FIXED_GCCVER} ${PACKAGECONFIG_CONFARGS} |
208 | ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd | 212 | ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd |
209 | ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd | 213 | ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd |
210 | ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd | 214 | ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd |
@@ -214,7 +218,7 @@ do_compile:class-target() { | |||
214 | # Repeat build with the Secure Boot flags. | 218 | # Repeat build with the Secure Boot flags. |
215 | bbnote "Building with Secure Boot." | 219 | bbnote "Building with Secure Boot." |
216 | rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX | 220 | rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX |
217 | ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} ${PACKAGECONFIG_CONFARGS} ${OVMF_SECURE_BOOT_FLAGS} | 221 | ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b ${OVMF_BUILD_TYPE} -t ${FIXED_GCCVER} ${PACKAGECONFIG_CONFARGS} ${OVMF_SECURE_BOOT_FLAGS} |
218 | ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.secboot.fd | 222 | ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.secboot.fd |
219 | ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.secboot.code.fd | 223 | ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.secboot.code.fd |
220 | ln ${build_dir}/${OVMF_ARCH}/EnrollDefaultKeys.efi ${WORKDIR}/ovmf/ | 224 | ln ${build_dir}/${OVMF_ARCH}/EnrollDefaultKeys.efi ${WORKDIR}/ovmf/ |