summaryrefslogtreecommitdiffstats
path: root/core/modules/nvidia-libs@/module.build
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/nvidia-libs@/module.build')
-rw-r--r--core/modules/nvidia-libs@/module.build21
1 files changed, 21 insertions, 0 deletions
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"
+}