Skip to contentSkip to conversation

add support for falcon mode builds

PATCH Superseded Anshul Dalal 1 participant 4 messages Apr 17, 2025

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover add support for falcon mode builds

Falcon mode[1] in u-boot enables us to bypass proper u-boot when booting hence reducing boot time.

This patch set adds support for falcon mode on am62 evms depending on the ti-falcon distro override which can be added by appending to local.conf with the follows:

DISTROOVERRIDES:append = ":ti-falcon"

Build process remains un-changed if the override is not present.

The override enables the usage of the falcon config fragment during r5 build process as well as deploying the associated tispl_falcon.bin to rootfs's boot directory.

For secure boot since the R5 core is slower compared to A53 cores, authenticating as well as decompressing the signed fitImage from oe-core takes multiple seconds, therefore we opt for using legacyhs-fitimage instead which allows the authentication to be deferred to tifs.

[1]:
https://docs.u-boot.org/en/latest/develop/falcon.html

---
Changes in v2:
* Add cover letter describing the patch set
* Add default empty string for 'FALCON_INCLUDE' preventing recipie parsing error when ti-falcon is not set
v1:
https://lore.kernel.org/yocto-meta-ti/[email protected]/

Anshul Dalal (3):
am62: apply u-boot config fragment on ti-falcon
bsp: conf: machine: add ti-falcon.inc
bsp: u-boot: deploy tispl_falcon.bin to rootfs

 meta-ti-bsp/conf/machine/am62axx-evm-k3r5.conf   |  2 ++
 meta-ti-bsp/conf/machine/am62pxx-evm-k3r5.conf   |  2 ++
 meta-ti-bsp/conf/machine/am62xx-evm-k3r5.conf    |  2 ++
 meta-ti-bsp/conf/machine/am62xx-lp-evm-k3r5.conf |  2 ++
 meta-ti-bsp/conf/machine/include/k3.inc          |  5 +++++
 meta-ti-bsp/conf/machine/include/ti-falcon.inc   |  6 ++++++
 meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc     | 11 +++++++++++
 7 files changed, 30 insertions(+)
 create mode 100644 meta-ti-bsp/conf/machine/include/ti-falcon.inc
#1 lore raw

PATCH v2 1/3 am62: apply u-boot config fragment on ti-falcon

The am62x_r5_falcon.config fragment in u-boot enables falcon boot support for R5 SPL, this patch enables the config fragment for am62a, 62p, 62x and 62lp evms based on ti-falcon distro override.

---
 meta-ti-bsp/conf/machine/am62axx-evm-k3r5.conf   | 2 ++
 meta-ti-bsp/conf/machine/am62pxx-evm-k3r5.conf   | 2 ++
 meta-ti-bsp/conf/machine/am62xx-evm-k3r5.conf    | 2 ++
 meta-ti-bsp/conf/machine/am62xx-lp-evm-k3r5.conf | 2 ++
 4 files changed, 8 insertions(+)
meta-ti-bsp/conf/machine/am62axx-evm-k3r5.conf +2 -0
index 2af3317e..ab14feef 100644
@@ -9,3 +9,5 @@ SYSFW_CONFIG = "evm"
 SYSFW_SUFFIX = "hs-fs"
 
 UBOOT_MACHINE = "am62ax_evm_r5_defconfig"
+
+UBOOT_CONFIG_FRAGMENTS:ti-falcon = "am62x_r5_falcon.config"
meta-ti-bsp/conf/machine/am62pxx-evm-k3r5.conf +2 -0
index 36915381..849d6625 100644
@@ -10,3 +10,5 @@ SYSFW_CONFIG = "evm"
 SYSFW_SUFFIX = "hs-fs"
 
 UBOOT_MACHINE = "am62px_evm_r5_defconfig"
+
+UBOOT_CONFIG_FRAGMENTS:ti-falcon = "am62x_r5_falcon.config"
meta-ti-bsp/conf/machine/am62xx-evm-k3r5.conf +2 -0
index 548369ca..a624a35d 100644
@@ -10,3 +10,5 @@ SYSFW_CONFIG = "evm"
 SYSFW_SUFFIX = "hs-fs"
 
 UBOOT_MACHINE = "am62x_evm_r5_defconfig"
+
+UBOOT_CONFIG_FRAGMENTS:ti-falcon = "am62x_r5_falcon.config"
meta-ti-bsp/conf/machine/am62xx-lp-evm-k3r5.conf +2 -0
index 52b69a72..851935db 100644
@@ -10,3 +10,5 @@ SYSFW_CONFIG = "evm"
 SYSFW_SUFFIX = "hs-fs"
 
 UBOOT_MACHINE = "am62x_lpsk_r5_defconfig"
+
+UBOOT_CONFIG_FRAGMENTS:ti-falcon = "am62x_r5_falcon.config"
#2 lore raw

PATCH v2 2/3 bsp: conf: machine: add ti-falcon.inc

In reply to Anshul Dalal

ti-falcon.inc configures the following things for enabling falcon boot:

1. Change fitImage class to kernel-fitimage-legacyhs
2. Update kernel and dtb address for falcon boot
3. Disable kernel compression

---
 meta-ti-bsp/conf/machine/include/k3.inc        | 5 +++++
 meta-ti-bsp/conf/machine/include/ti-falcon.inc | 5 +++++
 2 files changed, 10 insertions(+)
 create mode 100644 meta-ti-bsp/conf/machine/include/ti-falcon.inc
meta-ti-bsp/conf/machine/include/k3.inc +5 -0
index ea6a5028..2f8b17ca 100644
@@ -56,3 +56,8 @@ TI_WKS_BOOTLOADER_APPEND ?= ""
 do_image_wic[depends] += "virtual/bootloader:do_deploy"
 
 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS2"
+
+FALCON_INCLUDE = ""
+FALCON_INCLUDE:ti-falcon = "conf/machine/include/ti-falcon.inc"
+
+require ${FALCON_INCLUDE}
meta-ti-bsp/conf/machine/include/ti-falcon.inc new file +5 -0
new file mode 100644
index 00000000..b571c04d
@@ -0,0 +1,5 @@
+KERNEL_CLASSES:remove = "kernel-fitimage"
+KERNEL_CLASSES += "kernel-fitimage-legacyhs"
+UBOOT_DTB_LOADADDRESS = "0x82000000"
+UBOOT_LOADADDRESS = "0x82200000"
+FIT_KERNEL_COMP_ALG = "none"
#3 lore raw

PATCH v2 3/3 bsp: u-boot: deploy tispl_falcon.bin to rootfs

In reply to Anshul Dalal

Falcon boot requires tispl_falcon.bin to be on the same filesystem partition as the fitImage.

This patch creates a new u-boot package called 'u-boot-ti-staging-falcon' that is included in IMAGE_INSTALL when ti-falcon is enabled which allows us to deploy the required files to rootfs.

---
 meta-ti-bsp/conf/machine/include/ti-falcon.inc |  1 +
 meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc   | 11 +++++++++++
 2 files changed, 12 insertions(+)
meta-ti-bsp/conf/machine/include/ti-falcon.inc +1 -0
index b571c04d..9f93c683 100644
@@ -1,3 +1,4 @@
+IMAGE_INSTALL:append = " u-boot-ti-staging-falcon"
 KERNEL_CLASSES:remove = "kernel-fitimage"
 KERNEL_CLASSES += "kernel-fitimage-legacyhs"
 UBOOT_DTB_LOADADDRESS = "0x82000000"
meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc +11 -0
index 41d4abdd..76803ae3 100644
@@ -14,6 +14,8 @@ require u-boot-mergeconfig.inc
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot:"
 
+FILES:${PN}-falcon = "boot/tispl_falcon.bin"
+
 SUMMARY = "u-boot bootloader for TI devices"
 
 LICENSE = "GPL-2.0-or-later"
@@ -373,4 +375,13 @@ do_deploy:append:am62pxx() {
 	install -m 0644 ${S}/tools/logos/ti_logo_414x97_32bpp.bmp.gz ${DEPLOYDIR}
 }
 
+do_install:append:ti-falcon() {
+	install -m 0644 ${B}/tispl_falcon.bin ${D}/boot
+}
+
+PACKAGES:prepend:am62xx-evm = "${PN}-falcon "
+PACKAGES:prepend:am62axx-evm = "${PN}-falcon "
+PACKAGES:prepend:am62pxx-evm = "${PN}-falcon "
+PACKAGES:prepend:am62xx-lp-evm = "${PN}-falcon "
+
 TOOLCHAIN = "gcc"