diff --git a/conf/machine/include/k3.inc b/conf/machine/include/k3.inc index 54b17892..6b78f4ca 100644 --- a/conf/machine/include/k3.inc +++ b/conf/machine/include/k3.inc @@ -26,6 +26,9 @@ UBOOT_SUFFIX = "img" EXTRA_IMAGEDEPENDS += "virtual/bootloader" +TFA_PLATFORM = "k3" +TFA_BOARD = "generic" + MACHINE_GUI_CLASS = "smallscreen" # Use the expected value of the ubifs filesystem's volume name in the kernel diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.2.bb b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.2.bb deleted file mode 100644 index ae957bf8..00000000 --- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.2.bb +++ /dev/null @@ -1,79 +0,0 @@ -SUMMARY = "ARM Trusted Firmware" -DESCRIPTION = "ARM Trusted Firmware provides a reference implementation of \ -Secure World software for ARMv8-A, including Exception Level 3 (EL3) software. \ -It provides implementations of various ARM interface standards such as the \ -Power State Coordination Interface (PSCI), Trusted Board Boot Requirements \ -(TBBR) and Secure monitor code." -HOMEPAGE = "http://infocenter.arm.com/help/topic/com.arm.doc.dui0928e/CJHIDGJF.html" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://docs/license.rst;md5=189505435dbcdcc8caa63c46fe93fa89" - -inherit deploy - -DEPENDS += "dtc-native openssl-native" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -S = "${WORKDIR}/git" - -PV_append = "+git${SRCPV}" - -BRANCH = "ti-atf" -SRC_URI = "git://git.ti.com/atf/arm-trusted-firmware.git;branch=${BRANCH}" - -SRCREV ?= "e516a389ac12fbe1597f61fea80ed3f230b9c5fd" - -# Make ATF "aware" of OPTEE, no build dependency -PACKAGECONFIG[optee] = "SPD=opteed" - -COMPATIBLE_MACHINE = "k3" -ATFPLATFORM_k3 = "k3" -ATFBOARD_k3 = "generic" - -PACKAGECONFIG_k3 = "optee" - -CFLAGS[unexport] = "1" -LDFLAGS[unexport] = "1" -AS[unexport] = "1" -LD[unexport] = "1" - -do_configure[noexec] = "1" - -EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" PLAT="${ATFPLATFORM}" TARGET_BOARD="${ATFBOARD}" ${PACKAGECONFIG_CONFARGS}' - -do_compile() { - oe_runmake all -} - -do_compile_append_am65xx-hs-evm() { - export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} - ( cd ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/; \ - mv bl31.bin bl31.bin.unsigned; \ - ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ - ) -} - -do_compile_append_j7-hs-evm() { - export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} - ( cd ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/; \ - mv bl31.bin bl31.bin.unsigned; \ - ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ - ) -} - -do_install() { - install -d ${D}/boot - install -m 0644 ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/bl31.bin ${D}/boot/ - install -m 0644 ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/bl31/bl31.elf ${D}/boot/ -} - -do_deploy() { - install -d ${DEPLOYDIR} - install -m 0644 ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/bl31.bin ${DEPLOYDIR}/ - install -m 0644 ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/bl31/bl31.elf ${DEPLOYDIR}/ -} -addtask deploy before do_build after do_compile - -FILES_${PN} = "/boot" -SYSROOT_DIRS += "/boot" diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend new file mode 100644 index 00000000..d43e7c5a --- /dev/null +++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend @@ -0,0 +1,23 @@ +BRANCH_k3 = "ti-atf" +SRC_URI_k3 = "git://git.ti.com/atf/arm-trusted-firmware.git;branch=${BRANCH}" +SRCREV_k3 = "5b907a2813faf039d752cdeb6a7b94e95580c46b" +COMPATIBLE_MACHINE_k3 = "k3" +TFA_BUILD_TARGET_k3 = "all" +TFA_INSTALL_TARGET_k3 = "bl31" +TFA_SPD_k3 = "opteed" + +do_compile_append_am65xx-hs-evm() { + export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} + ( cd ${B}/${BUILD_DIR}/release/; \ + mv bl31.bin bl31.bin.unsigned; \ + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ + ) +} + +do_compile_append_j7-hs-evm() { + export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} + ( cd ${B}/${BUILD_DIR}/release/; \ + mv bl31.bin bl31.bin.unsigned; \ + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ + ) +} diff --git a/recipes-bsp/u-boot/u-boot-ti.inc b/recipes-bsp/u-boot/u-boot-ti.inc index 8f8f0afe..062a692a 100644 --- a/recipes-bsp/u-boot/u-boot-ti.inc +++ b/recipes-bsp/u-boot/u-boot-ti.inc @@ -33,7 +33,7 @@ PV_append = "+git${SRCPV}" # u-boot needs devtree compiler to parse dts files DEPENDS += "dtc-native bc-native lzop-native flex-native bison-native" -PACKAGECONFIG[atf] = "ATF=${STAGING_DIR_HOST}/boot/bl31.bin,,arm-trusted-firmware" +PACKAGECONFIG[atf] = "ATF=${STAGING_DIR_HOST}/firmware/bl31.bin,,trusted-firmware-a" PACKAGECONFIG[optee] = "TEE=${STAGING_DIR_HOST}/boot/bl32.bin,,optee-os" PACKAGECONFIG_append_aarch64 = " atf optee"