summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/imx-codec/imx-codec_4.9.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/imx-codec/imx-codec_4.9.3.bb')
-rw-r--r--recipes-multimedia/imx-codec/imx-codec_4.9.3.bb124
1 files changed, 124 insertions, 0 deletions
diff --git a/recipes-multimedia/imx-codec/imx-codec_4.9.3.bb b/recipes-multimedia/imx-codec/imx-codec_4.9.3.bb
new file mode 100644
index 00000000..b435dacd
--- /dev/null
+++ b/recipes-multimedia/imx-codec/imx-codec_4.9.3.bb
@@ -0,0 +1,124 @@
1# Copyright (C) 2012-2016 Freescale Semiconductor
2# Copyright (C) 2017-2024 NXP
3# Copyright 2018 (C) O.S. Systems Software LTDA.
4# Released under the MIT license (see COPYING.MIT for the terms)
5
6DESCRIPTION = "Freescale Multimedia codec libs"
7LICENSE = "Proprietary"
8SECTION = "multimedia"
9LIC_FILES_CHKSUM = "file://COPYING;md5=c0fb372b5d7f12181de23ef480f225f3"
10
11# Backward compatibility
12PROVIDES += "libfslcodec"
13
14SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true"
15SRC_URI[sha256sum] = "61b40623e1c2322f1ba85da57ab6949f749d02b3b5cbc2b1ef583a99b59e8968"
16IMX_SRCREV_ABBREV = "394336b"
17
18inherit fsl-eula-unpack autotools pkgconfig
19
20S = "${WORKDIR}/${BPN}-${PV}-${IMX_SRCREV_ABBREV}"
21
22PACKAGECONFIG ??= "${PACKAGECONFIG_VPU}"
23# Support Chips&Media VPU only
24PACKAGECONFIG_VPU = ""
25PACKAGECONFIG_VPU:mx6q-nxp-bsp = "vpu"
26PACKAGECONFIG_VPU:mx6dl-nxp-bsp = "vpu"
27PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,virtual/imxvpu"
28
29# Choose between 32-bit and 64-bit binaries and between Soft Float-Point and Hard Float-Point
30EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', \
31 bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d), d)}"
32
33do_install:append() {
34 # LTIB move the files around or gst-fsl-plugin won't find them
35 for p in $(find ${D}${libdir}/imx-mm -mindepth 2 -maxdepth 2 -not -type d); do
36 mv $p ${D}${libdir}
37 done
38 rmdir ${D}${libdir}/imx-mm/video-codec
39
40 # Fixup ownership of files
41 chown -R root:root ${D}
42}
43
44python __set_insane_skip() {
45 # Ensure we have PACKAGES expanded
46 bb.build.exec_func("read_subpackage_metadata", d)
47
48 for p in d.getVar('PACKAGES').split():
49 # Even though we are packaging libraries those are plugins so we
50 # shouldn't rename the packages to follow its sonames.
51 d.setVar("DEBIAN_NOAUTONAME:%s" % p, "1")
52
53 # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have
54 # the source we cannot fix it. Disable the insane check for now.
55 if p == 'imx-codec-test-bin':
56 # FIXME: includes the DUT .so files so we need to deploy those
57 d.setVar("INSANE_SKIP:%s" % p, "ldflags textrel libdir")
58 else:
59 d.setVar("INSANE_SKIP:%s" % p, "ldflags textrel")
60}
61
62do_package_qa[prefuncs] += "__set_insane_skip"
63
64python __split_libfslcodec_plugins() {
65 codecdir = bb.data.expand('${libdir}', d)
66 do_split_packages(d, codecdir, r'^lib_([^_]*).*_arm.*_elinux\.so\..*',
67 aux_files_pattern='${libdir}/imx-mm/audio-codec/wrap/lib_%sd_wrap_arm*_elinux.so.*',
68 output_pattern='imx-codec-%s',
69 description='Freescale i.MX Codec (%s)',
70 extra_depends='')
71 pkgs = d.getVar('PACKAGES').split()
72 for pkg in pkgs:
73 meta = pkg[10:]
74 if meta != '':
75 d.setVar('RREPLACES:%s' % pkg, ' libfslcodec-%s' % meta)
76 d.setVar('RPROVIDES:%s' % pkg, ' libfslcodec-%s' % meta)
77 d.setVar('RCONFLICTS:%s' % pkg, ' libfslcodec-%s' % meta)
78 else :
79 d.setVar('RREPLACES:%s' % pkg, ' libfslcodec')
80 d.setVar('RPROVIDES:%s' % pkg, ' libfslcodec')
81 d.setVar('RCONFLICTS:%s' % pkg, ' libfslcodec')
82}
83
84python __set_metapkg_rdepends() {
85 # Allow addition of all codecs in a image; useful specially for
86 # debugging.
87 codec_pkgs = oe.utils.packages_filter_out_system(d)
88 codec_pkgs = filter(lambda x: x not in ['imx-codec-test-bin', 'imx-codec-test-source'],
89 codec_pkgs)
90 d.appendVar('RDEPENDS:imx-codec-meta', ' ' + ' '.join(codec_pkgs))
91}
92
93PACKAGESPLITFUNCS =+ "__split_libfslcodec_plugins __set_metapkg_rdepends"
94
95# We need to ensure we don't have '-src' package overrided
96PACKAGE_DEBUG_SPLIT_STYLE = 'debug-without-src'
97
98PACKAGES_DYNAMIC = "${PN}-*"
99INHIBIT_PACKAGE_STRIP = "1"
100INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
101
102PACKAGES += "${PN}-meta ${PN}-test-bin ${PN}-test-source"
103
104ALLOW_EMPTY:${PN} = "1"
105ALLOW_EMPTY:${PN}-meta = "1"
106
107# Ensure we get warnings if we miss something
108FILES:${PN} = ""
109
110FILES:${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \
111 ${libdir}/imx-mm/*/*/*${SOLIBSDEV} \
112 ${libdir}/pkgconfig/*.pc ${includedir}/imx-mm/*"
113
114FILES:${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin"
115
116FILES:${PN}-test-source += "${datadir}/imx-mm/*"
117
118# FIXME: The wrap and lib names does not match
119FILES:${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*"
120FILES:${PN}-nb += "${libdir}/imx-mm/audio-codec/wrap/lib_nbamrd_wrap_arm*_elinux.so.*"
121FILES:${PN}-wb += "${libdir}/imx-mm/audio-codec/wrap/lib_wbamrd_wrap_arm*_elinux.so.*"
122
123PACKAGE_ARCH = "${MACHINE_SOCARCH}"
124COMPATIBLE_MACHINE = "(imx-nxp-bsp)"