ARM64 Support

Comments, questions, bug reports, etc.
zipmagic
Posts: 61
Joined: Thu Aug 06, 2015 7:09 am

ARM64 Support

Post by zipmagic »

Now that Visual Studio 2017 15.9.3 has full ARM64 support, can we look forward to an ARM64 version of WIMLIB soon?

What are the roadblocks that would keep this from happening, is there anything we can do to help surmount them?
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: ARM64 Support

Post by synchronicity »

Now that Visual Studio 2017 15.9.3 has full ARM64 support, can we look forward to an ARM64 version of WIMLIB soon?

What are the roadblocks that would keep this from happening, is there anything we can do to help surmount them?
I'd much prefer to keep using mingw-w64 to build the Windows binaries, rather than switching to Visual Studio. ARM64 support for mingw-w64 was added recently, so in theory it's actually possible already. However, it's very new and it would take extra effort to adopt it this early and figure out how to build the toolchain and wimlib's dependencies. (For example, Linux packages for mingw-w64 don't include the ARM64 support yet, so I'd need to build various things from source.) Also I don't currently have a way to test ARM64 Windows binaries anyway. And, you've been the only person to ask for this so far.

So I can only promise that I might get to it eventually. Of course, you're free to contribute, if you want this sooner rather than later.
zipmagic
Posts: 61
Joined: Thu Aug 06, 2015 7:09 am

Re: ARM64 Support

Post by zipmagic »

May it be possible to contribute with a donation of ARM64 hardware?

There's currently three decent ARM64 products in the market:

ASUS Nova Go - This was the first to hit the stores and is my first (and only) ARM64 device as well. 8 core Snapdragon 835. 6 GB RAM. 128 GB SSD. Classic laptop form factor.

Samsung Galaxy Book 2 - Looks like a Surface Pro. Snapdragon 850, so faster performance than the 835 (by 30% as advertised). 4 GB RAM. 128 GB SSD. Surface Pro form factor with detachable keyboard.

Lenovo Yoga - Snapdragon 850, 8 GB RAM, 256 GB SSD upcoming, immediately available with a 128 GB SSD. Classic laptop form factor.

128 GB nicely fits in a full install of Visual Studio 2017 when compressed with DriveSpace with plenty of room to spare!

Of course with DoubleSpace compression and its integrated dedup effect (when wimlib is available, or with WIMGAPI today), there'd be even more space savings - which is the goal of this exercise...

So would you accept a hardware donation for your efforts to bring ARM64 support to wimlib?
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: ARM64 Support

Post by synchronicity »

So would you accept a hardware donation for your efforts to bring ARM64 support to wimlib?
Thanks for the offer, but I'm not accepting donations for wimlib, especially if there's an implied expectation that I work on a certain feature due to the donation. I'm very busy with other projects these days, and there are still many other improvements on wimlib's TODO list as well. Windows ARM64 binaries might rise in priority eventually, but so far only one person (you) has asked for it, and at this early stage of toolchain support it may be difficult, as I mentioned; so it may be significant work even if I had the hardware.

But again, wimlib is open source; no one is stopping you from adding this yourself :-) The prebuilt LLVM and mingw-w64 based toolchains at https://github.com/mstorsjo/llvm-mingw/releases may be a good starting point. And in wimlib, tools/make-windows-release is the script that builds the i686 and x86_64 Windows binary releases, and README.WINDOWS documents how to run it on Windows in a Cygwin environment.
zipmagic
Posts: 61
Joined: Thu Aug 06, 2015 7:09 am

Re: ARM64 Support

Post by zipmagic »

Thank you for providing instructions on getting started.

I will be sure to take a look at it should I have the opportunity!
zipmagic
Posts: 61
Joined: Thu Aug 06, 2015 7:09 am

Re: ARM64 Support

Post by zipmagic »

Great news - we've finally made some progress!

The second developer I hired for this project is almost done.

He says that getting mingw to work on ARM64 was the most challenging part of the project, not migrating wimlib itself :lol:

Here's the ARM64 binary of wimib-imagex for starters :D

I'll run some tests of course, but I don't anticipate any issues as of this writing, cross your fingers! :P

Would you like to review the updated sources?

I'm not sure if I'll be getting the mingw sources, since that wasn't part of my original agreement with the developer - its up to him at this stage.

I know you weren't happy with DiskZIP's contribution of the Pascal headers...hopefully this work is much better quality now.
Attachments
wimlib-imagex.7z
ARM64 compiled binary
(804.71 KiB) Downloaded 869 times
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: ARM64 Support

Post by synchronicity »

Great! Yes, I can review the wimlib patch(es). Just posting the patch file here or providing a link to a git repository is fine to start, but if it seems it will need substantial feedback I can put wimlib's git repository on Github for a pull request to be made to.

Note that the wimlib patch should include a script to automatically build or download the needed MinGW toolchain and dependencies (probably as an update to the existing Makefile in the tools/windeps/ directory), and an update to tools/make-windows-release to make the release .zip file of the ARM64 build. Documentation that explains how to do the ARM64 build manually might also be acceptable, though less ideal than automating it.

Also: were changes to MinGW source code required, or was it just a matter of configuring and building it correctly?
zipmagic
Posts: 61
Joined: Thu Aug 06, 2015 7:09 am

Re: ARM64 Support

Post by zipmagic »

I've asked the author and this was his response:

"Yes, I am only change some libraries on mingw toolchain and use clang instead gcc, because gcc version have some problems with building for Arm64(mingw I mean)."

I was able to test the EXE successfully yesterday, it seems to be working very well. I haven't spotted any irregularities thus far. I will be running some more tests today, because according to my findings thus far, WIMBOOT is actually not working on ARM64 at all! :o

There is also another problem. The DLL has not been built yet, because in the words of the author again:

"Mingw dlltool is halting when create dll, I am trying to understand a reason and correct this"
zipmagic
Posts: 61
Joined: Thu Aug 06, 2015 7:09 am

Re: ARM64 Support

Post by zipmagic »

I checked with dism against the possibility that something might be wrong with the ARM64 build of WIMLIB...it still doesn't work at all in the WIMBOOT scenario. Testing the same tools inside a VMware virtual machine (not ARM64, of course), with the exact same command line parameters, works beautifully. So all I can deduce at this point is that there's really no ARM64 support in WIMBOOT somehow - despite all the plumbing apparently being in place. :shock:
zipmagic
Posts: 61
Joined: Thu Aug 06, 2015 7:09 am

Re: ARM64 Support

Post by zipmagic »

Due to this unforeseen development, we have had to withdraw from this effort.

I have attached the very latest state of the ARM64 adapted code, as it was sent to me by its developer.

I hope it is a useful contribution to the great WIMLIB product!

Thank you again, very much indeed, for this wonderful library called WIMLIB :)

Edit: File too large (27 MB at maximum compression). How may I submit the package?
Post Reply