/wdrbd9

DRBD driver for windows

Primary LanguageCGNU General Public License v2.0GPL-2.0

Note: Please also see the file INSTALL

# DRBD for Windows

These are scripts to convert a Linux-DRBD-9 codebase to Windows-compatible 
files that can be compiled via CL.EXE.

## Prerequisites
- You'll need the EWDK 10[1] (the "Enterprise Windows Driver Kit"),
  respectively at least the part addressed as
  "ewdk/Program Files/Windows Kits/10/Include", and the matching Visual C
  compiler ("CL.EXE") and associated build tools (like "MSBUILD.EXE").

- On the Windows machine you'll need enough of the Cygwin tools to run the
  conversion; so for example "make", "perl", "patch", "sed", "awk", "cp", "rm".

- Create a certificate for driver signing, and example script can be found in
  the source code (see next sections) in ./crypto


## Compiling from a tarball
- Extract the tarball (tar xvf wdrbd-$version.tar.gz)
- cd wdrbd-$version
- Addapt the path to the SDK in Makefile.win

### On Windows
- make

### On GNU/Linux
- make
- switch to the Windows machine and type "make" to compile the final driver

## Development (tested on a combination of GNU/Linux and Windows):
Start on the GNU/Linux side:
- Get the source via "git clone --recursive git://git.linbit.com/wdrbd.git"
- Install spatch/coccinelle
- Addapt the path to the SDK in Makefile.win
- *IMPORTANT*: Change the source files, *DO NOT* change the files in
  ./converted-sources, they will be overwritten.
- Addapt the path to the SDK in Makefile.win
- make # to execute the transormations
- switch to the Windows machine and type "make"

[1]: https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/installing-the-enterprise-wdk