Skip to content

Rb3gen2: Add support for Open Boot firmware (TF-A, OP-TEE and U-Boot) build#1172

Merged
ricardosalveti merged 6 commits intoqualcomm-linux:masterfrom
b49020:rb3gen2-open-boot-fw
Mar 5, 2026
Merged

Rb3gen2: Add support for Open Boot firmware (TF-A, OP-TEE and U-Boot) build#1172
ricardosalveti merged 6 commits intoqualcomm-linux:masterfrom
b49020:rb3gen2-open-boot-fw

Conversation

@b49020
Copy link
Copy Markdown
Member

@b49020 b49020 commented Oct 30, 2025

Currently the open boot firmware stack has only been enabled on RB3Gen2 platform which can be built using following:

$ kas build ci/rb3gen2-core-kit-open-fw.yml:ci/meta-arm.yml

And currently the boot stack includes TF-A, OP-TEE and U-Boot. In future the plan is to enable upstream edk2 as well. Along with that the next target for open boot firmware is Lemans based IoT EVK platform.

Right now the build generates 2 firmware payloads as bl2.elf (unsigned) and fip.elf (test signed using qtestsign). It is required to sign bl2.elf with QTI signature using sectools but in future the plan is to drop QTI signature requirement with an updated release of XBL/XBL-SEC.

Once signing is done, one need to update following binaries in qcomflash tarball and then proceed with QDL flashing:

  • tz.mbn -> bl2.mbn
  • uefi.elf -> fip.elf

@b49020 b49020 requested review from idlethread and ldts October 30, 2025 05:39
@b49020 b49020 force-pushed the rb3gen2-open-boot-fw branch 2 times, most recently from 9104459 to 17e9dc2 Compare October 30, 2025 06:22
@b49020
Copy link
Copy Markdown
Member Author

b49020 commented Oct 30, 2025

Any ideas how can I fix the yocto run checks here? I have already added meta-arm as dependency for meta-qcom and added meta-arm repo to be part of repos in the KAS base.yml file. However, the build still says:

ERROR: Layer meta-qcom depends on meta-arm and isn't found.

@koenkooi
Copy link
Copy Markdown
Contributor

Any ideas how can I fix the yocto run checks here? I have already added meta-arm as dependency for meta-qcom and added meta-arm repo to be part of repos in the KAS base.yml file. However, the build still says:

ERROR: Layer meta-qcom depends on meta-arm and isn't found.

I'm not sure if ordering matters in KAS, but could you try changing the repo section to this?

  meta-arm:
    url: https://git.yoctoproject.org/git/meta-arm
    layers:
      meta-arm-toolchain:
      meta-arm:

That's the only thing that stood out to me as a difference from a working config with meta-arm included.

@ndechesne
Copy link
Copy Markdown
Contributor

Check --dependency in ci/yocto-check-layer.sh

Comment thread ci/open-boot-firmware.yml Outdated
Comment thread recipes-security/optee/optee-test-qcm6490.inc Outdated
Comment thread ci/open-boot-firmware.yml Outdated
Comment thread recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend Outdated
Comment thread recipes-security/optee/optee-os-tadevkit_%.bbappend Outdated
Comment thread recipes-security/optee/optee-os_%.bbappend Outdated
@b49020 b49020 force-pushed the rb3gen2-open-boot-fw branch from 17e9dc2 to 3474150 Compare October 31, 2025 12:17
@b49020
Copy link
Copy Markdown
Member Author

b49020 commented Oct 31, 2025

PR updated to incorporate review comments.

Comment thread ci/yocto-check-layer.sh Outdated
@b49020 b49020 force-pushed the rb3gen2-open-boot-fw branch 5 times, most recently from 972dc21 to be39af5 Compare November 4, 2025 06:15
@b49020
Copy link
Copy Markdown
Member Author

b49020 commented Nov 4, 2025

Although I have fixed the CI issues which were related to this PR however the current CI failure:

