diff options
author | Denys Dmytriyenko <denys@ti.com> | 2020-05-05 02:41:56 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2020-05-05 05:22:25 +0000 |
commit | f814840465358a6b5429ad20165742ac6e6e6a29 (patch) | |
tree | 7d422cc4b43da9ff25101378375ebc2f2356fd32 /recipes-bsp | |
parent | 79e77ea1cf5b5370162b13f1f78c354d96b7b513 (diff) | |
download | meta-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.bb | 94 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-ti.inc | 1 |
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 @@ | |||
1 | SUMMARY = "TI SCI firmware (SYSFW)" | ||
2 | |||
3 | LICENSE = "TI-TFL" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.ti;md5=b5aebf0668bdf95621259288c4a46d76" | ||
5 | |||
6 | DEPENDS = "openssl-native u-boot-mkimage-native dtc-native" | ||
7 | |||
8 | CLEANBROKEN = "1" | ||
9 | PR = "r0" | ||
10 | |||
11 | # Loaded by R5F core | ||
12 | COMPATIBLE_MACHINE = "k3r5" | ||
13 | COMPATIBLE_MACHINE_aarch64 = "null" | ||
14 | |||
15 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
16 | |||
17 | TI_SECURE_DEV_PKG ?= "" | ||
18 | export TI_SECURE_DEV_PKG | ||
19 | |||
20 | SRCREV = "6b02b1ea07da65a68444e86439ad5b031e9fd5a2" | ||
21 | BRANCH ?= "ti-linux-firmware" | ||
22 | SRCREV_imggen = "79f3807e0b169f2029dec9f3a679c231f4deb625" | ||
23 | SRCREV_FORMAT = "imggen" | ||
24 | |||
25 | SRC_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 | |||
30 | S = "${WORKDIR}/git" | ||
31 | |||
32 | SYSFW_SOC ?= "unknown" | ||
33 | SYSFW_CONFIG ?= "unknown" | ||
34 | |||
35 | SYSFW_PREFIX = "ti-sci-firmware" | ||
36 | SYSFW_SUFFIX ?= "unknown" | ||
37 | |||
38 | SYSFW_BASE = "${SYSFW_PREFIX}-${SYSFW_SOC}-${SYSFW_SUFFIX}" | ||
39 | |||
40 | SYSFW_TISCI = "${S}/ti-sysfw/${SYSFW_BASE}*.bin" | ||
41 | |||
42 | SYSFW_BINARY = "sysfw-${SYSFW_SOC}-${SYSFW_CONFIG}.itb" | ||
43 | SYSFW_VBINARY = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_CONFIG}.itb" | ||
44 | SYSFW_IMAGE = "sysfw-${SYSFW_SOC}-${SYSFW_CONFIG}.itb" | ||
45 | SYSFW_SYMLINK ?= "sysfw.itb" | ||
46 | |||
47 | CFLAGS[unexport] = "1" | ||
48 | LDFLAGS[unexport] = "1" | ||
49 | AS[unexport] = "1" | ||
50 | LD[unexport] = "1" | ||
51 | |||
52 | do_configure[noexec] = "1" | ||
53 | |||
54 | EXTRA_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 | " | ||
58 | EXTRA_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 | " | ||
61 | EXTRA_OEMAKE_append = "${@['',' ${EXTRA_OEMAKE_HS}']['${SYSFW_SUFFIX}' == 'hs']}" | ||
62 | |||
63 | do_compile() { | ||
64 | cd ${WORKDIR}/imggen/ | ||
65 | oe_runmake | ||
66 | } | ||
67 | |||
68 | do_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 | |||
77 | FILES_${PN} = "/boot" | ||
78 | |||
79 | inherit deploy | ||
80 | |||
81 | do_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 | |||
94 | addtask 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 | |||
57 | SPL_UART_BINARY = "u-boot-spl.bin" | 57 | SPL_UART_BINARY = "u-boot-spl.bin" |
58 | SPL_UART_BINARY_keystone = "" | 58 | SPL_UART_BINARY_keystone = "" |
59 | SPL_UART_BINARY_k3 = "" | 59 | SPL_UART_BINARY_k3 = "" |
60 | SPL_UART_BINARY_k3r5 = "" | ||
60 | SPL_UART_BINARY_lego-ev3 = "" | 61 | SPL_UART_BINARY_lego-ev3 = "" |
61 | 62 | ||
62 | SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" | 63 | SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" |