1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# $Id: Makefile.kmk $
## @file
# Makefile for the device and driver samples.
#
#
# Copyright (C) 2009-2019 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
SUB_DEPTH = ../../../..
include $(KBUILD_PATH)/subheader.kmk
#
# VBoxSampleDevice - A sample device module.
#
DLLS += VBoxSampleDevice
VBoxSampleDevice_TEMPLATE = VBOXR3
VBoxSampleDevice_SOURCES = \
VBoxSampleDevice.cpp
VBoxSampleDevice_LIBS = \
$(LIB_RUNTIME) \
$(LIB_VMM)
#
# VBoxSampleDriver - A sample driver module.
#
DLLS += VBoxSampleDriver
VBoxSampleDriver_TEMPLATE = VBOXR3
VBoxSampleDriver_SOURCES = \
DrvStorageFilter.cpp
VBoxSampleDriver_LIBS = \
$(LIB_RUNTIME) \
$(LIB_VMM)
#
# VBoxPlaygroundDevice - A device module demonstrating some unusual features.
#
DLLS += VBoxPlaygroundDevice
VBoxPlaygroundDevice_TEMPLATE = VBOXR3
VBoxPlaygroundDevice_SOURCES = \
DevPlayground.cpp
VBoxPlaygroundDevice_LIBS = \
$(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
$(LIB_RUNTIME) \
$(LIB_VMM)
ifdef VBOX_WITH_XPCOM
## @todo may be worth creating the VBOX_XPCOM SDK def, or just a SDK_VBOXXPCOM.
VBoxPlaygroundDevice_DEFS += VBOX_WITH_XPCOM
ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
VBoxPlaygroundDevice_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
endif
VBoxPlaygroundDevice_INCS += \
$(VBOX_XPCOM_INCS)
VBoxPlaygroundDevice_INTERMEDIATES += \
$(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
VBoxPlaygroundDevice_LIBS += \
$(LIB_XPCOM)
else # COM
VBoxPlaygroundDevice_INCS += \
$(VBOX_PATH_SDK)/bindings/mscom/include
VBoxPlaygroundDevice_INTERMEDIATES += \
$(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
endif # COM
include $(FILE_KBUILD_SUB_FOOTER)
#
# Installs the filter.
#
install-filter:
$(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,))
$(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,))
# Make VBox load the driver
$(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path" \
"$(if $(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_TARGET))"
# Configure the matching.
$(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver" \
"VD"
# The config of the injected driver.
$(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Driver" \
"StorageFilter"
$(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported" \
"1"
uninstall-filter:
$(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,))
$(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,))
$(VBOX_MANAGE) showvminfo "$(VBOX_VMNAME)"
$(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path"
$(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver"
$(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported"
|