Parsing recipes...ERROR: /work/oe-core/meta/recipes-kernel/linux/linux-yocto_6.17.bb: Unable to get checksum for linux-yocto SRC_URI entry qcom.scc: file could not be found

doesn't seem to be related to this PR, any ideas?

@quaresmajose
Copy link
Copy Markdown
Contributor

This was maybe because of the OE-core updated last night, there are some kernel changes on that. I will take a look on the fail.

@quaresmajose
Copy link
Copy Markdown
Contributor

quaresmajose commented Nov 4, 2025

Should be fixed with #1186

@ricardosalveti
Copy link
Copy Markdown
Contributor

Please rebase.

@b49020 b49020 force-pushed the rb3gen2-open-boot-fw branch from be39af5 to 2376dc9 Compare November 6, 2025 05:07
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

Test run workflow

Test jobs for commit e391c1c14cdbad83545875a7ea5e460b703431fc

Test qcs615-adp-air qcs6490 qcs8300 qcs9100 qcs9100-rb8 qrb2210-rb1
AudioRecord 🚫 pass pass pass pass pass
BT_FW_KMD_Service pass pass pass pass fail pass
BT_ON_OFF 🚫 pass pass pass pass pass
BT_SCAN pass pass pass pass ⚠️ skip pass
CPUFreq_Validation 🚫 pass pass pass pass pass
DSP_AudioPD 🚫 pass pass pass pass pass
Ethernet 🚫 🚫 ⚠️ skip pass ⚠️ skip ⚠️ skip
Interrupts 🚫 pass pass pass pass pass
OpenCV 🚫 pass pass pass pass pass
WiFi_Firmware_Driver 🚫 pass pass pass pass pass
WiFi_OnOff 🚫 pass pass pass pass pass
adsp_remoteproc 🚫 pass pass pass pass pass
boot pass pass pass pass pass pass
cdsp_remoteproc 🚫 pass pass pass pass ⚠️ skip
hotplug 🚫 pass pass pass pass pass
irq 🚫 pass pass pass pass pass

All jobs summary

Job ID Device State Health
153180 qrb2210-rb1 Finished Complete
153173 qcs6490 Finished Complete
153199 qcs615-adp-air Finished Complete
153176 qcs615-adp-air Finished Complete
153169 qcs8300 Finished Complete
153211 qcs9100-rb8 Finished Complete
153202 qrb2210-rb1 Finished Complete
153172 qcs6490 Finished Complete
153198 qcs615-adp-air Finished Incomplete
153171 qcs8300 Finished Complete
153196 qcs9100-rb8 Finished Complete
153212 qcs615-adp-air Running Unknown
153167 qcs615-adp-air Finished Complete
153205 qcs615-adp-air Running Unknown
153206 qrb2210-rb1 Finished Complete
153191 qcs6490 Finished Complete
153192 qcs9100 Finished Complete
153190 qrb2210-rb1 Finished Complete
153197 qcs6490 Finished Complete
153165 qcs8300 Finished Complete
153201 qcs8300 Finished Complete
153164 qcs615-adp-air Finished Complete
153209 qcs6490 Finished Complete
153163 qcs6490 Finished Complete
153195 qcs6490 Finished Complete
153194 qcs8300 Finished Complete
153183 qcs615-adp-air Finished Complete
153170 qrb2210-rb1 Finished Complete
153208 qcs9100-rb8 Finished Complete
153175 qcs9100 Finished Complete
153200 qcs8300 Finished Complete
153166 qrb2210-rb1 Finished Complete
153184 qcs9100-rb8 Finished Complete
153207 qcs9100 Finished Complete
153182 qcs8300 Finished Complete
153185 qcs9100 Finished Complete
153178 qcs9100 Finished Complete
153181 qcs6490 Finished Complete
153193 qcs9100 Finished Incomplete
153203 qrb2210-rb1 Finished Complete
153210 qcs9100 Finished Complete
153174 qcs9100 Finished Complete
153179 qcs9100-rb8 Finished Complete
153204 qcs8300 Finished Complete
153213 qcs9100-rb8 Finished Complete
153162 qcs9100-rb8 Finished Complete
153177 qrb2210-rb1 Finished Complete
153168 qcs9100-rb8 Finished Complete

