#14 armv5 nas编译安装

Open
opened 8 months ago by lyq · 2 comments
天问 commented 8 months ago

系统架构介绍

armv5 是一个很老的硬件,

Linux dlink-012EF0 2.6.31.8 #1 Wed Aug 22 16:55:05 CST 2012 armv5tel GNU/Linux

操作系统:

windows:

linux:freebsd, netbsdsolari

mac:drawin

CPU架构:

x86(x64,intel,amd)

arm

Go支持的平台

$GOOS $GOARCH
darwin 386
darwin amd64
darwin arm
darwin arm64
dragonfly amd64
freebsd 386
freebsd amd64
freebsd arm
linux 386
linux amd64
linux arm
linux arm64
linux ppc64
linux ppc64le
netbsd 386
netbsd amd64
netbsd arm
openbsd 386
openbsd amd64
openbsd arm
plan9 386
plan9 amd64
solaris amd64
windows 386
windows amd64
windows arm
windows arm64

编译指定参数即可:

GOOS=windows GOARCH=amd64 go build main.go
GOOS=linux GOARCH=amd64 go build main.go
GOOS=darwin GOARCH=amd64 go build main.go

但是,对于特殊设备,如路由器,智能手表,安卓手机等怎么指定参数交叉编译呢?

# 系统架构介绍 armv5 是一个很老的硬件, ``` Linux dlink-012EF0 2.6.31.8 #1 Wed Aug 22 16:55:05 CST 2012 armv5tel GNU/Linux ``` 操作系统: windows: linux:freebsd, netbsdsolari mac:drawin CPU架构: x86(x64,intel,amd) arm ### Go支持的平台 | $GOOS | $GOARCH | | :-------- | :------ | | darwin | 386 | | darwin | amd64 | | darwin | arm | | darwin | arm64 | | dragonfly | amd64 | | freebsd | 386 | | freebsd | amd64 | | freebsd | arm | | linux | 386 | | linux | amd64 | | linux | arm | | linux | arm64 | | linux | ppc64 | | linux | ppc64le | | netbsd | 386 | | netbsd | amd64 | | netbsd | arm | | openbsd | 386 | | openbsd | amd64 | | openbsd | arm | | plan9 | 386 | | plan9 | amd64 | | solaris | amd64 | | windows | 386 | | windows | amd64 | | windows | arm | | windows | arm64 | 编译指定参数即可: ``` GOOS=windows GOARCH=amd64 go build main.go GOOS=linux GOARCH=amd64 go build main.go GOOS=darwin GOARCH=amd64 go build main.go ``` 但是,对于特殊设备,如路由器,智能手表,安卓手机等怎么指定参数交叉编译呢?
天问 commented 8 months ago
Owner
export GOARCH=arm
export GOARM=5
go-linux-arm get github.com/cyfdecyf/cow

https://go.dev/dl/

``` export GOARCH=arm export GOARM=5 go-linux-arm get github.com/cyfdecyf/cow ``` https://go.dev/dl/
天问 commented 8 months ago
Owner

./alist-linux-musleabi-armv5l

./alist-linux-musleabi-armv5l
Sign in to join this conversation.
No Label
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.