-
Notifications
You must be signed in to change notification settings - Fork 17.8k
GoMips
Go programs can be cross-compiled e.g., on x86/x86_64 build systems to run on MIPS target machines.
Go supports the following MIPS architectural families. (Are there more?)
Architecture | Status | GOMIPS value | GOARCH value |
---|---|---|---|
Big endian (e.g., ar71xx) | supported | GOMIPS=softfloat | GOARCH=mips |
Little endian | supported | n/a | GOARCH=mipsle |
- MIPS on Linux. Tested with an ar71xx based OpenWrt device.
The tested version for running Go on MIPS systems is Go 1.13.
This builds a Go program, strips unneeded strings and symbols to minimize its size, and compresses it to further minimize its size:
env GOOS=linux GOARCH=mips GOMIPS=softfloat go build -trimpath -ldflags="-s -w" 'server.go'
upx -9 server
MIPS hardware comes in a myriad of shapes and sizes. If you've had a success story building and running Go on your Arm system, please detail your results here.
Architecture: ar71xx
Operating System: OpenWrt
The D-Link DIR-505 Mobile Companion comes with an Atheros AR1311 processor, 8 MB flash and 64 MB RAM. This space is limited but allows us to load Go applications, e.g., from network into /tmpfs
and execute them from there.
Further information about the device can be found at https://openwrt.org/toh/d-link/dir-505.