@ricardosalveti
Copy link
Copy Markdown
Contributor

That I plan to do as a follow up PR. Right now I need to figure out how to enable OEM signing for BL2 TZ image. We have been using sectools internally but there isn't a public release of profiles yet. With qtestsign, I need to see if that can support OEM only signing for TZ image.

Sure, sounds good.

@ricardosalveti
Copy link
Copy Markdown
Contributor

Okay I have switched to your suggestion instead, let me know if that's fine.

Which build failed because of this? I want to reproduce locally.

Just try following, it will report the circular dependency:

$ kas build ../meta-qcom/ci/rb3gen2-core-kit-open-fw.yml:../meta-qcom/ci/qcom-distro-kvm.yml

Built fine here without your latest commit:

kas build ci/rb3gen2-core-kit-open-fw.yml:ci/qcom-distro-kvm.yml
kas build ci/rb3gen2-core-kit-open-fw.yml

@b49020 b49020 force-pushed the rb3gen2-open-boot-fw branch 3 times, most recently from a448223 to 48dd6ec Compare March 5, 2026 09:29
@b49020
Copy link
Copy Markdown
Member Author

b49020 commented Mar 5, 2026

Okay I have switched to your suggestion instead, let me know if that's fine.

Which build failed because of this? I want to reproduce locally.

Just try following, it will report the circular dependency:

$ kas build ../meta-qcom/ci/rb3gen2-core-kit-open-fw.yml:../meta-qcom/ci/qcom-distro-kvm.yml

Built fine here without your latest commit:

kas build ci/rb3gen2-core-kit-open-fw.yml:ci/qcom-distro-kvm.yml
kas build ci/rb3gen2-core-kit-open-fw.yml

Not sure what was the issue earlier but the build failed for me as well in the CI too. Now I am also not able to reproduce the issue. So I have dropped that last initramfs fix patch.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented Mar 5, 2026

PLease rebase to resolve the conflict.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2026

Test run workflow

Test jobs for commit 48dd6ecbbf48dac98d9f0d3cd4356ae2c66fc36c

Test qcs615-adp-air qcs6490 qcs8300 qcs9100 qcs9100-rb8 qrb2210-rb1
AudioRecord pass pass pass pass pass pass
BT_FW_KMD_Service 🚫 pass pass pass pass pass
BT_ON_OFF ⚠️ skip pass pass pass ⚠️ skip pass
BT_SCAN 🚫 pass pass pass pass pass
CPUFreq_Validation pass pass pass pass pass pass
DSP_AudioPD pass pass pass pass pass pass
Ethernet ⚠️ skip 🚫 pass pass ⚠️ skip ⚠️ skip
Interrupts pass pass pass pass pass pass
OpenCV pass pass pass pass pass pass
WiFi_Firmware_Driver pass pass pass pass pass pass
WiFi_OnOff ⚠️ skip pass pass pass ⚠️ skip pass
adsp_remoteproc pass pass pass pass pass pass
boot pass pass pass pass pass pass
cdsp_remoteproc pass pass pass pass pass ⚠️ skip
hotplug pass pass pass pass pass pass
irq pass pass pass pass pass pass

All jobs summary

