[GH-ISSUE #39] Linux/mips binary #16

Closed
opened 2026-05-05 10:57:05 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @bluemeda on GitHub (Oct 18, 2017).
Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/39

please provide linux/mips (32bit) binary

Originally created by @bluemeda on GitHub (Oct 18, 2017). Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/39 please provide linux/mips (32bit) binary
Author
Owner

@bluemeda commented on GitHub (Oct 18, 2017):

Solved, finally I can compile it by myself
just go to cmd/tunnel
get the dependencies
go get -u gopkg.in/yaml.v2
go get -u github.com/cenkalti/backoff
then compile it
GOOS=linux GOARCH=mips go build

<!-- gh-comment-id:337540804 --> @bluemeda commented on GitHub (Oct 18, 2017): Solved, finally I can compile it by myself just go to `cmd/tunnel` get the dependencies `go get -u gopkg.in/yaml.v2` `go get -u github.com/cenkalti/backoff` then compile it `GOOS=linux GOARCH=mips go build`
Author
Owner

@bluemeda commented on GitHub (Oct 18, 2017):

I just compiled it successfully, but when I executed it in LEDE(openWRT) it said Illegal instruction

<!-- gh-comment-id:337545666 --> @bluemeda commented on GitHub (Oct 18, 2017): I just compiled it successfully, but when I executed it in LEDE(openWRT) it said `Illegal instruction`
Author
Owner

@mmatczuk commented on GitHub (Oct 18, 2017):

  1. export CGO_ENABLED=0
  2. Get to know if it's mips or mipsle (32-bit MIPS big- and little-endian)
<!-- gh-comment-id:337579629 --> @mmatczuk commented on GitHub (Oct 18, 2017): 1. `export CGO_ENABLED=0` 1. Get to know if it's mips or mipsle (32-bit MIPS big- and little-endian)
Author
Owner

@bluemeda commented on GitHub (Oct 19, 2017):

this is my cpuinfo

system type		: bcm63xx/HW553 (0x6358/0xA1)
machine			: Huawei EchoLife HG553
processor		: 0
cpu model		: Broadcom BMIPS4350 V1.0
BogoMIPS		: 297.98
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 32
extra interrupt vector	: yes
hardware watchpoint	: no
isa			: mips1 mips2 mips32r1
ASEs implemented	:
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VCED exceptions		: not available
VCEI exceptions		: not available

I think it does not support FPU. So, any go-based code can't be executed.

<!-- gh-comment-id:337807790 --> @bluemeda commented on GitHub (Oct 19, 2017): this is my cpuinfo ``` system type : bcm63xx/HW553 (0x6358/0xA1) machine : Huawei EchoLife HG553 processor : 0 cpu model : Broadcom BMIPS4350 V1.0 BogoMIPS : 297.98 wait instruction : yes microsecond timers : yes tlb_entries : 32 extra interrupt vector : yes hardware watchpoint : no isa : mips1 mips2 mips32r1 ASEs implemented : shadow register sets : 1 kscratch registers : 0 package : 0 core : 0 VCED exceptions : not available VCEI exceptions : not available ``` I think it does not support **FPU**. So, any go-based code can't be executed.
Author
Owner

@mmatczuk commented on GitHub (Oct 19, 2017):

It seems there are two options

  1. recompile kernel to enable softfloat
  2. use 1.8.3 with a patch from https://github.com/golang/go/issues/18162 https://gist.github.com/ematsu/0410ef110e1e9ad9733b9f8dccfe729b/archive/73f8f580bb6fb07c1d12bf60008df9c66c9d0e46.zip

Good luck!

<!-- gh-comment-id:337812034 --> @mmatczuk commented on GitHub (Oct 19, 2017): It seems there are two options 1. recompile kernel to enable softfloat 1. use 1.8.3 with a patch from https://github.com/golang/go/issues/18162 https://gist.github.com/ematsu/0410ef110e1e9ad9733b9f8dccfe729b/archive/73f8f580bb6fb07c1d12bf60008df9c66c9d0e46.zip Good luck!
Author
Owner

@RoganDawes commented on GitHub (Oct 16, 2020):

This is my command line for compiling the client for my OpenWrt router (MT7621), using go1.14.9:

GOMIPS=softfloat GOOS=linux GOARCH=mipsle go build -ldflags="-s -w"
<!-- gh-comment-id:710078632 --> @RoganDawes commented on GitHub (Oct 16, 2020): This is my command line for compiling the client for my OpenWrt router (MT7621), using go1.14.9: ``` GOMIPS=softfloat GOOS=linux GOARCH=mipsle go build -ldflags="-s -w" ```
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/go-http-tunnel#16
No description provided.