Is there a source code patch to look at? I don't necessarily need the binaries.Edit: File too large (27 MB at maximum compression). How may I submit the package?
ARM64 Support
-
- Site Admin
- Posts: 474
- Joined: Sun Aug 02, 2015 10:31 pm
Re: ARM64 Support
Re: ARM64 Support
I succeeded in building libwim-15.dll on MSYS2 with llvm-mingw toolchain.
Even the latest MinGW-w64 toolchain available on MSYS2 does not support aarch64-w64-mingw32 target.
However, LLVM/Clang does support ARM64 Windows target, and MSYS2 community was testing clang toolchain (ref) for it.
Thus I tried my best to compile wimlib with llvm based mingw-w64 toolchain, llvm-mingw.
[Used tools]
- MSYS2: latest update
- llvm-mingw: 20201020 with LLVM stable 11.0.0
[Build Instructions]
I adapted official windows cross compile build script to be used in MSYS2.
I also had to patch sources to make them compilable on LLVM/Clang.
- libxml2: linker detection of configure.ac had to be patched.
- wimlib: __declspec(dllexport) had to be added to every extern function prototypes of wimlib.h.
Read attached wimlib-llvm-aarch64-manual.7z for details.
[Binary]
Attached as wimlib-1.13.3-bin-aarch64.7z.
LLVM linker could not link wimlib-imagex.exe, so I could obtain only libwim-15.dll.
I have tested the ARM64 dll with my C# wimlib wrapper on Raspberry Pi 4B, and it worked without any issues.
The instruction, patches, and binaries are also available on GitHub repo of ManagedWimLib.
Even the latest MinGW-w64 toolchain available on MSYS2 does not support aarch64-w64-mingw32 target.
However, LLVM/Clang does support ARM64 Windows target, and MSYS2 community was testing clang toolchain (ref) for it.
Thus I tried my best to compile wimlib with llvm based mingw-w64 toolchain, llvm-mingw.
[Used tools]
- MSYS2: latest update
- llvm-mingw: 20201020 with LLVM stable 11.0.0
[Build Instructions]
I adapted official windows cross compile build script to be used in MSYS2.
I also had to patch sources to make them compilable on LLVM/Clang.
- libxml2: linker detection of configure.ac had to be patched.
- wimlib: __declspec(dllexport) had to be added to every extern function prototypes of wimlib.h.
Read attached wimlib-llvm-aarch64-manual.7z for details.
[Binary]
Attached as wimlib-1.13.3-bin-aarch64.7z.
LLVM linker could not link wimlib-imagex.exe, so I could obtain only libwim-15.dll.
Code: Select all
CCLD libwim.la
CCLD wimlib-imagex.exe
lld-link: error: undefined symbol: __declspec(dllimport) __winitenv
>>> referenced by C:\Joveler\llvm-mingw\aarch64-w64-mingw32\lib\crt2u.o:(.refptr.__imp___winitenv)
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:1318: wimlib-imagex.exe] Error 1
The instruction, patches, and binaries are also available on GitHub repo of ManagedWimLib.
- Attachments
-
- wimlib-1.13.3-bin-aarch64.7z
- (312.42 KiB) Downloaded 2552 times
-
- wimlib-llvm-aarch64-manual.7z
- (8.26 KiB) Downloaded 2263 times
Re: ARM64 Support
Wow, great work!joveler wrote: ↑Wed Apr 07, 2021 4:58 pm I succeeded in building libwim-15.dll on MSYS2 with llvm-mingw toolchain.
Even the latest MinGW-w64 toolchain available on MSYS2 does not support aarch64-w64-mingw32 target.
However, LLVM/Clang does support ARM64 Windows target, and MSYS2 community was testing clang toolchain (ref) for it.
Thus I tried my best to compile wimlib with llvm based mingw-w64 toolchain, llvm-mingw.
[Used tools]
- MSYS2: latest update
- llvm-mingw: 20201020 with LLVM stable 11.0.0
[Build Instructions]
I adapted official windows cross compile build script to be used in MSYS2.
I also had to patch sources to make them compilable on LLVM/Clang.
- libxml2: linker detection of configure.ac had to be patched.
- wimlib: __declspec(dllexport) had to be added to every extern function prototypes of wimlib.h.
Read attached wimlib-llvm-aarch64-manual.7z for details.
[Binary]
Attached as wimlib-1.13.3-bin-aarch64.7z.
LLVM linker could not link wimlib-imagex.exe, so I could obtain only libwim-15.dll.I have tested the ARM64 dll with my C# wimlib wrapper on Raspberry Pi 4B, and it worked without any issues.Code: Select all
CCLD libwim.la CCLD wimlib-imagex.exe lld-link: error: undefined symbol: __declspec(dllimport) __winitenv >>> referenced by C:\Joveler\llvm-mingw\aarch64-w64-mingw32\lib\crt2u.o:(.refptr.__imp___winitenv) clang-11: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [Makefile:1318: wimlib-imagex.exe] Error 1
The instruction, patches, and binaries are also available on GitHub repo of ManagedWimLib.
Thank you
Re: ARM64 Support
@zipmagic
could you share some details about your creation of ARM64 wimib-imagex.exe?
I mean thanks to joveler we have a simple way of creating libwim-15.dll from the current version.
All that's left is a non static linked version of wimib-imagex.exe.
could you share some details about your creation of ARM64 wimib-imagex.exe?
I mean thanks to joveler we have a simple way of creating libwim-15.dll from the current version.
All that's left is a non static linked version of wimib-imagex.exe.
Re: ARM64 Support
Hmm, I have no clue why this error disappeared, but it compiles fine now.
A quick test in QEMU did also gone well. Will test in next week on real ARM64 hardware.
A quick test in QEMU did also gone well. Will test in next week on real ARM64 hardware.
Last edited by JFX on Mon Mar 06, 2023 12:34 pm, edited 1 time in total.
Re: ARM64 Support
Glad you got it working. My effort was some time ago so I'm not sure I would have been much help today. At any rate the WIMBOOT driver for ARM64 just doesn't work and Microsoft has no plans to fix it considering it a deprecated technology, so this was an area of abandoned research effort for us here. Unless you know of an open source alternative to the stock WIMBOOT driver, of course
Re: ARM64 Support
Oh, did notice this topic is from 2018.
Your right about WIMBOOT not working on ARM64, but don't think the driver is the problem.
It's more like there is no early boot support through bootmgr.efi and winload.efi.
My test on a Surface Pro X were successful.
5 minutes faster than emulated x86_64 and still 3 minutes faster than imagex while capture a ~20GB installation using LZX compression.
I'm attaching a new binary, the last wasn't compiled with optimization.
Your right about WIMBOOT not working on ARM64, but don't think the driver is the problem.
It's more like there is no early boot support through bootmgr.efi and winload.efi.
My test on a Surface Pro X were successful.
5 minutes faster than emulated x86_64 and still 3 minutes faster than imagex while capture a ~20GB installation using LZX compression.
I'm attaching a new binary, the last wasn't compiled with optimization.
- Attachments
-
- wimlib-1.13.6-windows-aarch64-bin.zip
- (410.77 KiB) Downloaded 1977 times
Re: ARM64 Support
There's isn't any chance we might be able to address that as a third party, is there?
Re: ARM64 Support
No, it requires a (much bigger) exclusion list,
simular to a Windows 7 release using wimboot.
This also seems to be hardware depending, so for an end-user
who does not like experiments, it's just not suited.
simular to a Windows 7 release using wimboot.
This also seems to be hardware depending, so for an end-user
who does not like experiments, it's just not suited.
Re: ARM64 Support
Very interesting - are you sure a large enough exclusion list would address this problem? Do you have any lists of files you are willing to share?
We already did a lot of work to build the core Windows 7 exclusion lists (the file enumeration is part of our publicly accessible patent), but the bootup process never worked entirely consistently across devices/VMs.
Is this what you mean by hardware depending - inconsistencies in the boot process from device to device, despite having the same exclusion list?
Can you clarify which devices in particular you actually tested on? The only ARM Windows devices we have access to are Surface Pro X's and, of course, Parallels VMs running on macOS with M1/M2 hardware.
Have you also tested on other kinds of hardware? Our job is to make this easy for end-users so we're here to do the legwork and research.