Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SRC_URI += "https://github.com/coreboot/qc_blobs/raw/refs/heads/master/sc7280/qtiseclib/libqtisec.a;name=qtiseclib"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the licence for the blob? Does it change the licence of the generated binary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The license for this blob can be found here: https://github.com/coreboot/qc_blobs/blob/master/sc7280/qtiseclib/LICENSE.

Does it change the licence of the generated binary?

AFAIK, it doesn't change the overall TF-A project license but rather it is required for the binary components to be compliant with the TF-A license terms, see here: https://trustedfirmware-a.readthedocs.io/en/latest/process/contributing.html#binary-components

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still the licence should be included in SBOM, etc., so it should be properly annotated.
Also we have to comply to the licensing terms. E.g.:

(iii) redistribution of the Redistributable Binary Code must include the .txt file setting forth the terms and condition of this Agreement;

SRC_URI[qtiseclib.sha256sum] = "6860dda0701c8709530608cc0e5a61b76484ae16cb673ba9a23510cf4b3d57bf"

COMPATIBLE_MACHINE = "qcm6490"
TFA_PLATFORM = "rb3gen2"
TFA_BUILD_TARGET = "bl2 fip"
EXTRA_OEMAKE:append = " \
QTISECLIB_PATH=${UNPACKDIR}/libqtisec.a \
"
22 changes: 22 additions & 0 deletions recipes-bsp/trusted-firmware-a/trusted-firmware-a-qcom.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
SRCBRANCH = "qcom-next"
SRC_URI = "git://github.com/qualcomm-linux/trusted-firmware-a.git;protocol=https;name=tfa;branch=${SRCBRANCH}"
SRCREV_tfa = "164d443c8e92c18fd2cca03661dd1a2b9ac37848"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the idea of the orignial TF-A recipes. Inside meta-arm there are 4 different versions of TF-A (2.10.17, 2.12.3, 2.13.0, git aka tip). Machine-specific includes don't change the URI and the SRCREV. In other words: if the user sets PREFERRED_VERSION_trusted-firmware-a, it is expected to get that TF-A version, not some random machine-specific version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a fair point, I will add proper versioned recipes instead.

LIC_FILES_CHKSUM = "file://docs/license.rst;md5=6ed7bace7b0bc63021c6eba7b524039e"

DEPENDS += "qtestsign-native"

MACHINE_TFA_QCOM_REQUIRE ?= ""
MACHINE_TFA_QCOM_REQUIRE:qcm6490 = "trusted-firmware-a-qcm6490.inc"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it work on other qcm6490-based machines (e.g. IDP, Tachyon or RubkPi)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the TF-A/OP-TEE port is specific to the SoC. However, we need to make sure that the OEM hardware is running a QLI based boot firmware release where we can replace boot chain components with open-source ones.

BTW, I have been waiting to get my hands-on with one of these boards as well to run open boot stack.


require ${MACHINE_TFA_QCOM_REQUIRE}

do_install:append:qcm6490() {
export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1

${OBJCOPY} -I binary -B aarch64 -O elf64-littleaarch64 ${D}/firmware/fip.bin ${D}/firmware/fip.o
${LD} ${D}/firmware/fip.o -o ${D}/firmware/fip_unsigned.elf -EL -T ${S}/tools/qti/fip-elf.lds --defsym=ELFENTRY=0x9fc00000 -Ttext=0x9fc00000
rm -f ${D}/firmware/fip.o

qtestsign -v6 aboot -o ${D}/firmware/fip.elf ${D}/firmware/fip_unsigned.elf
rm -f ${D}/firmware/fip_unsigned.elf
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MACHINE_TFA_REQUIRE ?= ""
MACHINE_TFA_REQUIRE:qcom = "trusted-firmware-a-qcom.inc"

require ${MACHINE_TFA_REQUIRE}