-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all: port to Windows/ARM32 #26148
Comments
I'm curious why was the port developed out-of-tree? I'm asking because I'm afraid it's much more complicated to properly review such a big change, as an port to new architecture is, in a single CL. In any case, please check https://github.com/golang/go/blob/master/CONTRIBUTING.md and the linked from there https://golang.org/doc/contribute.html for more details. (Personal wish: Please spell the name of the language as 'Go'.) |
@jordanrh1 you should read https://github.com/golang/go/wiki/PortingPolicy Alex |
@cznic We were under a tight deadline and did not know if it was feasible. This is the earliest I could engage the community. We can break down the change into smaller chunks if necessary. @alexbrainman Thanks for the link. We are committed to meeting the requirements outlined in the doc. |
SGTM. Alex |
Change https://golang.org/cl/125643 mentions this issue: |
Updates golang/go#26148 Change-Id: I23a2c7bd1c2f8f7c960aaedfe0dcdee4e11825ab Reviewed-on: https://go-review.googlesource.com/125643 Reviewed-by: Andrew Bonventre <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
Change https://golang.org/cl/125648 mentions this issue: |
Change https://golang.org/cl/125649 mentions this issue: |
Change https://golang.org/cl/125645 mentions this issue: |
Change https://golang.org/cl/125647 mentions this issue: |
Change https://golang.org/cl/125646 mentions this issue: |
Change https://golang.org/cl/128715 mentions this issue: |
Change https://golang.org/cl/128716 mentions this issue: |
Updates #26148 Change-Id: I407481f9c0f8e3565dcfcbbc53e5aa7427d74680 Reviewed-on: https://go-review.googlesource.com/125646 Reviewed-by: Brad Fitzpatrick <[email protected]>
Enable 'go tool objdump' to disassemble windows/arm images. Updates #26148 Change-Id: I7d11226f01d92288061f8e25980334b9bd82c41f Reviewed-on: https://go-review.googlesource.com/125649 Reviewed-by: Brad Fitzpatrick <[email protected]>
Change https://golang.org/cl/130056 mentions this issue: |
Updates #26148 Change-Id: I4744ebcc77fda3acc1301a1d8857754c0ee797fa Reviewed-on: https://go-review.googlesource.com/130056 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
Enable the Go linker to generate executables for windows/arm. Generates PE relocation tables, which are used by Windows to dynamically relocate the Go binary in memory. Windows on ARM requires all modules to be relocatable, unlike x86/amd64 which are permitted to have fixed base addresses. Updates #26148 Change-Id: Ie63964ff52c2377e121b2885e9d05ec3ed8dc1cd Reviewed-on: https://go-review.googlesource.com/125648 Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
Updates #26148 Change-Id: I008502232642237270b7c8a2efb4a378345d06fd Reviewed-on: https://go-review.googlesource.com/128716 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
Change https://golang.org/cl/131282 mentions this issue: |
Updates #26148 Change-Id: I8f68b2c926c7b11dc86c9664ed7ff2d2f78b64b4 Reviewed-on: https://go-review.googlesource.com/128715 Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
Change https://golang.org/cl/127665 mentions this issue: |
@jordanrh1 Is there an issue for porting to Windows/ARM64 too? Thanks. |
@petemoore There is not. |
It seems exes built with GOOS=windows GOARCH=arm with the current master won't run on Windows RT 8.1, failing with "This app can't run on your PC". This is with code signature checking subverted. I haven't looked into it yet so I'm unsure of details and I know this platform is out of support, but is this a configuration that theoretically should be working? By the way, fantastic work. |
You also need to specify |
Unfortunately it's still failing with the same error. I made sure to clear the Go build cache and delete the output .exe, so I'm fairly sure it is getting rebuilt properly. I've put my test file / command below.
|
If you have time, try starting it under the usermode debugger, and see if it offers any clues:
If it fails to start, then it's probably being rejected by the loader. To troubleshoot loader errors, connect kernel debugger and turn on loader snaps,
Then try running the program. Loader spew will be printed to the windbg window. |
I definitely have time to do some tests and try to fix this, but likewise, don't worry about this platform too much if nobody considers it important! Unfortunately it appears security restrictions in Windows RT prevent the debugger from creating or attaching to processes. If you know of any other way to get log messages out of the linker / loader I'll happily try that, otherwise I'll reply later if I end up getting the debugger working somehow. Edit: Running the program a different way, I can see it produces ERROR_BAD_EXE_FORMAT (%1 is not a valid Win32 application.) |
@jordanrh1 I managed to run windows-arm on one of my RPIs. The only bits I am still missing is git command. What do you do for git on windows-arm? @bradfitz is there a git command that is written in pure Go? I would just compile it to windows-arm and use it there. I would not need anything fancy, just basic git functionality. Thank you. Alex |
@alexbrainman, the builders don't use git. They only run the x/build/cmd/buildlet binary and the cmd/coordinator pushes code in tarballs at them. |
Fair enough. I suppose I have to find a way to develop on this thing. Alex |
I do all my development on linux and cross compile to windows/arm. |
I do too. But I was trying to fix #30711. And that involved running cmd/go.TestScript, and cmd/go.TestScript runs go.exe executable. So I needed all moving parts. I used $GOROOT/src/bootstrap.bash (luckily for me it worked without a hitch) to create a snapshot of current Go tree with executables and built packages, and copied all these files onto RPI. And then run the test. I did not have Git, so I had to be careful when changing files to fix #30711. The fix was small enough for me to manage without Git. But I would not use that setup for anything bigger than that. RPI runs standard Windows file and printer sharing services, and I was able to mount shares from RPI on my Windows PC. Maybe (I did not try that) I could just use Git on my Windows PC to manage Go repo installed on RPI. I will see next time I use that. Another thing. While debugging, I searched for windows-arm prebuilt image on https://golang.org/dl and it is not there. @bradfitz maybe we should put latest windows-arm image at https://golang.org/dl. I doubt there is need for ,msi file, but we should put .zip file alongside with 386 and amd64. Also @jordanrh1 I struggled to make Windows 10 running on some of my RPIs. I have RPI 3 B+. I downloaded "IoT Dashboard", and it gives me option of installing "Windows 10 IoT Core (17763)". I created SD card (ScanDisk Ultra 16GB), but RPI does not boot - red power light comes on, and I get rainbow image on my HDMI screen, but nothing happens. I also have RPI 2 B. I tried booting this with the same image - red light is on, green light flashes 4 slow times followed by 4 quick times, same rainbow image on the screen. I managed to run Windows on RPI 3 B. But I would like to make my other RPIs run Windows. Do you have any suggestions? Also I noticed that windows-arm builder is not listed on https://build.golang.org Can you, please, investigate what happened to it? I also wonder, if we could run windows-arm build on multiple RPI devices to make it faster? Maybe we could even run it on virtual hardware (crazy idea). Like https://www.newventuresoftware.com/blog/running-windows-10-iot-core-in-a-virtual-machine or Thank you. Alex |
@jordanrh1, per http://golang.org/wiki/PortingPolicy#requirements-for-a-new-port, “[t]he builder must already be running” for new ports. I don't see any results for the Has this port been abandoned? |
Hi - there is already a port available at https://github.com/thongtech/go-windows-arm64 - does this help ? |
Hi everyone, we will be submitting a patch in the near future that adds Windows/ARM32 support to GO. All but a few tests are passing, and this implementation has been used to compile GO itself and run Docker containers on Windows/ARM32. We look forward to working with the community to iron out the last remaining issues and get this merged!
The text was updated successfully, but these errors were encountered: