12
2023
04
15:31:25

Building the drivers using Windows 11 21H2 EWDK

https://github.com/virtio-win/kvm-guest-drivers-windows/wiki/Building-the-drivers-using-Windows-11-21H2-EWDK

https://github.com/virtio-win/kvm-guest-drivers-windows

https://www.linux-kvm.org/page/Virtio

http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers

https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.229-1/


Steps required for building

  1. Download Windows 11 21H2 EWDK ISO (https://go.microsoft.com/fwlink/?linkid=2202360) and mount it (let's say to E:\). You can download the ISO to the host and connect it to the VM as CD-ROM.

  2. Download and install WinFSP (https://github.com/billziss-gh/winfsp/releases/tag/v1.10) with "Core", "Developer" and "Kernel Developer" features enabled.

  3. Download and install CPDK 8.0 (https://www.microsoft.com/en-us/download/details.aspx?id=30688).

  4. Download and install .NET Framework version 4.8 (https://dotnet.microsoft.com/download/dotnet-framework/thank-you/net48-web-installer). Windows Server 2022 and Windows 11 don't need it.

  5. Open command-line and run E:\LaunchBuilEnv.cmd.

  6. Change directory to kvm-guest-drivers-windows.

  7. Run build_AllNoSdv.bat [Win8|Win8.1|Win10] depending on your Windows version. Choose Win10 for Windows Server 2022 and Windows 11.

  8. Run Tools\signAll.bat to sign drivers. Loading of test-signed drivers must be enabled on your system (https://docs.microsoft.com/en-us/windows-hardware/drivers/install/the-testsigning-boot-configuration-option).

  9. Find drivers/services in folders named Install inside driver folders.

Additional steps for driver development

  1. Copy EWDK to a local directory for convenience

  • copy entire content to local directory (for example c:\ewdk11): mkdir c:\ewdk11 && xcopy /e e:\* c:\ewdk11

  • unmount and delete Windows 11 21H2 EWDK ISO file

  • set EWDK11_DIR=<Copy_Of_EWDK 11>

  1. CodeQL Windows Setup

  • mkdir C:\codeql-home

  • Navigate to the Github CodeQL Download Page

  • Download version 2.4.6 of the zip file if you are certifying a driver for the Windows Hardware Compatibility Program in 2021. For example for 64 bit Windows "codeql-win64.zip".

  • Unzip the codeql folder in the zip file to C:\codeql-home\codeql\ directory.

  • Confirm that the CodeQL command works by displaying the help. C:\codeql-home\codeql\>codeql --help

  1. Clone the repository to access the driver-specific queries

C:\codeql-home\>git clone https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools.git --recursive -b RELEASE_BRANCH

Replace RELEASE_BRANCH with the appropriate branch depending on the OS you are certifying for, per the following table:

ReleaseBranch to use
Windows Server 2022WHCP_21H2
Windows 11WHCP_21H2

Notes on Windows 11 21H2 EWDK

Windows 11 21H2 EWDK is the recommended environment for drivers build.

  • At the moment of transition to EWDK, the drivers will be built using Windows 11 EWDK.

  • Currently usage of Windows 11 EWDK is blocked by the following issues: the need to separate SDV build (all the drivers should have SDV logs), CodeQL analysis errors, and ARM64 build error.

Notes on the build batch

The building of drivers for the following operating systems is not supported by the batch build procedure:

  • Windows XP / Server 2003

  • Windows Vista / Server 2008

  • Windows 7 / Server 2008R2

Note: latest tag that supports the building of drivers for legacy operating systems:

Run buildAll.bat for complete build including SDV. Note that a SDV build takes long time.

Set VIRTIO_WIN_SDV_2022=1 to build DVL for system device drivers.



https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/

image.png

文章发布当天截的图

https://github.com/virtio-win/kvm-guest-drivers-windows

image.png

README

附一个安装说明


把下载好的iso包挂载到虚拟机下(下载推荐多线程下载器,要不然国内下的超级慢,我直接拿ndm冲32线程下的),如果是win7请去设备管理器里右键网卡选择虚拟光驱安装驱动,win10或以上直接运行盘里面的exe就行了,提示签名问题就换个iso包


image.png


以上内容为210614撰写


220414更新:标题添加关键字,以及写一个另类给win虚拟机装驱动的方法




因为完整的iso包下的实在是太慢了,有差不多500M,而且下下来不能用还得重新下,属实是太费时费力了,然而单一个msi的包却很小,就5M多一点


不过考虑到要塞一个文件到虚拟机里属实不太方便,所以写一个我的解决办法


先下载msi包


使用bandizip把msi打包成iso(只要能压缩成iso的压缩软件都可以)

image.png


把iso包上传到宿主机,我这是pve就放一个pve的截图了,unraid或者别的机子同理


image.png

把iso挂载到需要的虚拟机上(懒得截图了)


之后在win上安装就行了


image.png

多台虚拟机还能很方便的复用




推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

本文链接:https://hqyman.cn/post/3852.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:
打赏





休息一下~~


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

请先 登录 再评论,若不是会员请先 注册

您的IP地址是: