summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Liu <liu.ming50@gmail.com>2022-06-27 18:20:23 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2022-06-28 14:33:30 +0000
commit79b65da183feebd2d86dfbe256699a9e0a4c3d57 (patch)
tree07371a3dfeef98998af31212a953b2752882d62c
parent5b4530195c7d21104255e512a1f3115c28bf09cc (diff)
downloadmeta-freescale-79b65da183feebd2d86dfbe256699a9e0a4c3d57.tar.gz
firmware-imx: create symbolic links for CODA VPU firmwares
Create symbolic links in ${nonarch_base_libdir}/firmware for CODA VPU firmwares, otherwise CODA driver could not load them directly in probe function and hence fallback firmware loading being triggered, which is usually 40-60 seconds later after system boots up. Signed-off-by: Ming Liu <liu.ming50@gmail.com> (cherry picked from commit 8ba9c05e75e00fc025551d43cca9ddd3ca27c1c8)
-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() {
65# which contains only files that matches the pattern. 65# which contains only files that matches the pattern.
66# 66#
67python populate_packages:prepend() { 67python populate_packages:prepend() {
68 # CODA driver tries to locate VPU firmwares directly in ${nonarch_base_libdir}/firmware, to
69 # avoid fallback loading which is usually 40-60 seconds later after system boots up, let's
70 # create symbolic links in ${nonarch_base_libdir}/firmware for VPU firmwares.
71 def coda_vpu_links(file, pkg, pattern, format, basename):
72 # Only CODA VPU firmwares need this procedure
73 if 'imx8' in basename:
74 return
75
76 dir = os.path.dirname(file)
77 dir = os.path.abspath(os.path.join(dir, os.pardir))
78 cwd = os.getcwd()
79
80 os.chdir(dir)
81
82 name = os.path.basename(file)
83 os.symlink(os.path.join("vpu", name), name)
84
85 oldfiles = d.getVar('FILES:' + pkg)
86 newfile = os.path.join(d.getVar('nonarch_base_libdir'), "firmware", name)
87 d.setVar('FILES:' + pkg, oldfiles + " " + newfile)
88
89 os.chdir(cwd)
90
68 easrcdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/easrc', d) 91 easrcdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/easrc', d)
69 do_split_packages(d, easrcdir, '^easrc-([^_]*).*\.bin', 92 do_split_packages(d, easrcdir, '^easrc-([^_]*).*\.bin',
70 output_pattern='firmware-imx-easrc-%s', 93 output_pattern='firmware-imx-easrc-%s',
@@ -76,6 +99,7 @@ python populate_packages:prepend() {
76 do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin', 99 do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin',
77 output_pattern='firmware-imx-vpu-%s', 100 output_pattern='firmware-imx-vpu-%s',
78 description='Freescale IMX VPU Firmware [%s]', 101 description='Freescale IMX VPU Firmware [%s]',
102 hook=coda_vpu_links,
79 extra_depends='', 103 extra_depends='',
80 prepend=True) 104 prepend=True)
81 105