vbox的更動 68609 路徑 trunk/src/VBox/Installer
- 時間撮記:
- 2017-9-1 下午04:33:52 (7 年 以前)
- 位置:
- trunk/src/VBox/Installer/linux
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Installer/linux/Makefile.include.footer
r66016 r68609 18 18 override MODULE = $(MOD_NAME) 19 19 OBJS = $(MOD_OBJS) 20 21 ifneq ($(MAKECMDGOALS),clean)22 20 23 21 KBUILD_VERBOSE ?= 1 … … 44 42 # 45 43 44 # Note: while 2.4 kernels could also do "proper" builds from kbuild, the make 45 # script needed to support it was somewhat different from 2.6. Since this 46 # script works and 2.4 is not a moving target we will not try do do things the 47 # "proper" way. 48 46 49 ifeq ($(BUILD_TARGET_ARCH),amd64) 47 50 KFLAGS += -mcmodel=kernel … … 59 62 $(MODULE): $(MODULE).o 60 63 61 else 64 install: $(MODULE) 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); \ 68 PATH="$(PATH):/bin:/sbin" depmod -a; 69 70 clean: 71 for f in $(sort $(dir $(OBJS))); do rm -f $$f/*.o $$f/.*.cmd $$f/.*.flags; done 72 rm -rf .$(MOD_NAME)* .tmp_ver* $(MOD_NAME).* Modules.symvers modules.order 73 74 else # ! $(KERN_VERSION), 24 62 75 # 63 76 # 2.6 and later … … 85 98 $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) CONFIG_MODULE_SIG= -C $(KERN_DIR) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) -j$(JOBS) modules 86 99 87 modules_install: 88 $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) CONFIG_MODULE_SIG= -C $(KERN_DIR) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) modules_install100 install: $(MODULE) 101 $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) CONFIG_MODULE_SIG= -C $(KERN_DIR) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install 89 102 90 endif 91 92 install: $(MODULE) 93 @mkdir -p $(MODULE_DIR); \ 94 install -m 0644 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR); \ 95 PATH="$(PATH):/bin:/sbin" depmod -a; 96 97 endif # eq($(MAKECMDGOALS),clean) 103 modules_install: install 104 all: install 98 105 99 106 clean: 100 for f in $(MOD_CLEAN); do rm -f $$f/*.o $$f/.*.cmd $$f/.*.flags; done 101 rm -rf .$(MOD_NAME)* .tmp_ver* $(MOD_NAME).* Modules.symvers modules.order 107 $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) CONFIG_MODULE_SIG= -C $(KERN_DIR) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) clean 108 109 .PHONY: $(MODULE) install modules_install clean 110 endif -
trunk/src/VBox/Installer/linux/Makefile.include.header
r66503 r68609 16 16 17 17 # Testing: 18 # * Building with KERN_VER set to an installed but non-current kernel works and 19 # installs to the right location. 20 # * Building with KERN_DIR and/or MODULE_DIR set uses the value specified and 18 # * Building with KERN_DIR set uses the value specified and 21 19 # the default value for the unspecified one if any. 22 20 … … 35 33 # MOD_INCL = <any additional include paths which this module needs> 36 34 # MOD_CFLAGS = <any additional CFLAGS which this module needs> 37 # MOD_CLEAN = <list of directories that the clean target should look at>38 35 # include $(obj)/Makefile.include.footer 39 36 # … … 87 84 endif 88 85 89 ifneq ($(MAKECMDGOALS),clean)90 91 86 ifeq ($(KERNELRELEASE),) 92 87 … … 95 90 # 96 91 97 # target kernel version98 ifndef KERN_VER99 KERN_VER := $(shell uname -r)100 else101 ifneq ($(shell if test -d /lib/modules/$(KERN_VER)/build; then echo yes; fi),yes)102 KERN_VER := $(shell uname -r)103 endif104 endif105 106 92 # kernel base directory 107 93 ifndef KERN_DIR 108 KERN_DIR := /lib/modules/$( KERN_VER)/build94 KERN_DIR := /lib/modules/$(shell uname -r)/build 109 95 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) 110 KERN_DIR := /usr/src/linux 111 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) 112 $(error Error: unable to find the sources of your current Linux kernel. \ 96 $(error Error: unable to find the sources of your current Linux kernel. \ 113 97 Specify KERN_DIR=<directory> and run Make again) 114 endif115 $(warning Warning: using /usr/src/linux as the source directory of your \116 Linux kernel. If this is not correct, specify \117 KERN_DIR=<directory> and run Make again.)118 98 endif 119 99 else … … 125 105 # includes 126 106 ifndef KERN_INCL 127 KERN_INCL = $(KERN_DIR)/include107 KERN_INCL := $(KERN_DIR)/include 128 108 endif 129 109 ifneq ($(shell if test -d $(KERN_INCL); then echo yes; fi),yes) … … 132 112 endif 133 113 134 # module install dir, only for current kernel 135 ifneq ($(filter install install_rpm,$(MAKECMDGOALS)),) 136 ifndef MODULE_DIR 137 MODULE_DIR_TST := /lib/modules/$(KERN_VER) 138 ifeq ($(shell if test -d $(MODULE_DIR_TST); then echo yes; fi),yes) 139 MODULE_DIR := $(MODULE_DIR_TST)/misc 140 else 141 $(error Unable to find the folder to install the module to) 142 endif 143 endif # MODULE_DIR unspecified 144 endif 114 # module install dir 115 INSTALL_MOD_DIR ?= misc 145 116 146 # guess kernel version (24 or 26)147 ifeq ($(shell if grep '"2\.4\.' $(KERN_INCL)/linux/version.h > /dev/null ; then echo yes; fi),yes)117 # 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) 148 119 KERN_VERSION := 24 149 120 else … … 164 135 endif 165 136 137 KERN_DIR := /lib/modules/$(KERNELRELEASE)/build 138 KERN_INCL := $(KERN_DIR)/include 139 166 140 endif # neq($(KERNELRELEASE),) 167 141 168 142 # debug - show guesses. 169 143 ifdef DEBUG 170 $(warning dbg: KERN_DIR = $(KERN_DIR)) 171 $(warning dbg: KERN_INCL = $(KERN_INCL)) 172 $(warning dbg: MODULE_DIR = $(MODULE_DIR)) 173 $(warning dbg: KERN_VERSION = $(KERN_VERSION)) 144 $(warning dbg: KERN_DIR = $(KERN_DIR)) 145 $(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 $(warning dbg: KERN_VERSION = $(KERN_VERSION)) 174 149 endif 175 176 endif # eq($(MAKECMDGOALS),clean)
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器