Changeset 97012 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Oct 5, 2022 6:42:33 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r97011 r97012 310 310 fi 311 311 312 # Reads kernel configuration option. 313 kernel_get_config_opt() 314 { 315 opt_name="$1" 316 [ -n "$opt_name" ] || return 317 318 # Check if there is a kernel tool which can extract config option. 319 if test -x /lib/modules/"$KERN_VER"/build/scripts/config; then 320 /lib/modules/"$KERN_VER"/build/scripts/config \ 321 --file /lib/modules/"$KERN_VER"/build/.config \ 322 --state "$opt_name" 2>/dev/null 323 elif test -f /lib/modules/"$KERN_VER"/build/.config; then 324 # Extract config option manually. 325 grep "$opt_name" /lib/modules/"$KERN_VER"/build/.config | sed -e "s/^$opt_name=//" -e "s/\"//g" 326 fi 327 } 328 312 329 # Reads CONFIG_MODULE_SIG_HASH from kernel config. 313 330 kernel_module_sig_hash() 314 331 { 315 /lib/modules/"$KERN_VER"/build/scripts/config \ 316 --file /lib/modules/"$KERN_VER"/build/.config \ 317 --state CONFIG_MODULE_SIG_HASH 2>/dev/null 332 kernel_get_config_opt "CONFIG_MODULE_SIG_HASH" 318 333 } 319 334 … … 428 443 # Detect if kernel was built with clang. 429 444 unset LLVM 430 vbox_cc_is_clang=$(/lib/modules/"$KERN_VER"/build/scripts/config \ 431 --file /lib/modules/"$KERN_VER"/build/.config \ 432 --state CONFIG_CC_IS_CLANG 2>/dev/null) 445 vbox_cc_is_clang=$(kernel_get_config_opt "CONFIG_MODULE_SIG_HASH") 433 446 if test "${vbox_cc_is_clang}" = "y"; then 434 447 info "Using clang compiler."
Note:
See TracChangeset
for help on using the changeset viewer.