diff options
| author | Simon Rettberg | 2023-08-10 18:46:49 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2023-08-10 18:46:49 +0200 |
| commit | a70019e50da125b3007072653a9f84023bd2ac87 (patch) | |
| tree | 7c109a9a43aa38b35cce81b0bbf0a60d4d663395 /core/modules/nvidia-libs@ | |
| parent | Try to fix empty nvidia addon issue (diff) | |
| download | mltk-a70019e50da125b3007072653a9f84023bd2ac87.tar.gz mltk-a70019e50da125b3007072653a9f84023bd2ac87.tar.xz mltk-a70019e50da125b3007072653a9f84023bd2ac87.zip | |
Try to get versioned targets and modules under control
Diffstat (limited to 'core/modules/nvidia-libs@')
| -rwxr-xr-x | core/modules/nvidia-libs@/data/addon-init | 10 | ||||
| -rw-r--r-- | core/modules/nvidia-libs@/module.build | 21 | ||||
| -rw-r--r-- | core/modules/nvidia-libs@/module.conf | 17 | ||||
| -rw-r--r-- | core/modules/nvidia-libs@/module.conf.debian | 13 | ||||
| -rw-r--r-- | core/modules/nvidia-libs@/module.conf.ubuntu | 15 |
5 files changed, 76 insertions, 0 deletions
diff --git a/core/modules/nvidia-libs@/data/addon-init b/core/modules/nvidia-libs@/data/addon-init new file mode 100755 index 00000000..ae0734c2 --- /dev/null +++ b/core/modules/nvidia-libs@/data/addon-init @@ -0,0 +1,10 @@ +#!/bin/ash + +[ -e "/opt/openslx/etc/nvidia.whiteout" ] || exit 0 + +while read line; do + rm -f -- "$line" +done < "/opt/openslx/etc/nvidia.whiteout" + +exit 0 + diff --git a/core/modules/nvidia-libs@/module.build b/core/modules/nvidia-libs@/module.build new file mode 100644 index 00000000..d738d22f --- /dev/null +++ b/core/modules/nvidia-libs@/module.build @@ -0,0 +1,21 @@ +#!/bin/bash + +pre_exec() { + [ -z "$MODULE_VERSION" ] && perror "Not run from an @ target" + local SRC SZ + SRC="${ROOT_DIR}/tmp/work/nvidia-common/build/$MODULE_VERSION" + [ -d "$SRC" ] || perror "nvidia-common did not build $MODULE_VERSION" + SZ=$( du -sk "$SRC" | awk '{print $1}' ) + (( SZ < 200000 )) && perror "nvidia-common for $MODULE_VERSION is less than 200MB, fishy" + # XXX Now we override the MODULE_BUILD_DIR, where mltk will then grab alle the required files from + MODULE_BUILD_DIR="$SRC" +} + +post_copy() { + # generate addon-required for this version + cat <<-EOF > "${TARGET_BUILD_DIR}/addon-required" + #!/bin/ash + [ "\$( cat /sys/module/nvidia/version )" = "$MODULE_VERSION" ] + EOF + chmod +x "${TARGET_BUILD_DIR}/addon-required" +} diff --git a/core/modules/nvidia-libs@/module.conf b/core/modules/nvidia-libs@/module.conf new file mode 100644 index 00000000..e62db897 --- /dev/null +++ b/core/modules/nvidia-libs@/module.conf @@ -0,0 +1,17 @@ +#!/bin/bash + +REQUIRED_FILES=" + @/opt/openslx/etc/nvidia.whiteout +" + +REQUIRED_DIRECTORIES=" + /etc + /usr + /var/lib/nvidia + /var/log +" + +REQUIRED_MODULES=" + nvidia-common +" + diff --git a/core/modules/nvidia-libs@/module.conf.debian b/core/modules/nvidia-libs@/module.conf.debian new file mode 100644 index 00000000..c3a686d7 --- /dev/null +++ b/core/modules/nvidia-libs@/module.conf.debian @@ -0,0 +1,13 @@ +#!/bin/bash +# libvdpau: While nvidia delivers a linvdpau within it's driver package, nvidia +# itself recommends using a distribution package if available. So, here we go. + +REQUIRED_CONTENT_PACKAGES=" + libvdpau1 +" + +REQUIRED_INSTALLED_PACKAGES=" + libvdpau1 +" + + diff --git a/core/modules/nvidia-libs@/module.conf.ubuntu b/core/modules/nvidia-libs@/module.conf.ubuntu new file mode 100644 index 00000000..5135d91e --- /dev/null +++ b/core/modules/nvidia-libs@/module.conf.ubuntu @@ -0,0 +1,15 @@ +#!/bin/bash +# libvdpau: While nvidia delivers a linvdpau within it's driver package, nvidia +# itself recommends using a distribution package if available. So, here we go. + +REQUIRED_CONTENT_PACKAGES=" + libvdpau1 +" + +REQUIRED_INSTALLED_PACKAGES=" + libvdpau1 +" +REQUIRED_SYSTEM_FILES+=" + /sbin/ldconfig.real +" + |
