summaryrefslogtreecommitdiffstats
path: root/core/modules/nvidia-libs/module.build
blob: d2a5ee639808eeb01a59ed0f4d585aaf7c1812e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

module_load() {
	[ -z "$VERSION" ] && perror "Not run from an @ target"
	local SRC
	SRC="${ROOT_DIR}/tmp/work/nvidia-common/build/$VERSION"
	[ -d "$SRC" ] || perror "nvidia-common did not build $VERSION"
	# 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 )" = "$VERSION" ]
	EOF
	chmod +x "${TARGET_BUILD_DIR}/addon-required"
}