Commit Graph

50 Commits

Author SHA1 Message Date
Matt Madison
54ca488dd9 external/virtualization-layer: fix libnvidia-container build error
Add a patch to libnvidia-container to fix build issues with go 1.24.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-03-09 07:48:14 -07:00
Matt Madison
5e53516a94 external/virtualization-layer: update libnvidia-container makefile patch
to add -trimpath to the build of libnvidia-container-go.so, so it doesn't
trigger buildpaths QA warnings.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-07-15 12:13:13 -07:00
Matt Madison
b89d6ddac2 external/virtualization-layer: update nvidia-container-toolkit alt-roots patch
to fix a problem with inconsistent results from the symlink chain resolver
used to set up the hooks to create symlinks.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-06-19 09:33:06 -07:00
Matt Madison
f873164fc3 external/virtualization-layer: refresh alt-roots patch for nvidia-container-toolkit
to cover the symlink creation hooks as well as the passthrough mounts.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-06-16 13:47:35 -07:00
Matt Madison
b9f1c32608 external: clean up patch headers
Signed-off-by: Matt Madison <matt@madison.systems>
2024-06-13 05:51:45 -07:00
Matt Madison
ec308c582f external/virtualization-layer: nvidia-container-toolkit: install config.toml symlink
With the updated toolkit/runtime setup, the toolkit is run at boot time to generate the
configuration file used by the container runtime.  To allow for a read-only rootfs setup,
we place the generated config.toml under /run. We need to install a symlink in the
normal /etc/nvidia-container-runtime directory to point to that generated config, so the
container runtime can find it.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-05-31 09:57:00 -07:00
Matt Madison
992db32b98 external/virtualization-layer: drop obsolete linux-tegra bbappend
Signed-off-by: Matt Madison <matt@madison.systems>
2024-05-31 09:57:00 -07:00
Matt Madison
79cf38de27 external/virtualization-layer: update nvidia-container-toolkit to 1.14.5
* Added patch to support location of files in the container-passthrough tree
* Added systemd service to generate the config.toml file for the container
  runtime during boot, so we can add the location of the passthrough tree.

Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com>
Signed-off-by: Matt Madison <matt@madison.systems>
2024-05-31 09:56:26 -07:00
Matt Madison
b562d4db27 external/virtualization-layer: update libnvidia-container to 1.14.2 and refresh patch
* Dropped libnvidia-container-jetson recipe, which is now obsoloete

Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com>
Signed-off-by: Matt Madison <matt@madison.systems>
2024-05-31 09:56:26 -07:00
Matt Madison
614c2510a9 meta: update all recipes for the UNPACKDIR transition
* No more 'S = "${WORKDIR}"', which is not permitted
* All ${WORKDIR} references for local files updated to ${UNPACKDIR}
* Custom do_unpack for the recipes that are in the public_sources
  archive in the BSP adjusted for the new unpacking approach
* Some SRC_URIs updated with 'destsuffix=' parameters where needed

Signed-off-by: Matt Madison <matt@madison.systems>
2024-05-28 06:53:54 -07:00
Matt Madison
c8ed092367 external/virtualization-layer: drop obsolete libtirpc126 recipe
Signed-off-by: Matt Madison <matt@madison.systems>
2024-05-14 04:59:16 -07:00
Matt Madison
9d87bb125d external/virtualization-layer: drop libtirpc126 from libnvidia-container-jetson
The original problem with compatibility with newer version of libtirpc was
resolved, so we don't need the workaround any longer.

Also drop runtime dependencies that have been moved to the main libnvidia-container
recipe.  This package can't be used on its own, anyway, as it's called on
by the nvidia-container-cli tool built in the libnvidia-container recipe.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-05-14 04:59:16 -07:00
Matt Madison
4881dfa417 external/virtualization-layer: have libnvidia-container support nvcgo
* Refresh the build patch to have nvcgo built, so the library can be used
  with cgroupsv2 (for 'auto' and 'csv' modes)
* Move some runtime dependencies from libnvidia-container-jetson to
  this recipe, as they're needed here
2024-05-14 04:59:16 -07:00
Matt Madison
9bd391e23d external/virtualization-layer: patch nvidia-container-toolkit CSV mode
* Patch the toolkit to implement 'alternate roots' for locating files to be
  passed through from the host, to support our tegra-container-passthrough tree
* Provide our own config file, rather than modifying the one from the source tree
  on the fly

This enables us to support 'csv' mode in the toolkit for our builds, instead
of requring 'legacy' mode.  With 'csv' mode, host passthrough mounts are injected
into the container when it is created, rather than using the legacy method of
adding a prestart hook to run nvidia-container-cli to set them up.

The 'legacy' mode can still be used, if needed, as long as your target system
is configured to support cgroupsv1.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-05-14 04:59:16 -07:00
Matt Madison
5282a09e3c external/virtualization-layer: nvidia-container-toolkit: add patch for go 1.21+ compatibility
Signed-off-by: Matt Madison <matt@madison.systems>
2024-03-17 09:52:22 -07:00
Daniel Chaves
d9c20d1eb5 nvidia-container-toolkit: Add version and gitCommit to nvidia-container-runtime --version
Signed-off-by: Daniel Chaves <dchvs11@gmail.com>
2024-02-13 08:58:58 -05:00
Jose Quaresma
53c1166f0b libnvidia-container: rdepend on tegra-libraries-cuda
Fixes:

| root@jetson-agx-xavier-devkit:~# nvidia-container-cli -d log info
| nvidia-container-cli: initialization error: driver error: failed to process request
|
| root@jetson-agx-xavier-devkit:~# cat log
|
| -- WARNING, the following logs are for debugging purposes only --
|
| I0116 15:56:51.761083 1362 nvc.c:281] initializing library context (version=0.11.0+jetpack, build=1b60893021cd00c87f201d11eb207215afa3ab11)
| I0116 15:56:51.761474 1362 nvc.c:255] using root /
| I0116 15:56:51.761547 1362 nvc.c:256] using ldcache /etc/ld.so.cache
| I0116 15:56:51.761618 1362 nvc.c:257] using unprivileged user 65534:65534
| I0116 15:56:51.762404 1363 driver.c:134] starting driver service
| E0116 15:56:51.763612 1363 driver.c:196] could not start driver service: load library failed: libcuda.so.1: cannot open shared object file: no such file or directory
| I0116 15:56:51.764073 1362 driver.c:231] driver service terminated successfully

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
2024-01-20 04:46:49 -08:00
Matt Madison
971f01409b external/virtualization-layer: update container support recipes
This brings container support recipes up to the versions used in
L4T R35.4.1/JetPack 5.1.2.

* Rename libnvidia-container-tools recipe to the more accurate 'libnvidia-container', and
  update to v1.10.0 (with patch consolidiation and refresh)
* Fix the makefiles for libnvidia-container and libnvidia-container-jetson to eliminate
  the build paths that were getting embedded in the RPC files
* Include the full set of DEBUG_PREFIX_MAP flags when building libnvidia-container, which fixes
  more embedded build paths
* Update nvidia-container-toolkit to v1.11.0
* Switch to static linking for nvidia-container-toolkit to work around panic on startup
  in nvidia-ctk
* Hard-code the toolkit configuration to "legacy" mode, which uses the older prestart hook
  method for mapping the paths in the CSV file, until our hacks for the passthrough tree
  and for mapping the Debian/Ubuntu multi-arch library paths to the normal host paths
  get migrated to the Go code in nvidia-container-toolkit.
* Update nvidia-docker to v2.11.0

