VirtualBox

Changeset 17935 in vbox


Ignore:
Timestamp:
Mar 16, 2009 2:01:40 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
44507
Message:

Additions/linux: fixed kernel detection

Location:
trunk/src/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/Makefile.module

    r17564 r17935  
    122122
    123123 # guess kernel version (24 or 26)
    124  ifeq ($(shell if grep '"2\.4\.' $(PWD)/include/linux/version.h > /dev/null; then echo yes; fi),yes)
     124 ifeq ($(shell if echo "$(VERSION).$(PATCHLEVEL)." | grep '2\.4\.' > /dev/null; then echo yes; fi),yes)
    125125  KERN_VERSION := 24
    126126 else
     
    164164
    165165# override is required by the Debian guys
    166 override MODULE = \
    167         $(if $(strip $(foreach inc,$(patsubst -I%,%,$(INCL)),\
    168                                         $(wildcard $(inc)/drm/drmP.h))),vboxvideo,)
    169 
    170 OBJS   = \
    171         $(if $(strip $(foreach inc,$(patsubst -I%,%,$(INCL)),\
    172                                         $(wildcard $(inc)/drm/drmP.h))),vboxvideo_drm.o,)
     166override MODULE = vboxvideo
     167OBJS   = vboxvideo_drm.o
    173168
    174169ifeq ($(KERN_VERSION), 24)
  • trunk/src/VBox/Additions/linux/drm/vboxvideo_drm.c

    r17406 r17935  
    5555
    5656#include <linux/autoconf.h>
     57#include <linux/version.h>
     58
     59#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
     60
    5761#include "drm/drmP.h"
    5862#include "vboxvideo_drm.h"
     
    106110MODULE_LICENSE("GPL and additional rights");
    107111
     112#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) */
  • trunk/src/VBox/Additions/linux/module/Makefile.module

    r15816 r17935  
    158158
    159159 # guess kernel version (24 or 26)
    160  ifeq ($(shell if grep '"2\.4\.' $(PWD)/include/linux/version.h > /dev/null; then echo yes; fi),yes)
     160 ifeq ($(shell if echo "$(VERSION).$(PATCHLEVEL)." | grep '2\.4\.' > /dev/null; then echo yes; fi),yes)
    161161  KERN_VERSION := 24
    162162 else
  • trunk/src/VBox/Additions/linux/sharedfolders/Makefile.module

    r17564 r17935  
    149149
    150150 # guess kernel version (24 or 26)
    151  ifeq ($(shell if grep '"2\.4\.' $(PWD)/include/linux/version.h > /dev/null; then echo yes; fi),yes)
     151 ifeq ($(shell if echo "$(VERSION).$(PATCHLEVEL)." | grep '2\.4\.' > /dev/null; then echo yes; fi),yes)
    152152  KERN_VERSION := 24
    153153 else
  • trunk/src/VBox/HostDrivers/Support/linux/Makefile

    r15691 r17935  
    184184 endif
    185185
    186  # guess kernel version (24 or 26)
    187  KERN_VERSION := $(if $(wildcard $(KERN_DIR)/Rules.make),24,26)
    188 
    189186else # neq($(KERNELRELEASE),)
    190187
     
    192189 # building from kbuild (make -C <kernel_directory> M=`pwd`)
    193190 #
    194 
    195  # guess kernel version (24 or 26)
    196  KERN_VERSION := $(if $(wildcard $(PWD)/Rules.make),24,26)
    197191
    198192endif # neq($(KERNELRELEASE),)
     
    203197$(warning dbg: KERN_INCL    = $(KERN_INCL))
    204198$(warning dbg: MODULE_DIR   = $(MODULE_DIR))
    205 $(warning dbg: KERN_VERSION = $(KERN_VERSION))
    206199endif
    207200
Note: See TracChangeset for help on using the changeset viewer.

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