Job ID Device State Health
155029 qrb2210-rb1 Finished Complete
155056 qcs9100 Finished Complete
155066 qrb2210-rb1 Finished Complete
155054 qcs9100-rb8 Finished Complete
155039 qcs8300 Finished Complete
155031 qcs8300 Finished Complete
155057 qcs615-adp-air Running Unknown
155046 qcs9100-rb8 Finished Complete
155048 qcs615-adp-air Finished Complete
155053 qcs9100-rb8 Finished Incomplete
155042 qcs9100 Finished Complete
155055 qrb2210-rb1 Finished Complete
155044 qcs6490 Finished Complete
155033 qcs6490 Finished Complete
155049 qcs9100 Finished Complete
155034 qrb2210-rb1 Finished Complete
155051 qcs8300 Finished Complete
155027 qcs6490 Finished Complete
155032 qcs615-adp-air Finished Complete
155047 qcs8300 Finished Complete
155060 qcs8300 Finished Complete
155041 qcs9100-rb8 Finished Complete
155045 qcs9100 Finished Complete
155062 qcs9100 Finished Complete
155020 qcs9100 Finished Complete
155023 qrb2210-rb1 Finished Complete
155025 qcs9100 Finished Complete
155052 qrb2210-rb1 Finished Complete
155059 qrb2210-rb1 Finished Complete
155063 qcs8300 Finished Complete
155026 qcs615-adp-air Finished Complete
155040 qcs9100-rb8 Finished Complete
155058 qcs615-adp-air Running Unknown
155021 qcs9100 Finished Complete
155030 qcs9100-rb8 Finished Complete
155035 qcs6490 Finished Complete
155022 qcs8300 Finished Complete
155037 qrb2210-rb1 Finished Complete
155036 qcs615-adp-air Finished Complete
155024 qcs8300 Finished Complete
155067 qcs6490 Finished Complete
155065 qcs6490 Finished Complete
155028 qcs9100-rb8 Finished Complete
155064 qcs9100-rb8 Finished Incomplete
155050 qcs615-adp-air Finished Complete
155043 qcs6490 Finished Complete
155061 qcs6490 Finished Complete
155038 qcs615-adp-air Finished Complete

b49020 added 6 commits March 5, 2026 18:52
meta-arm provides the base recipes for open boot firmware on Arm based
platforms. So lets add meta-arm as an optional dependency via dynamic
layers such that Qcom targets can start using open boot firmware stack.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Add OP-TEE recipes override for RB3Gen2 leveraging the base recipes from
meta-arm.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Add OP-TEE packagegroup to add all the OP-TEE components if machine
supports OP-TEE feature.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Add RB3Gen2 platform specific support leveraging base trusted-firmware-a
recipes from meta-arm. It allows to generate unsigned bl2.elf and test signed
fip.elf as per TF-A documentation here [1].

[1] https://github.com/qualcomm-linux/trusted-firmware-a/blob/qcom-next/docs/plat/qti/rb3gen2.rst

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Add support for new RB3Gen2 machine type with support for open boot firmware based
on TF-A, OP-TEE and U-Boot.

Right now the build generates 2 firmware payloads as bl2.elf (unsigned) and fip.elf
(test signed using qtestsign). It is required to sign bl2.elf with QTI signature
using sectools but in future the plan is to drop QTI signature requirement with an
updated release of XBL/XBL-SEC.

Once signing is done, one need to update following binaries in qcomflash tarball
and then proceed with QDL flashing:
- tz.mbn -> bl2.mbn
- uefi.elf -> fip.elf

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Add KAS configuration file for RB3Gen2 with open boot firmware machine type.
With open boot firmware stack, UEFI boots up Linux in EL2 mode by default and
that is the only supported option as of now compliant with Arm SystemReady
standards. Hence, Linux with KVM enabled is the only supported configuration.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
@b49020 b49020 force-pushed the rb3gen2-open-boot-fw branch from 48dd6ec to 4b07167 Compare March 5, 2026 13:24
@b49020
Copy link
Copy Markdown
Member Author

b49020 commented Mar 5, 2026

PLease rebase to resolve the conflict.

PR rebased, thanks

@ricardosalveti
Copy link
Copy Markdown
Contributor

Not sure what was the issue earlier but the build failed for me as well in the CI too. Now I am also not able to reproduce the issue. So I have dropped that last initramfs fix patch.