Signed-off-by: Matt Madison <matt@madison.systems>
2023-12-26 05:36:18 -08:00
Ricardo Salveti
ed9c1d25f5 libnvidia-container-tools: rdepend on ldconfig
nvidia-container-cli requires access to the host ldconfig at runtime, so
have it as a runtime dependency explicitly.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2023-12-01 06:44:45 -08:00
Matt Madison
64eef7ae62 external/virtualization-layer: rename docker bbappend
docker-ce is deprecated, with docker-moby now set as the default
docker recipe, so switch over the bbappend to fix up the kernel
module dependencies for that recipe.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-08-20 08:39:55 -07:00
Ilies CHERGUI
ce6755e485 nvidia-container-toolkit: update branch name
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
2023-03-17 05:53:18 -07:00
Matt Madison
033ed4ef41 external/virtualization-layer: update libnvidia-container-jetson
to add a patch that supports the use of tree of files to be directly
exported to containers, overriding any files that reside in the normal
host rootfs.  This allows us to export NVIDIA's prebuilt binary userland
libraries to NVIDIA's containers, to ensure compatibility with the library
versions (notably glibc's) that are inside the container.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-03-06 10:59:23 -08:00
Jose Quaresma
24f0160404 docker-ce: make the overrides tegra specific
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
2022-09-14 09:57:50 -07:00
Atharva Nandanwar
87fb744ca4 libnvidia-container-tools: remove buildpath from compilation
- export -ffile-prefix-map to be used in nvidia-modprobe.mk, this will
  be used for reproducible binaries
- thanks matt@madison.systems for inputs on this

Signed-off-by: Atharva Nandanwar <anandanwar@sighthound.com>
2022-09-05 13:54:07 -07:00
Matt Madison
aa25e3d06a external/virtualization-layer: update nvidia-docker to v2.10.0
Signed-off-by: Matt Madison <matt@madison.systems>
2022-09-05 13:54:07 -07:00
Matt Madison
f942360c19 external/virtualization-layer: drop nvidia-container-runtime recipe
as the provided binary is now built from nvidia-container-toolkit.
Also drop the l4t.csv file, which we'll extract from the BSP instead.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-09-05 13:54:07 -07:00
Matt Madison
063a3fee96 external/virtualization-layer: update nvidia-container-toolkit to v1.9.0
This now includes nvidia-container-runtime.
2022-09-05 13:54:07 -07:00
Matt Madison
fa68a254a5 external/virtualzation-layer: split libnvidia-container-tools recipe
* libnvidia-container-jetson supplies just the Jetson-specific
  library, updated to version 0.11.  This library is dynamically
  loaded by the nvidia-container-cli tool.

* libnvidia-container-tools supplies the generic libnvidia-container
  library (which is at SONAME v1 instead of v0) and the CLI tool.
  This is updated to version 1.9.0.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-09-05 13:54:07 -07:00
Matt Madison
c611c7c0b7 external/virtualization-layer: fix libnvidia-container-tools git issue
The latest git release adds ownership checks on the git tree when
a git command is invoked from pseudo context, so when the
makefiles are processed during the do_install task, an error is
reported.

Fix this by adding a REVISION variable setting to EXTRA_OEMAKE, and
also include a COMPILER setting to override shell callout to
extract the compiler path.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-04-15 11:20:33 -07:00
Matt Madison
a822e4a29d external/virtualization-layer: update libnvidia-container-tools
to include a setting of SRCREV_FORMAT, to work around a problem
with its sstate packages failing to setscene because the SRCPV
variable gets copied, even though we don't use SRCPV in the
recipe.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-12-14 09:28:31 -08:00
Matt Madison
f5150b5731 external/virtualization-layer: drop libnvidia-container-tools 0.9.0
which is obsolete.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-12-14 09:28:31 -08:00
Matt Madison
dd77203440 libnvidia-container-tools: clean up license settings
Update the LICENSE setting to more accurately reflect
what is included in the package, removing GPLv3
and adding MIT. The files in the source repository
are somewhat misleading.

Also update LIC_FILES_CHKSUM to reference files
reflective of the specified license types.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-11-11 12:20:46 -08:00
Matt Madison
9e14b1f20b external: recipes-containers: update SRC_URIs
* Use canonical repository name
* Add missing branch parameter

Signed-off-by: Matt Madison <matt@madison.systems>
2021-11-05 06:11:18 -07:00
Matt Madison
3ad44fe836 libnvidia-container-tools-0.10.0: apply libtirpc patch
Carry forward the patch previously applied to 0.9.0 that
switches to linking against a patched version of libtirpc
to fix segfaults during container startup.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-10-18 13:16:21 -07:00
Ricardo Salveti
b973762fee recipes-containers: rdepend on docker instead of docker-ce
Allow the user to select either docker-moby or docker-ce as the default
docker provider (docker.inc, used by both docker-moby and docker-ce has
the required rprovides logic for the common docker package).

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-09-09 04:39:24 -07:00
Matt Madison
62600c71fe meta: refresh overrides conversion
Signed-off-by: Matt Madison <matt@madison.systems>
2021-08-10 08:35:14 -07:00
Ilies CHERGUI
6549fd4f54 libnvidia-container-tools: upgrade to 0.10.0 to aligned with L4T R32.6.1
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
2021-08-10 08:34:50 -07:00
Matt Madison
b9507ceb23 meta: convert to new override syntax
* Ran convert-overrides.py to generate the initial changes
* Manual cleanup afterwards (which was a lot, due to our
  extensive use of overrides).

Signed-off-by: Matt Madison <matt@madison.systems>
2021-08-03 08:27:55 -07:00
Matt Madison
269181b906 external/virtualization-layer: patch libtirpc126 to limit fd table sizes
With recent systemd versions, process limits on the number of open files
have been raised by a couple of orders of magnitude (K to G). The libtirpc
library, which is unfortunately used by libnvidia-container-tools to implement
some inter-process communication, allocates some arrays of tracking structures based
on the open-files limit (e.g., dtablesze) - leading to memory allocation failures
as it tries to allocate multi-GiB arrays off the heap.

Add a modified patch, back-ported from libtirpc 1.3.2, that caps the array sizes
back down to 1K, to work around this problem for now.  The original patch only
handled the svc client; the modification also limits the array size for the
server side.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-07-25 06:46:41 -07:00
Matt Madison
cf2b5e5ad7 libnvidia-container-tools: build against libtirpc126
to address the segmentation fault reported during container
startup.  There's still an error getting reported that needs
to be addressed, though.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-07-24 05:07:01 -07:00
Matt Madison
62359380e6 libtirpc126: add recipe
to build this older version of libtirpc as a static library, specifically
for use by libnvidia-container-tools.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-07-24 05:07:01 -07:00
Joel Winarske
12bdf5665b relocate under dynamic layer 2021-05-27 04:29:45 -07:00
Matt Madison
a99aadb327 libnvidia-container-tools: update SRC_URIs
- use protocol=https
- modprobe repo renamed master branch to 'main'

Signed-off-by: Matt Madison <matt@madison.systems>
2021-03-21 04:19:19 -07:00
Matt Madison
46db458f06 nvidia-container-toolkit: export GO111MODULE=off
The latest go in OE-Core uses go module support by default,
so we need to explicitly disable it to build this version
of nvidia-container-toolkit.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-03-07 06:58:51 -08:00
Matt Madison
6512d03d89 nvidia-container-runtime: export GO111MODULE=off
The latest go in OE-Core uses go module support by default,
so we need to explicitly disable it to build this version
of nvidia-container-runtime.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-03-07 06:58:49 -08:00
Matt Madison
33e503050f external/virtualization-layer: drop tini bbappend
tini has been updated to 0.19.0 in meta-virtualization, and
the recipe now includes the SECURITY_FLAGS setting were were
making.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-02-07 09:40:10 -08:00
Matt Madison
ad7dcf9235 libnvidia-container-tools: fix generation of compiled-in build info
Patch the makefile and update the recipe to alter how the compiled-in
build information is generated.  This should fix failures on certain
build hosts and better support reproducible builds.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-09-27 10:20:38 -07:00
Matt Madison
aa9ad4d649 recipes-containers: move to external/virtualization-layer
so that the recipes are only visible when meta-virtualization
is present in the layer stack.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-07-27 04:12:06 -07:00
Matt Madison
6851e49262 tini: add bbappend
to add ${SECURITY_NOPIE_CFLAGS} to its SECURITY_CFLAGS
setting, for GCC 7 compatibility.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-04-10 09:39:24 -07:00
Matt Madison
c7589397e7 docker-ce: add bbappend
to work around a build failure when DISTRO_FEATURES contains
both systemd and sysvinit, and to add RRECOMMENDS for
kernel modules that docker needs, based on the output from running
https://github.com/moby/moby/blob/master/contrib/check-config.sh

Signed-off-by: Matt Madison <matt@madison.systems>
2020-03-21 06:05:57 -07:00