-
Notifications
You must be signed in to change notification settings - Fork 283
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
有没有交叉编译教程 #32
Comments
https://downloads.lede-project.org/releases/17.01.0/targets/ar71xx/nand/packages/ |
参照那个 wiki 改了一下 #mips版
cd ~
git clone https://github.com/gomini/go-mips32.git
cd go-mips32/src
export GOOS=linux
export GOARCH=mips32
./make.bash
CGO_ENABLED=0 ./make.bash
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/shawn1m/overture/main
VERSION=`date -u +%Y%m%d`
LDFLAGS="-X main.VERSION=$VERSION -s -w"
env CGO_ENABLED=0 GOOS=linux GOARCH=mips32 go build -ldflags "$LDFLAGS" -o ~/overture_linux_mips github.com/shawn1m/overture/main mipsel版本 修改 GOARCH 参数即可 export GOARCH=mips32le |
发现官方已经支持没有开FPU的固件了 cd ~/go/src
env GOARCH=mips ./make.bash 编译好了之后 正式开始编译overture mips版 ~/go/bin/go get -v github.com/shawn1m/overture/main
env GOOS=linux GOARCH=mips GOMIPS=soft-float,mips32 ~/go/bin/go build -ldflags "-s -w" -a -o ~/overture_linux_mips github.com/shawn1m/overture/main |
非常感谢,我等会把这个 issue 链接放到 README 里去,在 go 1.9 之前 mips 的问题还是很多。 |
原以为go 1.9.2已经merge了这个commit,没想到折腾半天,这个commit还没有merge进去。用了 @suikatomoki 的go版本可以,感谢。 |
类似这种的
https://github.com/xtaci/kcptun/wiki/mip32-cross-compile
fpu默认都是关闭的 开启很麻烦 开启之后也用不了官方源kmod模块
The text was updated successfully, but these errors were encountered: