[build] Move majority of code into bus subdir
authorShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Fri, 30 Apr 2010 23:03:07 +0000 (19:03 -0400)
committerShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Fri, 30 Apr 2010 23:07:13 +0000 (19:07 -0400)
The plan is to split AoE functionality off into its own driver,
to avoid WinVBlock's dependency on NDIS for those users who
do not require or desire the AoE feature.

Similarly, future features with dependencies can have their own
directories and their own .SYS drivers.

For now, all driver code including AoE has been moved into bus/,
but AoE will eventually come out of there.

A strategy needs to be determined to allow for the single bus
device to accept features in a modular fashion, and to route
applicable feature-wide control signals to each feature's driver.

For example, the WinVBlock bus (an "HDD controller" of sorts) can
support certain virtual disk types natively.  When an AoE driver
starts, it could look for the bus and register itself as a
feature if the bus is found.  Thenceforth, a user-land utility
could request an AoE-attach of the WinVBlock bus, who could forward
that request on to the AoE driver.

45 files changed:
makedriver.bat
makeutils.bat
src/bus/aoe.c [moved from src/aoe.c with 100% similarity]
src/bus/bus.c [moved from src/bus.c with 100% similarity]
src/bus/bus_dev_ctl.c [moved from src/bus_dev_ctl.c with 100% similarity]
src/bus/bus_pnp.c [moved from src/bus_pnp.c with 100% similarity]
src/bus/debug.c [moved from src/debug.c with 100% similarity]
src/bus/disk.c [moved from src/disk.c with 100% similarity]
src/bus/disk_dev_ctl.c [moved from src/disk_dev_ctl.c with 100% similarity]
src/bus/disk_pnp.c [moved from src/disk_pnp.c with 100% similarity]
src/bus/disk_scsi.c [moved from src/disk_scsi.c with 100% similarity]
src/bus/driver.c [moved from src/driver.c with 100% similarity]
src/bus/filedisk.c [moved from src/filedisk.c with 100% similarity]
src/bus/grub4dos.c [moved from src/grub4dos.c with 100% similarity]
src/bus/memdisk.c [moved from src/memdisk.c with 100% similarity]
src/bus/probe.c [moved from src/probe.c with 100% similarity]
src/bus/protocol.c [moved from src/protocol.c with 100% similarity]
src/bus/ramdisk.c [moved from src/ramdisk.c with 100% similarity]
src/bus/registry.c [moved from src/registry.c with 100% similarity]
src/bus/winvblock.rc [moved from src/winvblock.rc with 100% similarity]
src/include/aoe.h [moved from src/aoe.h with 100% similarity]
src/include/bus.h [moved from src/bus.h with 100% similarity]
src/include/bus_dev_ctl.h [moved from src/bus_dev_ctl.h with 100% similarity]
src/include/bus_pnp.h [moved from src/bus_pnp.h with 100% similarity]
src/include/debug.h [moved from src/debug.h with 100% similarity]
src/include/disk.h [moved from src/disk.h with 100% similarity]
src/include/disk_dev_ctl.h [moved from src/disk_dev_ctl.h with 100% similarity]
src/include/disk_pnp.h [moved from src/disk_pnp.h with 100% similarity]
src/include/disk_scsi.h [moved from src/disk_scsi.h with 100% similarity]
src/include/driver.h [moved from src/driver.h with 100% similarity]
src/include/filedisk.h [moved from src/filedisk.h with 100% similarity]
src/include/grub4dos.h [moved from src/grub4dos.h with 100% similarity]
src/include/irp.h [moved from src/irp.h with 100% similarity]
src/include/mdi.h [moved from src/mdi.h with 100% similarity]
src/include/memdisk.h [moved from src/memdisk.h with 100% similarity]
src/include/mount.h [moved from src/mount.h with 100% similarity]
src/include/portable.h [moved from src/portable.h with 100% similarity]
src/include/probe.h [moved from src/probe.h with 100% similarity]
src/include/protocol.h [moved from src/protocol.h with 100% similarity]
src/include/ramdisk.h [moved from src/ramdisk.h with 100% similarity]
src/include/registry.h [moved from src/registry.h with 100% similarity]
src/include/resource.h [moved from src/resource.h with 100% similarity]
src/include/winvblock.h [moved from src/winvblock.h with 100% similarity]
src/loader/loader.c
src/util/mount.c

index b02736a..1971736 100644 (file)
@@ -62,22 +62,23 @@ pushd .
 call %ddkdir%\bin\setenv.bat %ddkdir% %arg1% %arg2%\r
 popd\r
 \r
-cd src\r
-echo !INCLUDE $(NTMAKEENV)\makefile.def > makefile\r
-echo TARGETNAME=%name% > sources\r
+cd src\bus\r
+echo !INCLUDE $(NTMAKEENV)\makefile.def > makefile
+echo INCLUDES=..\include > sources\r
+echo TARGETNAME=%name% >> sources\r
 echo TARGETTYPE=DRIVER >> sources\r
 echo TARGETPATH=obj >> sources\r
 echo TARGETLIBS=$(DDK_LIB_PATH)\\ndis.lib >> sources\r
 echo SOURCES=%c% >> sources\r
 build\r
-copy obj%obj%\%arch%\%name%.sys ..\bin >nul\r
-copy obj%obj%\%arch%\%name%.pdb ..\bin >nul\r
+copy obj%obj%\%arch%\%name%.sys ..\..\bin >nul\r
+copy obj%obj%\%arch%\%name%.pdb ..\..\bin >nul\r
 del makefile\r
 del sources\r
 rem del build%obj%.log\r
 rem del build%obj%.wrn 2>nul\r
 rem del build%obj%.err 2>nul\r
 rem rd /s /q obj%obj%\r
-cd ..\r
+cd ..\..\r
 \r
 :end\r
index 81d1e23..095f902 100644 (file)
@@ -7,12 +7,12 @@ call %ddkdir%\bin\setenv.bat %ddkdir% w2k
 popd
 pushd .
 cd util\r
-cl /I%CRT_INC_PATH% /DWIN32_LEAN_AND_MEAN mount.c /Fe..\..\bin\winvblk.exe /link /LIBPATH:%DDK_LIB_DEST%\i386 /LIBPATH:%Lib%\crt\i386 bufferoverflowU.lib\r
+cl /I%CRT_INC_PATH% /I..\include /DWIN32_LEAN_AND_MEAN mount.c /Fe..\..\bin\winvblk.exe /link /LIBPATH:%DDK_LIB_DEST%\i386 /LIBPATH:%Lib%\crt\i386 bufferoverflowU.lib\r
 del mount.obj
 popd
 pushd .
 cd loader\r
-cl /I%CRT_INC_PATH% /DWIN32_LEAN_AND_MEAN loader.c /Fe..\..\bin\loader32.exe /link /LIBPATH:%DDK_LIB_DEST%\i386 /LIBPATH:%Lib%\crt\i386 setupapi.lib bufferoverflowU.lib
+cl /I%CRT_INC_PATH% /I..\include /DWIN32_LEAN_AND_MEAN loader.c /Fe..\..\bin\loader32.exe /link /LIBPATH:%DDK_LIB_DEST%\i386 /LIBPATH:%Lib%\crt\i386 setupapi.lib bufferoverflowU.lib
 del loader.obj\r
 popd\r
 pushd .\r
@@ -20,7 +20,7 @@ call %ddkdir%\bin\setenv.bat %ddkdir% wnet amd64
 popd\r
 pushd .
 cd loader
-cl /I%CRT_INC_PATH% /DWIN32_LEAN_AND_MEAN loader.c /Fe..\..\bin\loader64.exe /link /LIBPATH:%DDK_LIB_DEST%\%_BUILDARCH% /LIBPATH:%Lib%\crt\%_BUILDARCH% setupapi.lib bufferoverflowU.lib\r
+cl /I%CRT_INC_PATH% /I..\include /DWIN32_LEAN_AND_MEAN loader.c /Fe..\..\bin\loader64.exe /link /LIBPATH:%DDK_LIB_DEST%\%_BUILDARCH% /LIBPATH:%Lib%\crt\%_BUILDARCH% setupapi.lib bufferoverflowU.lib\r
 del loader.obj
 popd\r
 cd ..\r
