diff --git a/libwdi/embedder_files.h b/libwdi/embedder_files.h index 587ead9..6b67bc8 100644 --- a/libwdi/embedder_files.h +++ b/libwdi/embedder_files.h @@ -73,6 +73,11 @@ struct emb embeddable_fixed[] = { { 0, LIBUSB0_DIR "\\bin\\amd64\\libusb0.sys", "amd64" }, { 0, LIBUSB0_DIR "\\bin\\amd64\\install-filter.exe", "amd64" }, # endif // OPT_M64 +# if defined(OPT_ARM) + { 0, LIBUSB0_DIR "\\bin\\arm64\\libusb0.dll", "arm64" }, + { 0, LIBUSB0_DIR "\\bin\\arm64\\libusb0.sys", "arm64" }, + { 0, LIBUSB0_DIR "\\bin\\arm64\\install-filter.exe", "arm64" }, +# endif // OPT_ARM { 0, LIBUSB0_DIR "\\installer_license.txt", "license\\libusb0" }, #endif // LIBUSB0_DIR diff --git a/libwdi/libusb0.inf.in b/libwdi/libusb0.inf.in index 3a6d9fd..ad0efc3 100644 --- a/libwdi/libusb0.inf.in +++ b/libwdi/libusb0.inf.in @@ -23,7 +23,7 @@ HKR,,,0,"libusb-win32 devices" HKR,,Icon,,-20 [Manufacturer] -%VendorName% = Devices, NT, NTAMD64 +%VendorName% = Devices, NT, NTAMD64, NTARM64 ;-------------------------------------------------------------------------- ; libusb-win32 files @@ -42,7 +42,10 @@ libusb0.sys = 1,amd64 libusb0.dll = 1,amd64 #LK_DLL# #LK_EQ_X64# libusb0_x86.dll = 1,x86 -#LK_X86_DLL# #LK_EQ_X86# + +[SourceDisksFiles.arm64] +libusb0.sys = 1,arm64 +libusb0.dll = 1,arm64 [DestinationDirs] libusb_files_sys = 10,system32\drivers @@ -73,6 +76,8 @@ CopyFiles = libusb_files_sys, libusb_files_dll_x86 [LIBUSB_WIN32_DEV.NTAMD64] CopyFiles = libusb_files_sys, libusb_files_dll, libusb_files_dll_wow64 +[LIBUSB_WIN32_DEV.NTARM64] +CopyFiles = libusb_files_sys, libusb_files_dll [LIBUSB_WIN32_DEV.NT.HW] DelReg = libusb_del_reg_hw AddReg = libusb_add_reg_hw @@ -81,12 +86,19 @@ AddReg = libusb_add_reg_hw DelReg = libusb_del_reg_hw AddReg = libusb_add_reg_hw +[LIBUSB_WIN32_DEV.NTARM64.HW] +DelReg = libusb_del_reg_hw +AddReg = libusb_add_reg_hw + [LIBUSB_WIN32_DEV.NT.Services] AddService = libusb0, 0x00000002, libusb_add_service [LIBUSB_WIN32_DEV.NTAMD64.Services] AddService = libusb0, 0x00000002, libusb_add_service +[LIBUSB_WIN32_DEV.NTARM64.Services] +AddService = libusb0, 0x00000002, libusb_add_service + ; Older versions of this .inf file installed filter drivers. They are not ; needed any more and must be removed [libusb_del_reg_hw] @@ -129,3 +141,6 @@ ServiceBinary = %12%\libusb0.sys [Devices.NTAMD64] %DeviceName% = LIBUSB_WIN32_DEV.NTAMD64, USB\%DeviceID% + +[Devices.NTARM64] +%DeviceName% = LIBUSB_WIN32_DEV.NTARM64, USB\%DeviceID% diff --git a/libwdi/libwdi.c b/libwdi/libwdi.c index 0bd1296..69de1ff 100644 --- a/libwdi/libwdi.c +++ b/libwdi/libwdi.c @@ -704,7 +704,7 @@ BOOL LIBWDI_API wdi_is_driver_supported(int driver_type, VS_FIXEDFILEINFO* drive #endif case WDI_LIBUSB0: #if defined(LIBUSB0_DIR) - return (platform_arch == IMAGE_FILE_MACHINE_AMD64 || platform_arch == IMAGE_FILE_MACHINE_I386); + return (platform_arch == IMAGE_FILE_MACHINE_ARM64 || platform_arch == IMAGE_FILE_MACHINE_AMD64 || platform_arch == IMAGE_FILE_MACHINE_I386); #else return FALSE; #endif