diff options
author | Simon Rettberg | 2024-03-01 14:40:48 +0100 |
---|---|---|
committer | Simon Rettberg | 2024-03-01 14:40:48 +0100 |
commit | f7c16d22bcf0e9a08af91cf6e3408cf66a9255bc (patch) | |
tree | 7bc351228020ccf6d42348172c9515fa0c35a5cc | |
parent | [vmware-common] Silence warning if SHARE_REMAP_MODE is empty (diff) | |
download | mltk-f7c16d22bcf0e9a08af91cf6e3408cf66a9255bc.tar.gz mltk-f7c16d22bcf0e9a08af91cf6e3408cf66a9255bc.tar.xz mltk-f7c16d22bcf0e9a08af91cf6e3408cf66a9255bc.zip |
[vmware-version-check/nvidia-libs@] Silence non-critical errors in addon-required
3 files changed, 15 insertions, 6 deletions
diff --git a/core/modules/nvidia-libs@/module.build b/core/modules/nvidia-libs@/module.build index c721cfda..30e7cfea 100644 --- a/core/modules/nvidia-libs@/module.build +++ b/core/modules/nvidia-libs@/module.build @@ -13,9 +13,9 @@ pre_exec() { post_copy() { # generate addon-required for this version - cat <<-EOF > "${TARGET_BUILD_DIR}/addon-required" - #!/bin/ash - [ "\$( cat /sys/module/nvidia/version )" = "$TARGET_VERSION" ] - EOF + sed "s/%TARGET_VERSION%/$TARGET_VERSION/g" \ + < "${MODULE_DIR}/templates/addon-required.template" \ + > "${TARGET_BUILD_DIR}/addon-required" \ + || perror "Could not copy addon-required template to target" chmod +x "${TARGET_BUILD_DIR}/addon-required" } diff --git a/core/modules/nvidia-libs@/templates/addon-required.template b/core/modules/nvidia-libs@/templates/addon-required.template new file mode 100644 index 00000000..68cb1284 --- /dev/null +++ b/core/modules/nvidia-libs@/templates/addon-required.template @@ -0,0 +1,9 @@ +#!/bin/ash + +if ! [ -e /sys/module/nvidia/version ]; then + echo "No driver loaded, not enabling" + exit 1 +fi +[ "$( cat /sys/module/nvidia/version )" = "%TARGET_VERSION%" ] && exit 0 +echo "Driver version mismatch, not enabling" +exit 1 diff --git a/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version b/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version index c8c43666..b32e1187 100755 --- a/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version +++ b/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version @@ -14,8 +14,8 @@ if [ -z "$VIRTTYPE" ]; then exit 0 fi -[ -e "/dev/cpu/0/msr" ] \ - || modprobe msr \ +[ -e "/dev/cpu/0/msr" ] \ + || modprobe msr 2> /dev/null \ || insmod "$NEWROOT/lib/modules/$( uname -r )/kernel/arch/x86/kernel/msr.ko"* # * because it might be compressed -> msr.ko.zstd ... |