similarity index 100%
rename from src/aoe.c
rename to src/bus/aoe.c
similarity index 100%
rename from src/bus.c
rename to src/bus/bus.c
similarity index 100%
rename from src/bus_dev_ctl.c
rename to src/bus/bus_dev_ctl.c
similarity index 100%
rename from src/bus_pnp.c
rename to src/bus/bus_pnp.c
similarity index 100%
rename from src/debug.c
rename to src/bus/debug.c
similarity index 100%
rename from src/disk.c
rename to src/bus/disk.c
similarity index 100%
rename from src/disk_dev_ctl.c
rename to src/bus/disk_dev_ctl.c
similarity index 100%
rename from src/disk_pnp.c
rename to src/bus/disk_pnp.c
similarity index 100%
rename from src/disk_scsi.c
rename to src/bus/disk_scsi.c
similarity index 100%
rename from src/driver.c
rename to src/bus/driver.c
similarity index 100%
rename from src/filedisk.c
rename to src/bus/filedisk.c
similarity index 100%
rename from src/grub4dos.c
rename to src/bus/grub4dos.c
similarity index 100%
rename from src/memdisk.c
rename to src/bus/memdisk.c
similarity index 100%
rename from src/probe.c
rename to src/bus/probe.c
similarity index 100%
rename from src/protocol.c
rename to src/bus/protocol.c
similarity index 100%
rename from src/ramdisk.c
rename to src/bus/ramdisk.c
similarity index 100%
rename from src/registry.c
rename to src/bus/registry.c
similarity index 100%
rename from src/winvblock.rc
rename to src/bus/winvblock.rc
similarity index 100%
rename from src/aoe.h
rename to src/include/aoe.h
similarity index 100%
rename from src/bus.h
rename to src/include/bus.h
similarity index 100%
rename from src/bus_dev_ctl.h
rename to src/include/bus_dev_ctl.h
similarity index 100%
rename from src/bus_pnp.h
rename to src/include/bus_pnp.h
similarity index 100%
rename from src/debug.h
rename to src/include/debug.h
similarity index 100%
rename from src/disk.h
rename to src/include/disk.h
similarity index 100%
rename from src/disk_pnp.h
rename to src/include/disk_pnp.h
similarity index 100%
rename from src/disk_scsi.h
rename to src/include/disk_scsi.h
similarity index 100%
rename from src/driver.h
rename to src/include/driver.h
similarity index 100%
rename from src/filedisk.h
rename to src/include/filedisk.h
similarity index 100%
rename from src/grub4dos.h
rename to src/include/grub4dos.h
similarity index 100%
rename from src/irp.h
rename to src/include/irp.h
similarity index 100%
rename from src/mdi.h
rename to src/include/mdi.h
similarity index 100%
rename from src/memdisk.h
rename to src/include/memdisk.h
similarity index 100%
rename from src/mount.h
rename to src/include/mount.h
similarity index 100%
rename from src/portable.h
rename to src/include/portable.h
similarity index 100%
rename from src/probe.h
rename to src/include/probe.h
similarity index 100%
rename from src/protocol.h
rename to src/include/protocol.h
similarity index 100%
rename from src/ramdisk.h
rename to src/include/ramdisk.h
similarity index 100%
rename from src/registry.h
rename to src/include/registry.h
similarity index 100%
rename from src/resource.h
rename to src/include/resource.h
similarity index 100%
rename from src/winvblock.h
rename to src/include/winvblock.h
index 2be4571..aa5e05b 100644 (file)
@@ -31,8 +31,8 @@
 #include <Setupapi.h>
 #include <newdev.h>
 
-#include "../winvblock.h"
-#include "../portable.h"
+#include "winvblock.h"
+#include "portable.h"
 
 #define MAX_CLASS_NAME_LEN 64
 
index 975a774..6a2efff 100644 (file)
@@ -30,9 +30,9 @@
 #include <winioctl.h>
 #include <stdio.h>
 
-#include "../winvblock.h"
-#include "../portable.h"
-#include "../mount.h"
+#include "winvblock.h"
+#include "portable.h"
+#include "mount.h"
 
 typedef enum
 { CommandScan, CommandShow, CommandMount, CommandUmount, CommandAttach,