VirtualBox

Changeset 69572 in vbox


Ignore:
Timestamp:
Nov 3, 2017 6:48:36 PM (7 years ago)
Author:
vboxsync
Message:

Linux kernel module make files: better kernel header selection.
bugref:4567: Linux kernel driver maintenance

When looking for Linux headers to build against, only consider non-empty
build folders and sort in the right order. Fall back to uname -r if none
are found.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r69569 r69572  
    42084208 ifndef KERN_DIR
    42094209  ifndef KERN_VER
    4210    KERN_VER=$(notdir $(lastword $(shell LC_ALL=C ls -t /lib/modules/)))
    4211   endif
    4212   ifneq ($(KERN_VER),)
    4213    KERN_DIR=/lib/modules/$(KERN_VER)/build
    4214   endif
     4210   KERN_VER=$(notdir $(firstword $(patsubst %/build/.config,%,$(shell LC_ALL=C ls -t /lib/modules/*/build/.config 2>/dev/null))))
     4211  endif
     4212  ifeq ($(KERN_VER),)
     4213   KERN_VER=`uname -r`
     4214  endif
     4215  KERN_DIR=/lib/modules/$(KERN_VER)/build
    42154216 endif
    42164217
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette