Plumb flashing support for open-firmware boot for IQ-9075 EVK and RB3Gen2 - #3258
Conversation
The SWIV platform annotation is not specific to the U-Boot SPL; the TF-A BL2 signing needs the same platform name. Rename the variable to the firmware-generic QCOM_FW_SWIV_PLATFORM so both consumers can share it. Assisted-by: GitHub Copilot CLI:claude-opus-4-8 Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Open-firmware boot loads a signed BL2 from the trust-zone partition, but
only fip.elf was signed before, so BL2 was never prepared as a bootable
trust-zone image.
Sign BL2 with qtestsign, with an optional SWIV pre-step for platforms
that require it, reusing the shared QCOM_FW_SWIV_PLATFORM. Both fip.elf
and bl2.mbn land in ${D}${FIRMWARE_DIR}, which meta-arm's firmware.bbclass
already deploys under ${DEPLOY_DIR_IMAGE}/${PN}/, so no extra deploy step
is needed.
Assisted-by: GitHub Copilot CLI:claude-opus-4-8
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Open-firmware machines boot through a signed BL2 that loads the FIP payload, which qcomflash never installed. Add QCOM_TFA_FIP_FLASH to install fip.elf as uefi.elf and bl2.mbn into the tz slot, reading both from the TF-A recipe deploy directory named by QCOM_TFA_RECIPE. The same variable drives the do_image_qcomflash deploy dependency, so machines only set QCOM_TFA_FIP_FLASH and QCOM_TFA_RECIPE. Fail when the trust-zone image is missing, since FIP boot cannot work without it, and leave the u-boot and SPL-FIT paths unchanged when disabled. Assisted-by: GitHub Copilot CLI:claude-opus-4-8 Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
rb3gen2-core-kit-open-fw boots the open TF-A BL2 plus FIP payload. Enable QCOM_TFA_FIP_FLASH and point QCOM_TFA_RECIPE at its TF-A recipe so do_image_qcomflash orders after the TF-A deploy and flashes the signed BL2 and FIP. Assisted-by: GitHub Copilot CLI:claude-opus-4-8 Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
062a0e7 to
aa15200
Compare
|
Thanks Jose Quaresma (@quaresmajose) Ricardo Salveti (@ricardosalveti) for your comments, addressed them. Feel free to review again. |
|
This has failed |
|
The failure is from oe-selftest (test_machine_dtb_entries_exist_for_kernel_providers), not check-layer. The test only looks for .dts/.dtso files, and qcs6490-rb3gen2-el2.dtb is a Makefile composite (qcs6490-rb3gen2.dtb + kodiak-el2.dtbo). The test needs to also consider the -dtbs targets from the Makefile, same will be needed for lemans-evk-el2.dtb. |
test_machine_dtb_entries_exist_for_kernel_providers only scans arch/*/boot/dts for .dts/.dtso sources, so it misses composite DTBs like qcs6490-rb3gen2-el2.dtb that the kernel assembles from a "<name>-dtbs :=" rule instead. Parse those Makefile rules too and add each resulting DTB to the set of available outputs. Assisted-by: GitHub Copilot CLI:claude-opus-4-8 Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
The open firmware UKI runs at EL2, so it must carry the merged qcs6490-rb3gen2-el2.dtb that ukify embeds whole instead of applying the .dtbo overlays itself. That DTB only exists in linux-qcom kernels, so build it through LINUX_QCOM_KERNEL_DEVICETREE to keep linux-yocto builds working, and embed it into the ESP image. The machine already defaults to a linux-qcom kernel through qcom-base.inc. Assisted-by: GitHub Copilot CLI:claude-opus-4-8 Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
iq-9075-evk-open-fw boots the open TF-A BL2 plus FIP payload. Enable QCOM_TFA_FIP_FLASH and point QCOM_TFA_RECIPE at its TF-A recipe so do_image_qcomflash orders after the TF-A deploy and flashes the signed BL2 and FIP. The SPL variant inherits this config but flashes the U-Boot SPL instead, so keep QCOM_TFA_FIP_FLASH disabled there and note why. Assisted-by: GitHub Copilot CLI:claude-opus-4-8 Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
The open firmware UKI runs at EL2, so it must carry the merged lemans-evk-el2.dtb that ukify embeds whole instead of applying the .dtbo overlays itself. That DTB is upstream, so build it through the regular KERNEL_DEVICETREE and embed it into the ESP image. Assisted-by: GitHub Copilot CLI:claude-opus-4-8 Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
aa15200 to
cc60528
Compare
Thanks Ricardo Salveti (@ricardosalveti) for the pointer, the |
|
Dmitry Baryshkov (@lumag) Jose Quaresma (@quaresmajose) gentle ping if there are any further comments. I know people are going to be travelling next week for the conferences. |
Test Results 117 files 717 suites 6h 6m 20s ⏱️ For more details on these failures, see this check. Results for commit cc60528. |
|
Known issues. |
95fb72a
into
qualcomm-linux:master
|
Successfully created backport PR for |
Enables the open TF-A BL2 + FIP boot flow for the iq-9075-evk-open-fw and rb3gen2-core-kit-open-fw machines, and makes the UKI carry the EL2 device tree these platforms boot under.
In this flow the boot ROM loads a signed BL2 from the
tzpartition, and BL2 loads the FIP payload (BL31 + OP-TEE BL32 + U-Boot BL33) from theuefipartition. Previously the TF-A recipe only signedfip.elf, nothing prepared BL2 as the trust-zone image, and qcomflash never installed either artifact, so these machines could not boot the open firmware.The major blocker has been the OEM only signing feature for TZ image which should be fixed in current boot firmware releases in meta-qcom.