VirtualBox

Changeset 39857 in vbox


Ignore:
Timestamp:
Jan 24, 2012 4:41:13 PM (13 years ago)
Author:
vboxsync
Message:

A filter driver sample.

Location:
trunk/src/VBox/Devices/Samples
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Samples/Makefile.kmk

    r39252 r39857  
    55
    66#
    7 # Copyright (C) 2009 Oracle Corporation
     7# Copyright (C) 2009-2012 Oracle Corporation
    88#
    99# This file is part of VirtualBox Open Source Edition (OSE), as
     
    2121
    2222#
    23 # VBoxSampleDriver - A sample device module.
     23# VBoxSampleDevice - A sample device module.
    2424#
    2525DLLS += VBoxSampleDevice
     
    3333        $(LIB_REM)
    3434
     35#
     36# VBoxSampleDriver - A sample driver module.
     37#
     38DLLS += VBoxSampleDriver
     39VBoxSampleDriver_TEMPLATE = VBOXR3
     40VBoxSampleDriver_INSTTYPE = none
     41VBoxSampleDriver_SOURCES  = \
     42        DrvStorageFilter.cpp
     43VBoxSampleDriver_LIBS     = \
     44        $(LIB_RUNTIME) \
     45        $(LIB_VMM) \
     46        $(LIB_REM)
     47
    3548include $(KBUILD_PATH)/subfooter.kmk
    3649
     50
     51#
     52# Installs the filter.
     53#
     54install-filter:
     55        $(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,))
     56        $(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,))
     57# Make VBox load the driver
     58        $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path" \
     59                "$(if $(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_TARGET))"
     60# Configure the matching.
     61        $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver" \
     62                "VD"
     63# The config of the injected driver.
     64        $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Driver" \
     65                "StorageFilter"
     66        $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported" \
     67                "1"
     68
     69uninstall-filter:
     70        $(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,))
     71        $(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,))
     72        $(VBOX_MANAGE) showvminfo "$(VBOX_VMNAME)"
     73        $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path"
     74        $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver"
     75        $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported"
     76
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