Maybe it got fixed in oe-core, now that the kernel is not depending on the initrd anymore.

@ricardosalveti
Copy link
Copy Markdown
Contributor

Thanks, took a while but we can merge this now :-)

@ricardosalveti ricardosalveti merged commit 152b337 into qualcomm-linux:master Mar 5, 2026
30 of 171 checks passed
@CodeChenL
Copy link
Copy Markdown

Hello everyone, I am an operating systems engineer from Radxa. We are currently looking to begin using Open Boot firmware on our Qualcomm products such as SBCs, so our users and customers can customize their own boot firmware and, together with more people, make them better.
But when I tried to use this boot chain, it entered an infinite reboot when booting to BL31. Logs:
https://gist.github.com/CodeChenL/6b48eeaf33fc5f0a5738cde699c09941#file-gistfile1-txt
After my debugging I found it might be stuck at the final cpucp-related call: https://gist.github.com/CodeChenL/6b48eeaf33fc5f0a5738cde699c09941?permalink_comment_id=6101921#gistcomment-6101921
I would be very grateful if anyone in this thread could give me some help

@b49020
Copy link
Copy Markdown
Member Author

b49020 commented Apr 16, 2026

Thanks @CodeChenL for your report, can you rather create an issue under Qcom TF-A staging tree (https://github.com/qualcomm-linux/trusted-firmware-a/issues) here such that the status can be tracked?

@CodeChenL
Copy link
Copy Markdown

Thanks @CodeChenL for your report, can you rather create an issue under Qcom TF-A staging tree (https://github.com/qualcomm-linux/trusted-firmware-a/issues) here such that the status can be tracked?

Thank you for your reply. After our testing and discussion, we have decided to shift our development focus to upstream EDK2. I have already ported an MMC driver and successfully booted the system using it. Thank you all for your work; it's truly great and has set a good precedent for us

@b49020
Copy link
Copy Markdown
Member Author

b49020 commented Apr 17, 2026

@CodeChenL I assume you would have used following command to sign TF-A BL2:

sectools secure-image bl2.elf \
    --outfile bl2.mbn \
    --image-id TZ-TEE \
    --security-profile kodiak_tz_security_profile.xml \
    --sign --signing-mode TEST

actually I am able to reproduce the issue you are seeing here on RB3Gen2. Looks like OEM only signing feature in XBL_SEC is leading to this issue. The QTI signed BL2 works fine though. We will keep digging into this issue, I have filed one here: qualcomm-linux/trusted-firmware-a#19 so you can keep track of status there.

Thank you for your reply. After our testing and discussion, we have decided to shift our development focus to upstream EDK2. I have already ported an MMC driver and successfully booted the system using it. Thank you all for your work; it's truly great and has set a good precedent for us

PRs are always welcome to upstream edk2 project extending Qcom platforms support. I hope the open boot stack effort is valuable to your customers/developers.

@CodeChenL
Copy link
Copy Markdown

@CodeChenL I assume you would have used following command to sign TF-A BL2:

sectools secure-image bl2.elf \
    --outfile bl2.mbn \
    --image-id TZ-TEE \
    --security-profile kodiak_tz_security_profile.xml \
    --sign --signing-mode TEST

actually I am able to reproduce the issue you are seeing here on RB3Gen2. Looks like OEM only signing feature in XBL_SEC is leading to this issue. The QTI signed BL2 works fine though. We will keep digging into this issue, I have filed one here: qualcomm-linux/trusted-firmware-a#19 so you can keep track of status there.

Thank you for your reply. After our testing and discussion, we have decided to shift our development focus to upstream EDK2. I have already ported an MMC driver and successfully booted the system using it. Thank you all for your work; it's truly great and has set a good precedent for us

PRs are always welcome to upstream edk2 project extending Qcom platforms support. I hope the open boot stack effort is valuable to your customers/developers.

When i complete the basic functionality and pass our internal team's code quality review, I will submit them to the upstream EDK2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants