Skip to content

Commit 6e58c9a

Browse files
committed
image_types_qcom.bbclass: support KVM-aware xbl_config.elf packaging
There is currently no build-time toggle between Gunyah and KVM. This change adds logic to detect KVM enablement via DISTRO_FEATURES and sets the KVM variable accordingly. During qcomflash packaging, if KVM is enabled, the build checks for xbl_config_kvm.elf and fails if it's missing, ensuring the correct bootloader variant is used to support virtualization features expected in KVM-enabled Qualcomm builds. Fixes #1154 Signed-off-by: Keerthivasan Raghavan <[email protected]>
1 parent 508ff26 commit 6e58c9a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

classes-recipe/image_types_qcom.bbclass

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ create_qcomflash_pkg() {
104104

105105
# boot firmware
106106
for bfw in `find ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR} -maxdepth 1 -type f \
107-
\( -name '*.elf' ! -name 'abl2esp*.elf' \) -o \
107+
\( -name '*.elf' ! -name 'abl2esp*.elf' ! -name 'xbl_config*.elf' \) -o \
108108
-name '*.mbn*' -o \
109109
-name '*.fv' -o \
110110
-name 'sec.dat'` ; do
@@ -116,6 +116,16 @@ create_qcomflash_pkg() {
116116
install -m 0644 "${DEPLOY_DIR_IMAGE}/abl2esp-${ABL_SIGNATURE_VERSION}.elf" .
117117
fi
118118

119+
# xbl_config
120+
xbl_config="xbl_config.elf"
121+
if ${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'true', 'false', d)}; then
122+
xbl_config="xbl_config_kvm.elf"
123+
fi
124+
125+
if [ -f "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${xbl_config}" ]; then
126+
install -m 0644 "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${xbl_config}" xbl_config.elf
127+
fi
128+
119129
# sail nor firmware
120130
if [ -d "${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/sail_nor" ]; then
121131
install -d sail_nor

0 commit comments

Comments
 (0)