aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2022-06-28 11:33:54 -0300
committerGitHub <noreply@github.com>2022-06-28 11:33:54 -0300
commit270f0f6f046187036716aedcae0636011172b447 (patch)
tree07371a3dfeef98998af31212a953b2752882d62c
parent5b4530195c7d21104255e512a1f3115c28bf09cc (diff)
parent79b65da183feebd2d86dfbe256699a9e0a4c3d57 (diff)
downloadmeta-freescale-270f0f6f046187036716aedcae0636011172b447.tar.gz
meta-freescale-270f0f6f046187036716aedcae0636011172b447.tar.bz2
meta-freescale-270f0f6f046187036716aedcae0636011172b447.zip
Merge pull request #1125 from Freescale/backport-1124-to-kirkstone
[Backport kirkstone] firmware-imx: create symbolic links for CODA VPU firmwares
-rw-r--r--recipes-bsp/firmware-imx/firmware-imx_8.15.bb24
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes-bsp/firmware-imx/firmware-imx_8.15.bb b/recipes-bsp/firmware-imx/firmware-imx_8.15.bb
index cfc98a73..f84ea1fa 100644
--- a/recipes-bsp/firmware-imx/firmware-imx_8.15.bb
+++ b/recipes-bsp/firmware-imx/firmware-imx_8.15.bb
@@ -65,6 +65,29 @@ do_install() {
# which contains only files that matches the pattern.
#
python populate_packages:prepend() {
+ # CODA driver tries to locate VPU firmwares directly in ${nonarch_base_libdir}/firmware, to
+ # avoid fallback loading which is usually 40-60 seconds later after system boots up, let's
+ # create symbolic links in ${nonarch_base_libdir}/firmware for VPU firmwares.
+ def coda_vpu_links(file, pkg, pattern, format, basename):
+ # Only CODA VPU firmwares need this procedure
+ if 'imx8' in basename:
+ return
+
+ dir = os.path.dirname(file)
+ dir = os.path.abspath(os.path.join(dir, os.pardir))
+ cwd = os.getcwd()
+
+ os.chdir(dir)
+
+ name = os.path.basename(file)
+ os.symlink(os.path.join("vpu", name), name)
+
+ oldfiles = d.getVar('FILES:' + pkg)
+ newfile = os.path.join(d.getVar('nonarch_base_libdir'), "firmware", name)
+ d.setVar('FILES:' + pkg, oldfiles + " " + newfile)
+
+ os.chdir(cwd)
+
easrcdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/easrc', d)
do_split_packages(d, easrcdir, '^easrc-([^_]*).*\.bin',
output_pattern='firmware-imx-easrc-%s',
@@ -76,6 +99,7 @@ python populate_packages:prepend() {
do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin',
output_pattern='firmware-imx-vpu-%s',
description='Freescale IMX VPU Firmware [%s]',
+ hook=coda_vpu_links,
extra_depends='',
prepend=True)