Search code examples
windowsdriverdevicedevice-mapper

Can I port a Linux DMA driver to Windows?


I want to run it on Windows without a significant change.

I hope, I can change only headers and corresponding functions.

http://www.alterawiki.com/wiki/File:G2x4_avmm_dma_Linux.tar.gz


Solution

  • Yes, you can, if you have a brain of a programmer, know well C, asm, and computer architecture, and have around 2-4 years to learn driver programming on windows and on linux as well.

    But if you have all of these, you will be able to get a job with at least thousands dollar (euro) on the best places of the world, or even to get an IT work visa into them if you weren't enough lucky to born indoors already.

    Anyways, you will surely better outcome if you buy a device with a working windows driver.

    But don't forget: the driver interface between linux and windows differs a lot. Yes, really a lot. No, it won't be so simply that you simply changes some header. You will practically have to rewrite the driver. It is not as with the high-level languages, a simple porting/wrapper classes won't be enough.

    There are some linux drivers who are ported from win and it is very visible on them, and yet more who are using practically an OS-independent internal layer (which is distributed often only as binary), with an OS-dependant outer source. But these structural decisions was made at the beginning of the development.

    As an alternative solution, you could try some virtualization solution on a linux, and sharing the device with the alternate OS.