diff options
author | Andrew Davis <afd@ti.com> | 2022-11-04 22:46:04 +0000 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2022-11-10 08:21:37 -0600 |
commit | 037dc07e91322a2507df35c7364597bfcc90a67c (patch) | |
tree | b3f65940f51bdaba6f995042f3b6bc2d12b7bf52 /meta-ti-bsp/recipes-bsp | |
parent | b29342ab888a7a97f5e70531b74818a2e8394503 (diff) | |
download | meta-ti-037dc07e91322a2507df35c7364597bfcc90a67c.tar.gz |
ti-sci-fw: Use new SOC_TYPE and SYSFW_DIR to simplify recipe
The k3-image-gen now has two new helper flags SOC_TYPE and SYSFW_DIR
that we can use to simplify this recipe. With these we do not need to do
anything different here for HS builds, the SOC_TYPE selects this now.
DL_URL also do not need cleared anymore, the k3-image-gen will no longer
download missing files when not needed for the current build type.
do_install and do_deploy can also check for the existence of either
sysfw.itb or tiboot3.bin and install/deploy as needed. k3-image-gen only
gerneates the right one now depending on the SoC. Merge all these
steps for all SoCs.
Signed-off-by: Andrew Davis <afd@ti.com>
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp/recipes-bsp')
-rw-r--r-- | meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc | 2 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 147 |
2 files changed, 28 insertions, 121 deletions
diff --git a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc index 6f451439..be714b36 100644 --- a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc +++ b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc | |||
@@ -25,7 +25,7 @@ SRCREV = "${TI_LINUX_FW_SRCREV}" | |||
25 | 25 | ||
26 | BRANCH ?= "ti-linux-firmware" | 26 | BRANCH ?= "ti-linux-firmware" |
27 | 27 | ||
28 | K3_IMAGE_GEN_SRCREV ?= "85a70059fc24242ea03653a5014b98100e4da2d6" | 28 | K3_IMAGE_GEN_SRCREV ?= "91a75b17c616a5cc41b3345905dccba5c29aca66" |
29 | SRCREV_imggen = "${K3_IMAGE_GEN_SRCREV}" | 29 | SRCREV_imggen = "${K3_IMAGE_GEN_SRCREV}" |
30 | SRCREV_FORMAT = "imggen" | 30 | SRCREV_FORMAT = "imggen" |
31 | 31 | ||
diff --git a/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb index 6a381447..64c71292 100644 --- a/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +++ b/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | |||
@@ -54,13 +54,9 @@ LD[unexport] = "1" | |||
54 | do_configure[noexec] = "1" | 54 | do_configure[noexec] = "1" |
55 | 55 | ||
56 | EXTRA_OEMAKE = "\ | 56 | EXTRA_OEMAKE = "\ |
57 | CROSS_COMPILE=${TARGET_PREFIX} SYSFW_DL_URL='' SYSFW_HS_DL_URL='' SYSFW_HS_INNER_CERT_DL_URL='' \ | 57 | CROSS_COMPILE=${TARGET_PREFIX} SOC=${SYSFW_SOC} SOC_TYPE=${SYSFW_SUFFIX} \ |
58 | SYSFW_PATH="${SYSFW_TISCI}" SOC=${SYSFW_SOC} CONFIG=${SYSFW_CONFIG} \ | 58 | CONFIG=${SYSFW_CONFIG} SYSFW_DIR="${S}/ti-sysfw" \ |
59 | " | 59 | " |
60 | EXTRA_OEMAKE_HS = " \ | ||
61 | HS=1 SW_REV=1 SYSFW_HS_PATH="${S}/ti-sysfw/${SYSFW_BASE}-enc.bin" SYSFW_HS_INNER_CERT_PATH="${S}/ti-sysfw/${SYSFW_BASE}-cert.bin" \ | ||
62 | " | ||
63 | EXTRA_OEMAKE:append = "${@['',' ${EXTRA_OEMAKE_HS}']['${SYSFW_SUFFIX}' == 'hs']}" | ||
64 | 60 | ||
65 | EXTRA_OEMAKE:append:j7200-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" | 61 | EXTRA_OEMAKE:append:j7200-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" |
66 | EXTRA_OEMAKE:append:j7200-hs-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" | 62 | EXTRA_OEMAKE:append:j7200-hs-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" |
@@ -77,10 +73,19 @@ do_compile() { | |||
77 | 73 | ||
78 | do_install() { | 74 | do_install() { |
79 | install -d ${D}/boot | 75 | install -d ${D}/boot |
80 | install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${D}/boot/${SYSFW_VBINARY} | 76 | |
81 | ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_IMAGE} | 77 | if [ -f "${WORKDIR}/imggen/${SYSFW_BINARY}" ]; then |
82 | if [ ! -z "${SYSFW_SYMLINK}" ]; then | 78 | install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${D}/boot/${SYSFW_VBINARY} |
83 | ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_SYMLINK} | 79 | ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_IMAGE} |
80 | if [ ! -z "${SYSFW_SYMLINK}" ]; then | ||
81 | ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_SYMLINK} | ||
82 | fi | ||
83 | fi | ||
84 | |||
85 | if [ -f "${WORKDIR}/imggen/${UBOOT_BINARY}" ]; then | ||
86 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} | ||
87 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} | ||
88 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} | ||
84 | fi | 89 | fi |
85 | } | 90 | } |
86 | 91 | ||
@@ -90,119 +95,21 @@ inherit deploy | |||
90 | 95 | ||
91 | do_deploy () { | 96 | do_deploy () { |
92 | install -d ${DEPLOYDIR} | 97 | install -d ${DEPLOYDIR} |
93 | install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${DEPLOYDIR}/${SYSFW_VBINARY} | ||
94 | rm -f ${DEPLOYDIR}/${SYSFW_IMAGE} | ||
95 | ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_IMAGE} | ||
96 | if [ ! -z "${SYSFW_SYMLINK}" ]; then | ||
97 | rm -f ${DEPLOYDIR}/${SYSFW_SYMLINK} | ||
98 | ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_SYMLINK} | ||
99 | fi | ||
100 | |||
101 | install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/ | ||
102 | } | ||
103 | |||
104 | do_install:j7200-evm-k3r5() { | ||
105 | install -d ${D}/boot | ||
106 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} | ||
107 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} | ||
108 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} | ||
109 | } | ||
110 | |||
111 | do_deploy:j7200-evm-k3r5() { | ||
112 | install -d ${DEPLOYDIR} | ||
113 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} | ||
114 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} | ||
115 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} | ||
116 | install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/ | ||
117 | } | ||
118 | |||
119 | do_install:j7200-hs-evm-k3r5() { | ||
120 | install -d ${D}/boot | ||
121 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} | ||
122 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} | ||
123 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} | ||
124 | } | ||
125 | |||
126 | do_deploy:j7200-hs-evm-k3r5() { | ||
127 | install -d ${DEPLOYDIR} | ||
128 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} | ||
129 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} | ||
130 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} | ||
131 | install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/ | ||
132 | } | ||
133 | |||
134 | do_install:j721s2-evm-k3r5() { | ||
135 | install -d ${D}/boot | ||
136 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} | ||
137 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} | ||
138 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} | ||
139 | } | ||
140 | |||
141 | do_deploy:j721s2-evm-k3r5() { | ||
142 | install -d ${DEPLOYDIR} | ||
143 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} | ||
144 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} | ||
145 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} | ||
146 | install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/ | ||
147 | } | ||
148 | |||
149 | do_install:j721s2-hs-evm-k3r5() { | ||
150 | install -d ${D}/boot | ||
151 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} | ||
152 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} | ||
153 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} | ||
154 | } | ||
155 | |||
156 | do_deploy:j721s2-hs-evm-k3r5() { | ||
157 | install -d ${DEPLOYDIR} | ||
158 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} | ||
159 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} | ||
160 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} | ||
161 | install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/ | ||
162 | } | ||
163 | 98 | ||
164 | do_install:am64xx-evm-k3r5() { | 99 | if [ -f "${WORKDIR}/imggen/${SYSFW_BINARY}" ]; then |
165 | install -d ${D}/boot | 100 | install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${DEPLOYDIR}/${SYSFW_VBINARY} |
166 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} | 101 | ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_IMAGE} |
167 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} | 102 | if [ ! -z "${SYSFW_SYMLINK}" ]; then |
168 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} | 103 | ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_SYMLINK} |
169 | } | 104 | fi |
170 | 105 | fi | |
171 | do_deploy:am64xx-evm-k3r5() { | ||
172 | install -d ${DEPLOYDIR} | ||
173 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} | ||
174 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} | ||
175 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} | ||
176 | install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/ | ||
177 | } | ||
178 | |||
179 | do_install:am64xx-hs-evm-k3r5() { | ||
180 | install -d ${D}/boot | ||
181 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} | ||
182 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} | ||
183 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} | ||
184 | } | ||
185 | |||
186 | do_deploy:am64xx-hs-evm-k3r5() { | ||
187 | install -d ${DEPLOYDIR} | ||
188 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} | ||
189 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} | ||
190 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} | ||
191 | install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/ | ||
192 | } | ||
193 | 106 | ||
194 | do_install:am62xx-evm-k3r5() { | 107 | if [ -f "${WORKDIR}/imggen/${UBOOT_BINARY}" ]; then |
195 | install -d ${D}/boot | 108 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} |
196 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} | 109 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} |
197 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} | 110 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} |
198 | ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} | 111 | fi |
199 | } | ||
200 | 112 | ||
201 | do_deploy:am62xx-evm-k3r5() { | ||
202 | install -d ${DEPLOYDIR} | ||
203 | install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} | ||
204 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} | ||
205 | ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} | ||
206 | install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/ | 113 | install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/ |
207 | } | 114 | } |
208 | 115 | ||