From 3b925885fb7b2d743df0a6883fc6f1aeb1d197a4 Mon Sep 17 00:00:00 2001 From: Pablo Rodriguez Quesada Date: Thu, 18 Jul 2024 21:30:56 +0200 Subject: [PATCH] container-runtime-csv: add CONTAINER_CSV_LIB_PATH The CONTAINER_CSV_LIB_PATH variable that enables the change of the library path. This is to match the changes in https://github.com/OE4T/meta-tegra/pull/1194 and use the pass-through tree for libraries that need to be provided from the NVIDIA prebuilt packages. Signed-off-by: Pablo Rodriguez Quesada --- classes/container-runtime-csv.bbclass | 10 +++++++++- .../recipes-multimedia/v4l2apps/v4l-utils_%.bbappend | 1 + .../gstreamer1.0-plugins-tegra-binaryonly_32.7.5.bb | 2 ++ .../gstreamer/gstreamer1.0-omx-tegra_1.0.0-r32.7.5.bb | 2 ++ ...reamer1.0-plugins-nvarguscamerasrc_1.0.0-r32.7.5.bb | 2 ++ .../gstreamer/gstreamer1.0-plugins-nvcompositor.inc | 2 ++ ...treamer1.0-plugins-nvdrmvideosink_1.14.0-r32.7.5.bb | 2 ++ .../gstreamer1.0-plugins-nveglgles_1.2.3-r32.7.5.bb | 2 ++ .../gstreamer1.0-plugins-nvjpeg_1.14.0-r32.7.5.bb | 2 ++ .../gstreamer1.0-plugins-nvtee_1.14.0-r32.7.5.bb | 2 ++ ...reamer1.0-plugins-nvv4l2camerasrc_1.14.0-r32.7.5.bb | 2 ++ .../gstreamer/gstreamer1.0-plugins-nvvidconv.inc | 2 ++ ...treamer1.0-plugins-nvvideo4linux2_1.14.0-r32.7.5.bb | 2 ++ ...gstreamer1.0-plugins-nvvideosinks_1.14.0-r32.7.5.bb | 2 ++ recipes-multimedia/libv4l2/libv4l2-minimal_1.18.0.bb | 1 + .../libv4l2/libv4l2-nvvidconv-wrapper_git.bb | 2 ++ 16 files changed, 37 insertions(+), 1 deletion(-) diff --git a/classes/container-runtime-csv.bbclass b/classes/container-runtime-csv.bbclass index d72647514752..442222e81b59 100644 --- a/classes/container-runtime-csv.bbclass +++ b/classes/container-runtime-csv.bbclass @@ -48,7 +48,15 @@ python populate_container_csv() { else: bb.warn("Unrecognized file type for container CSV: {}".format(entry)) continue - csvlines.append("{}, /{}".format(csvtype, entry)) + entry = "/" + entry + # CONTAINER_CSV_LIB_PATH can be set to /usr/lib/aarch64-linux-gnu/ to avoid glibc version mismatch + # See the l4t.csv file at https://github.com/OE4T/meta-tegra/pull/1194 + # It's done differently because in this version of the code the csv file is generated and not statically defined + custom_lib_path = d.getVar('CONTAINER_CSV_LIB_PATH') + if custom_lib_path: + if entry.startswith('/usr/lib/') and not entry.startswith(custom_lib_path): + entry = entry.replace('/usr/lib/', custom_lib_path) + csvlines.append("{}, {}".format(csvtype, entry)) os.chdir(oldcwd) csvfiledir = os.path.join(root, d.getVar('sysconfdir')[1:], 'nvidia-container-runtime', diff --git a/external/openembedded-layer/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend b/external/openembedded-layer/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend index ab5a24947d17..762bb60ff0ba 100644 --- a/external/openembedded-layer/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend +++ b/external/openembedded-layer/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend @@ -23,6 +23,7 @@ TEGRA_PLUGINS:tegra = "tegra-libraries-multimedia-v4l" RRECOMMENDS:libv4l += "${TEGRA_PLUGINS}" CONTAINER_CSV_BASENAME = "libv4l" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" CONTAINER_CSV_FILES = "${libdir}/*.so* ${libdir}/libv4l/ov* ${libdir}/libv4l/*.so" # These files aren't in nvidia host-files-for-container.d/l4t.csv and conflict with attempts # to install v4l-utils inside the container (Invalid cross-device link) diff --git a/recipes-bsp/tegra-binaries/gstreamer1.0-plugins-tegra-binaryonly_32.7.5.bb b/recipes-bsp/tegra-binaries/gstreamer1.0-plugins-tegra-binaryonly_32.7.5.bb index e94abdf4a42f..16c4657c2758 100644 --- a/recipes-bsp/tegra-binaries/gstreamer1.0-plugins-tegra-binaryonly_32.7.5.bb +++ b/recipes-bsp/tegra-binaries/gstreamer1.0-plugins-tegra-binaryonly_32.7.5.bb @@ -48,6 +48,8 @@ do_install() { rm -f ${D}${libdir}/gstreamer-1.0/libgstnvvidconv* } +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/*.so* ${libdir}/gstreamer-1.0/*.so*" FILES_SOLIBSDEV = "" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx-tegra_1.0.0-r32.7.5.bb b/recipes-multimedia/gstreamer/gstreamer1.0-omx-tegra_1.0.0-r32.7.5.bb index 0d9acb72ad65..b82ba976e338 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-omx-tegra_1.0.0-r32.7.5.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx-tegra_1.0.0-r32.7.5.bb @@ -33,6 +33,8 @@ inherit autotools pkgconfig gettext container-runtime-csv features_check REQUIRED_DISTRO_FEATURES = "opengl" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/gstreamer-1.0/*.so*" do_configure:append() { diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvarguscamerasrc_1.0.0-r32.7.5.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvarguscamerasrc_1.0.0-r32.7.5.bb index fb7bda84fd18..fe8c4bf6f2e1 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvarguscamerasrc_1.0.0-r32.7.5.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvarguscamerasrc_1.0.0-r32.7.5.bb @@ -23,6 +23,8 @@ inherit pkgconfig container-runtime-csv features_check REQUIRED_DISTRO_FEATURES = "opengl" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/gstreamer-1.0/*.so*" do_install() { diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvcompositor.inc b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvcompositor.inc index 729a62a4a0ee..bf9ccf812838 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvcompositor.inc +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvcompositor.inc @@ -18,6 +18,8 @@ inherit pkgconfig container-runtime-csv features_check REQUIRED_DISTRO_FEATURES = "opengl" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/gstreamer-1.0/*.so*" do_install() { diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvdrmvideosink_1.14.0-r32.7.5.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvdrmvideosink_1.14.0-r32.7.5.bb index 3cf2eb4fb1b7..1c17f798c532 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvdrmvideosink_1.14.0-r32.7.5.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvdrmvideosink_1.14.0-r32.7.5.bb @@ -19,6 +19,8 @@ inherit pkgconfig container-runtime-csv features_check REQUIRED_DISTRO_FEATURES = "opengl" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/gstreamer-1.0/*.so*" CFLAGS:append = " -fpic" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nveglgles_1.2.3-r32.7.5.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nveglgles_1.2.3-r32.7.5.bb index f98c93c9a263..282c749ed8dc 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nveglgles_1.2.3-r32.7.5.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nveglgles_1.2.3-r32.7.5.bb @@ -33,6 +33,8 @@ inherit autotools gtk-doc gettext gobject-introspection pkgconfig container-runt REQUIRED_DISTRO_FEATURES = "opengl" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/*.so* ${libdir}/gstreamer-1.0/*.so*" delete_pkg_m4_file() { diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvjpeg_1.14.0-r32.7.5.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvjpeg_1.14.0-r32.7.5.bb index f8d2d8860598..ccf790368964 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvjpeg_1.14.0-r32.7.5.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvjpeg_1.14.0-r32.7.5.bb @@ -19,6 +19,8 @@ inherit autotools gtk-doc gettext pkgconfig container-runtime-csv features_check REQUIRED_DISTRO_FEATURES = "opengl" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/gstreamer-1.0/*.so*" PACKAGES_DYNAMIC = "^${PN}-.*" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvtee_1.14.0-r32.7.5.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvtee_1.14.0-r32.7.5.bb index 8a562d220961..144225b7dea3 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvtee_1.14.0-r32.7.5.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvtee_1.14.0-r32.7.5.bb @@ -14,6 +14,8 @@ S = "${WORKDIR}/gst-nvtee" inherit pkgconfig container-runtime-csv +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/gstreamer-1.0/*.so*" do_install() { diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvv4l2camerasrc_1.14.0-r32.7.5.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvv4l2camerasrc_1.14.0-r32.7.5.bb index 35fcded10a0d..e0c278f9dd3c 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvv4l2camerasrc_1.14.0-r32.7.5.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvv4l2camerasrc_1.14.0-r32.7.5.bb @@ -25,6 +25,8 @@ inherit pkgconfig container-runtime-csv features_check REQUIRED_DISTRO_FEATURES = "opengl" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/gstreamer-1.0/*.so*" do_install() { diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvidconv.inc b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvidconv.inc index ba391bc5214c..e6a077b8ef2e 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvidconv.inc +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvidconv.inc @@ -21,6 +21,8 @@ inherit pkgconfig container-runtime-csv features_check REQUIRED_DISTRO_FEATURES = "opengl" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/gstreamer-1.0/*.so*" do_install() { diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvideo4linux2_1.14.0-r32.7.5.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvideo4linux2_1.14.0-r32.7.5.bb index 236a5e52cd46..fa9bbd50818e 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvideo4linux2_1.14.0-r32.7.5.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvideo4linux2_1.14.0-r32.7.5.bb @@ -33,6 +33,8 @@ inherit gettext pkgconfig container-runtime-csv features_check REQUIRED_DISTRO_FEATURES = "opengl" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/gstreamer-1.0/*.so*" copy_headers() { diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvideosinks_1.14.0-r32.7.5.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvideosinks_1.14.0-r32.7.5.bb index 5438a4998c41..87af95a4fed2 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvideosinks_1.14.0-r32.7.5.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvideosinks_1.14.0-r32.7.5.bb @@ -20,6 +20,8 @@ S = "${WORKDIR}/gst-plugins-nv-video-sinks" inherit gettext pkgconfig container-runtime-csv cuda features_check +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/gstreamer-1.0/*.so*" EXTRA_OEMAKE = "CUDA_VER=${CUDA_VERSION}" diff --git a/recipes-multimedia/libv4l2/libv4l2-minimal_1.18.0.bb b/recipes-multimedia/libv4l2/libv4l2-minimal_1.18.0.bb index aba0837a5fda..c6a99353257a 100644 --- a/recipes-multimedia/libv4l2/libv4l2-minimal_1.18.0.bb +++ b/recipes-multimedia/libv4l2/libv4l2-minimal_1.18.0.bb @@ -29,6 +29,7 @@ do_install:append:tegra() { } CONTAINER_CSV_BASENAME = "libv4l" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" CONTAINER_CSV_FILES = "${libdir}/*.so* ${libdir}/libv4l/ov* ${libdir}/libv4l/*.so" PACKAGES =+ "libv4l libv4l-dev" diff --git a/recipes-multimedia/libv4l2/libv4l2-nvvidconv-wrapper_git.bb b/recipes-multimedia/libv4l2/libv4l2-nvvidconv-wrapper_git.bb index 60faaa7a7834..4ed1c2df5625 100644 --- a/recipes-multimedia/libv4l2/libv4l2-nvvidconv-wrapper_git.bb +++ b/recipes-multimedia/libv4l2/libv4l2-nvvidconv-wrapper_git.bb @@ -19,6 +19,8 @@ inherit cmake pkgconfig container-runtime-csv features_check REQUIRED_DISTRO_FEATURES = "opengl" +CONTAINER_CSV_LIB_PATH = "/usr/lib/aarch64-linux-gnu/" + CONTAINER_CSV_FILES = "${libdir}/libv4l/plugins/*.so*" FILES:${PN} = "${libdir}/libv4l/plugins/*${SOLIBSDEV}"