Changeset 68706 in vbox for trunk/src/VBox/Installer/linux
- Timestamp:
- Sep 8, 2017 3:11:42 PM (7 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/Makefile.include.footer
r68627 r68706 64 64 install: $(MODULE) 65 65 @mkdir -p $(MODULE_DIR); \ 66 install -m 0644 -o root -g root $(MODULE).$(MODULE_EXT) \ 67 $(INSTALL_MOD_PATH)/$(KERN_DIR)/$(INSTALL_MOD_DIR); \ 66 install -m 0644 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR); \ 68 67 PATH="$(PATH):/bin:/sbin" depmod -a; 69 68 -
trunk/src/VBox/Installer/linux/Makefile.include.header
r68627 r68706 91 91 92 92 # kernel base directory 93 ifndef KERN_DIR 94 KERN_DIR := /lib/modules/$(shell uname -r)/build 95 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) 96 $(error Error: unable to find the sources of your current Linux kernel. \ 97 Specify KERN_DIR=<directory> and run Make again) 98 endif 99 else 100 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) 101 $(error Error: KERN_DIR does not point to a directory) 102 endif 103 endif 104 105 # includes 106 ifndef KERN_INCL 107 KERN_INCL := $(KERN_DIR)/include 108 endif 109 ifneq ($(shell if test -d $(KERN_INCL); then echo yes; fi),yes) 110 $(error Error: unable to find the include directory for your current Linux \ 111 kernel. Specify KERN_INCL=<directory> and run Make again) 112 endif 113 114 # module install dir 115 INSTALL_MOD_DIR ?= misc 93 KERN_VER ?= $(shell uname -r) 116 94 117 95 # guess kernel major version (24 or later) 118 ifeq ($(shell if grep '"2\.4\.' $(KERN_INCL)/linux/version.h > /dev/null 2>&1; then echo yes; fi),yes)96 ifeq ($(shell if grep '"2\.4\.' /lib/modules/$(KERN_VER)/build/include/linux/version.h > /dev/null 2>&1; then echo yes; fi),yes) 119 97 KERN_VERSION := 24 120 98 else … … 135 113 endif 136 114 137 KERN_DIR := /lib/modules/$(KERNELRELEASE)/build 138 KERN_INCL := $(KERN_DIR)/include 115 KERN_VER := $(KERNELRELEASE) 139 116 140 117 endif # neq($(KERNELRELEASE),) 141 118 119 # Kernel build folder 120 KERN_DIR := /lib/modules/$(KERN_VER)/build 121 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) 122 $(error Error: unable to find the headers of the Linux kernel to build against. \ 123 Specify KERN_VER=<version> and run Make again) 124 endif 125 # Kernel include folder 126 KERN_INCL := $(KERN_DIR)/include 127 # module install folder 128 INSTALL_MOD_DIR ?= misc 129 MODULE_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KERN_VER)/$(INSTALL_MOD_DIR) 130 142 131 # debug - show guesses. 143 132 ifdef DEBUG 133 $(warning dbg: INSTALL_MOD_PATH = $(INSTALL_MOD_PATH)) 134 $(warning dbg: INSTALL_MOD_DIR = $(INSTALL_MOD_DIR)) 144 135 $(warning dbg: KERN_DIR = $(KERN_DIR)) 145 136 $(warning dbg: KERN_INCL = $(KERN_INCL)) 146 $(warning dbg: INSTALL_MOD_PATH = $(INSTALL_MOD_PATH))147 $(warning dbg: INSTALL_MOD_DIR = $(INSTALL_MOD_DIR))148 137 $(warning dbg: KERN_VERSION = $(KERN_VERSION)) 138 $(warning dbg: MODULE_DIR = $(MODULE_DIR)) 149 139 endif
Note:
See TracChangeset
for help on using the changeset viewer.