[GH-ISSUE #198] OpenWrt15.05 ar71xx应该使用哪个版本? #135

Closed
opened 2026-05-05 11:49:46 -06:00 by gitea-mirror · 11 comments
Owner

Originally created by @Anyfc on GitHub (Dec 26, 2016).
Original GitHub issue: https://github.com/fatedier/frp/issues/198

下载了最新的frp_0.9.0_linux_mips.tar.gz 无论是输入 ./frpc_linux_mips -h 还是./frpc_linux_mips -c ./frpc.ini 都提示 Illegal instruction ,
而下载frp_0.9.0_linux_mipsle.tar.gz ,输入./frpc_linux_mipsle: line 1: syntax error: unexpected "("
时则提示 ./frpc_linux_mipsle: line 1: syntax error: unexpected "("

Originally created by @Anyfc on GitHub (Dec 26, 2016). Original GitHub issue: https://github.com/fatedier/frp/issues/198 下载了最新的frp_0.9.0_linux_mips.tar.gz 无论是输入 ./frpc_linux_mips -h 还是./frpc_linux_mips -c ./frpc.ini 都提示 Illegal instruction , 而下载frp_0.9.0_linux_mipsle.tar.gz ,输入./frpc_linux_mipsle: line 1: syntax error: unexpected "(" 时则提示 ./frpc_linux_mipsle: line 1: syntax error: unexpected "("
Author
Owner

@fatedier commented on GitHub (Dec 26, 2016):

具体我不是很了解,mips 是 32 位的,如果是 64 位系统的就用 mips64,是否有 le 取决于系统是大端还是小端模式。

<!-- gh-comment-id:269220765 --> @fatedier commented on GitHub (Dec 26, 2016): 具体我不是很了解,mips 是 32 位的,如果是 64 位系统的就用 mips64,是否有 le 取决于系统是大端还是小端模式。
Author
Owner

@lotc commented on GitHub (Dec 29, 2016):

@Anyfc ar71xx 是另外一种架构,不可使用 mips 版本,需要另外编译。
根据平台类别,ar71xx 应该是 big end 的 mips。再确认一下架构是否正确。

<!-- gh-comment-id:269674202 --> @lotc commented on GitHub (Dec 29, 2016): @Anyfc ~~ar71xx 是另外一种架构,不可使用 mips 版本,需要另外编译。~~ 根据[平台类别](https://dev.openwrt.org/wiki/platforms),ar71xx 应该是 big end 的 mips。再确认一下架构是否正确。
Author
Owner

@Anyfc commented on GitHub (Dec 31, 2016):

@lotc 搜了一圈好像ar71xx的很多都不能正常的运行mips,需要重新编译,
https://github.com/xtaci/kcptun/issues/308

<!-- gh-comment-id:269841523 --> @Anyfc commented on GitHub (Dec 31, 2016): @lotc 搜了一圈好像ar71xx的很多都不能正常的运行mips,需要重新编译, https://github.com/xtaci/kcptun/issues/308
Author
Owner

@fatedier commented on GitHub (Dec 31, 2016):

应该目前 go1.8 对 mips 的支持还不是很好,有 bug 吧。

<!-- gh-comment-id:269849159 --> @fatedier commented on GitHub (Dec 31, 2016): 应该目前 go1.8 对 mips 的支持还不是很好,有 bug 吧。
Author
Owner

@lotc commented on GitHub (Jan 24, 2017):

在 AR7161 的平台上测试了一下
mips 是 Illegal instruction
mipsle 是 ./frpc: line 1: syntax error: unexpected "("

<!-- gh-comment-id:274679235 --> @lotc commented on GitHub (Jan 24, 2017): 在 AR7161 的平台上测试了一下 mips 是 `Illegal instruction` mipsle 是 `./frpc: line 1: syntax error: unexpected "("`
Author
Owner

@Anyfc commented on GitHub (Jan 24, 2017):

@lotc 提示 Illegal instruction 好像是因为内核中没有开启FPU
这个教程是这样说的: http://iytc.net/wordpress/?p=1564

<!-- gh-comment-id:274730750 --> @Anyfc commented on GitHub (Jan 24, 2017): @lotc 提示 Illegal instruction 好像是因为内核中没有开启FPU 这个教程是这样说的: http://iytc.net/wordpress/?p=1564
Author
Owner

@lotc commented on GitHub (Jan 24, 2017):

@Anyfc 我这里测试的是 frps, 不是 kcptun.

<!-- gh-comment-id:274735367 --> @lotc commented on GitHub (Jan 24, 2017): @Anyfc 我这里测试的是 frps, 不是 kcptun.
Author
Owner

@Anyfc commented on GitHub (Jan 24, 2017):

@lotc 我刚编译了个OpenWrt15.05 ar71xx可用的frpc
你试试
https://pan.baidu.com/s/1dFcIWUH 密码: 4fvz

<!-- gh-comment-id:274773992 --> @Anyfc commented on GitHub (Jan 24, 2017): @lotc 我刚编译了个OpenWrt15.05 ar71xx可用的frpc 你试试 https://pan.baidu.com/s/1dFcIWUH 密码: 4fvz
Author
Owner

@lotc commented on GitHub (Jan 25, 2017):

@Anyfc 可以运行.
最好给出编译的环境和步骤, 这样也方便作者和其他用户自行修正.

<!-- gh-comment-id:274995748 --> @lotc commented on GitHub (Jan 25, 2017): @Anyfc 可以运行. 最好给出编译的环境和步骤, 这样也方便作者和其他用户自行修正.
Author
Owner

@Anyfc commented on GitHub (Jan 25, 2017):

@lotc @fatedier
根据搜索到的资料,在运行时提示: Illegal instruction 是因为内核中没有开启FPU

这个时候可以用gomini编译,我的编译系统是debian7.5 64位

步骤:
编译go-mips32

git clone https://github.com/gomini/go-mips32.git
cd go-mips32/src
export GOOS=linux
export GOARCH=mips32
./make.bash

下载frp

git clone https://github.com/fatedier/frp.git cd frp

保存下面的命令到build.sh,运行成功即可在bin目录看到frpc

#GOROOT指向编译完成的go-mips32代码
export GOPATH=~/go-mips32/src/gocode
export GOOS=linux
export GOARCH=mips32
export GOROOT=~/go-mips32
export PATH=~/go-mips32/bin:$PATH

go get -v github.com/docopt/docopt-go
go get -v github.com/fatedier/frp/src/models/client
go get -v github.com/fatedier/frp/src/utils/log
go get -v github.com/fatedier/frp/src/utils/version
go get -v github.com/mitchellh/gox
go get -v github.com/rakyll/statik

go fmt ./src/...
go fmt ./test/echo_server.go
go fmt ./test/http_server.go
go fmt ./test/func_test.go
go build -o bin/frps ./src/cmd/frps
go build -o bin/frpc ./src/cmd/frpc
go build -o test/bin/echo_server ./test/echo_server.go
go build -o test/bin/http_server ./test/http_server.go

参考:http://www.jianshu.com/p/e6e354cd7bc1
http://www.jianshu.com/p/e83223af906a

<!-- gh-comment-id:275012345 --> @Anyfc commented on GitHub (Jan 25, 2017): @lotc @fatedier 根据搜索到的资料,在运行时提示: Illegal instruction 是因为内核中没有开启FPU 这个时候可以用gomini编译,我的编译系统是debian7.5 64位 步骤: 编译go-mips32 git clone https://github.com/gomini/go-mips32.git cd go-mips32/src export GOOS=linux export GOARCH=mips32 ./make.bash 下载frp `git clone https://github.com/fatedier/frp.git cd frp` 保存下面的命令到build.sh,运行成功即可在bin目录看到frpc #GOROOT指向编译完成的go-mips32代码 `export GOPATH=~/go-mips32/src/gocode` export GOOS=linux export GOARCH=mips32 `export GOROOT=~/go-mips32` `export PATH=~/go-mips32/bin:$PATH` go get -v github.com/docopt/docopt-go go get -v github.com/fatedier/frp/src/models/client go get -v github.com/fatedier/frp/src/utils/log go get -v github.com/fatedier/frp/src/utils/version go get -v github.com/mitchellh/gox go get -v github.com/rakyll/statik go fmt ./src/... go fmt ./test/echo_server.go go fmt ./test/http_server.go go fmt ./test/func_test.go go build -o bin/frps ./src/cmd/frps go build -o bin/frpc ./src/cmd/frpc go build -o test/bin/echo_server ./test/echo_server.go go build -o test/bin/http_server ./test/http_server.go 参考:http://www.jianshu.com/p/e6e354cd7bc1 http://www.jianshu.com/p/e83223af906a
Author
Owner

@lotc commented on GitHub (Jan 25, 2017):

@Anyfc 编译完 go-mips32 后 /bin 只有 gofmt
情况跟这里一样 https://github.com/bettermanbao/openwrt-kcptun/issues/3
平台 Ubuntu 16.04 x32
先用你的好了.

<!-- gh-comment-id:275032467 --> @lotc commented on GitHub (Jan 25, 2017): @Anyfc 编译完 go-mips32 后 /bin 只有 gofmt 情况跟这里一样 https://github.com/bettermanbao/openwrt-kcptun/issues/3 平台 Ubuntu 16.04 x32 先用你的好了.
Sign in to join this conversation.
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/frp#135
No description provided.