summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2020-05-05 02:41:56 +0000
committerDenys Dmytriyenko <denys@ti.com>2020-05-05 05:22:25 +0000
commitf814840465358a6b5429ad20165742ac6e6e6a29 (patch)
tree7d422cc4b43da9ff25101378375ebc2f2356fd32 /recipes-bsp
parent79e77ea1cf5b5370162b13f1f78c354d96b7b513 (diff)
downloadmeta-ti-f814840465358a6b5429ad20165742ac6e6e6a29.tar.gz
conf, recipes-bsp: support building for K3 R5F cores via multiconfig
K3 Multicore SoC architecture defines different functional domains, each containing specific processing cores and peripherals. Early boot is normally handled by running bootloader and loading SYSFW on MCU Cortex-R5F core: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/board/ti/am65x/README https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/board/ti/j721e/README This change adds support for building bootloader and SYSFW ITB image for K3 Cortex-R5F cores via multiconfig. Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04.bb94
-rw-r--r--recipes-bsp/u-boot/u-boot-ti.inc1
2 files changed, 95 insertions, 0 deletions
diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04.bb b/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04.bb
new file mode 100644
index 00000000..b17147a4
--- /dev/null
+++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04.bb
@@ -0,0 +1,94 @@
1SUMMARY = "TI SCI firmware (SYSFW)"
2
3LICENSE = "TI-TFL"
4LIC_FILES_CHKSUM = "file://LICENSE.ti;md5=b5aebf0668bdf95621259288c4a46d76"
5
6DEPENDS = "openssl-native u-boot-mkimage-native dtc-native"
7
8CLEANBROKEN = "1"
9PR = "r0"
10
11# Loaded by R5F core
12COMPATIBLE_MACHINE = "k3r5"
13COMPATIBLE_MACHINE_aarch64 = "null"
14
15PACKAGE_ARCH = "${MACHINE_ARCH}"
16
17TI_SECURE_DEV_PKG ?= ""
18export TI_SECURE_DEV_PKG
19
20SRCREV = "6b02b1ea07da65a68444e86439ad5b031e9fd5a2"
21BRANCH ?= "ti-linux-firmware"
22SRCREV_imggen = "79f3807e0b169f2029dec9f3a679c231f4deb625"
23SRCREV_FORMAT = "imggen"
24
25SRC_URI = " \
26 git://git.ti.com/processor-firmware/ti-linux-firmware.git;protocol=git;branch=${BRANCH} \
27 git://git.ti.com/k3-image-gen/k3-image-gen.git;protocol=git;branch=master;destsuffix=imggen;name=imggen \
28"
29
30S = "${WORKDIR}/git"
31
32SYSFW_SOC ?= "unknown"
33SYSFW_CONFIG ?= "unknown"
34
35SYSFW_PREFIX = "ti-sci-firmware"
36SYSFW_SUFFIX ?= "unknown"
37
38SYSFW_BASE = "${SYSFW_PREFIX}-${SYSFW_SOC}-${SYSFW_SUFFIX}"
39
40SYSFW_TISCI = "${S}/ti-sysfw/${SYSFW_BASE}*.bin"
41
42SYSFW_BINARY = "sysfw-${SYSFW_SOC}-${SYSFW_CONFIG}.itb"
43SYSFW_VBINARY = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_CONFIG}.itb"
44SYSFW_IMAGE = "sysfw-${SYSFW_SOC}-${SYSFW_CONFIG}.itb"
45SYSFW_SYMLINK ?= "sysfw.itb"
46
47CFLAGS[unexport] = "1"
48LDFLAGS[unexport] = "1"
49AS[unexport] = "1"
50LD[unexport] = "1"
51
52do_configure[noexec] = "1"
53
54EXTRA_OEMAKE = "\
55 CROSS_COMPILE=${TARGET_PREFIX} SYSFW_DL_URL='' SYSFW_HS_DL_URL='' SYSFW_HS_INNER_CERT_DL_URL='' \
56 SYSFW_PATH="${SYSFW_TISCI}" SOC=${SYSFW_SOC} CONFIG=${SYSFW_CONFIG} \
57"
58EXTRA_OEMAKE_HS = " \
59 HS=1 SYSFW_HS_PATH="${S}/ti-sysfw/${SYSFW_BASE}-enc.bin" SYSFW_HS_INNER_CERT_PATH="${S}/ti-sysfw/${SYSFW_BASE}-cert.bin" \
60"
61EXTRA_OEMAKE_append = "${@['',' ${EXTRA_OEMAKE_HS}']['${SYSFW_SUFFIX}' == 'hs']}"
62
63do_compile() {
64 cd ${WORKDIR}/imggen/
65 oe_runmake
66}
67
68do_install() {
69 install -d ${D}/boot
70 install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${D}/boot/${SYSFW_VBINARY}
71 ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_IMAGE}
72 if [ ! -z "${SYSFW_SYMLINK}" ]; then
73 ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_SYMLINK}
74 fi
75}
76
77FILES_${PN} = "/boot"
78
79inherit deploy
80
81do_deploy () {
82 install -d ${DEPLOYDIR}
83 install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${DEPLOYDIR}/${SYSFW_VBINARY}
84 rm -f ${DEPLOYDIR}/${SYSFW_IMAGE}
85 ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_IMAGE}
86 if [ ! -z "${SYSFW_SYMLINK}" ]; then
87 rm -f ${DEPLOYDIR}/${SYSFW_SYMLINK}
88 ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_SYMLINK}
89 fi
90
91 install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
92}
93
94addtask deploy before do_build after do_compile
diff --git a/recipes-bsp/u-boot/u-boot-ti.inc b/recipes-bsp/u-boot/u-boot-ti.inc
index 04ff559d..8f8f0afe 100644
--- a/recipes-bsp/u-boot/u-boot-ti.inc
+++ b/recipes-bsp/u-boot/u-boot-ti.inc
@@ -57,6 +57,7 @@ export TI_SECURE_DEV_PKG
57SPL_UART_BINARY = "u-boot-spl.bin" 57SPL_UART_BINARY = "u-boot-spl.bin"
58SPL_UART_BINARY_keystone = "" 58SPL_UART_BINARY_keystone = ""
59SPL_UART_BINARY_k3 = "" 59SPL_UART_BINARY_k3 = ""
60SPL_UART_BINARY_k3r5 = ""
60SPL_UART_BINARY_lego-ev3 = "" 61SPL_UART_BINARY_lego-ev3 = ""
61 62
62SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" 63SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"