可否增加aarch64版本的二进制文件?
需要在orangepi zero plus上运行插件,全志H5的cpu,
aarch64_cortex-a53
GOOS=linux GOARCH=arm64 go build -ldflags "-s -w"
在同一块orangepi zero plus上,先刷armbian,安装golang1.2后可以go build出v2ray-plugin,运行了一下也正常,换张卡刷了openwrt,v2ray-plugin复制过去就不能运行了: root@opi0plus:~# strace ./v2ray-plugin execve("./v2ray-plugin", ["./v2ray-plugin"], 0x7fcbc59430 /* 12 vars */) = -1 ENOENT (No such file or directory) writev(2, [{iov_base="strace: exec: No such file or di"..., iov_len=39}, {iov_base="\n", iov_len=1}], 2strace: exec: No such file or directory ) = 40 writev(2, [{iov_base="", iov_len=0}, {iov_base=NULL, iov_len=0}], 2) = 0 getpid() = 5198 exit_group(1) = ? +++ exited with 1 +++ root@opi0plus:~# file v2ray-plugin v2ray-plugin: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=4c2891fb082692fc00e2b45db700d3fdfddfc8c5, not stripped
是没加楼上说的 -ldflags "-s -w" 参数么
go build -ldflags "-s -w" 生成的也不行 root@opi0plus:~# strace ./v2ray-plugin execve("./v2ray-plugin", ["./v2ray-plugin"], 0x7fc0b6ee40 /* 12 vars */) = -1 ENOENT (No such file or directory) writev(2, [{iov_base="strace: exec: No such file or di"..., iov_len=39}, {iov_base="\n", iov_len=1}], 2strace: exec: No such file or directory ) = 40 writev(2, [{iov_base="", iov_len=0}, {iov_base=NULL, iov_len=0}], 2) = 0 getpid() = 2925 exit_group(1) = ? +++ exited with 1 +++ root@opi0plus:~# file v2ray-plugin v2ray-plugin: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=7581504e8016861218c7336b927aa8424554d0dc, stripped
Try GOOS=linux GOARCH=arm GOARM=7 instead
reference: https://github.com/golang/go/wiki/GoArm
Try
GOOS=linux GOARCH=arm GOARM=7instead reference: https://github.com/golang/go/wiki/GoArm
在armbian中式了几个参数,GOARM=7,编译的32位程序不能运行.GOARCH=arm64编译出64位的报错找不到什么。最后用openwrt sdk和你的Makefile生成了可以在openwrt里运行的程序。 我开始没说清楚想在openwrt里使用,想当然以为go build出来的可以通用。
Try
GOOS=linux GOARCH=arm GOARM=7instead reference: https://github.com/golang/go/wiki/GoArm在armbian中式了几个参数,GOARM=7,编译的32位程序不能运行.GOARCH=arm64编译出64位的报错找不到什么。最后用openwrt sdk和你的Makefile生成了可以在openwrt里运行的程序。 我开始没说清楚想在openwrt里使用,想当然以为go build出来的可以通用。
你好,我的是N1盒子刷的openwrt,也是aarch64。请问编译插件的话需要怎么做?或者可以提供一下你编译成功的ipk文件,非常感谢!
for openwrt 18.06.4 https://c-t.work/s/7de39a5f826d42 大概步骤是下载解压 openwrt的sdk https://downloads.openwrt.org/releases/18.06.4/targets/sunxi/cortexa53/openwrt-sdk-18.06.4-sunxi-cortexa53_gcc-7.3.0_musl.Linux-x86_64.tar.xz cd到sdk目录里 git clone https://github.com/poscat0x04/openwrt-v2ray-plugin.git package/v2ray-plugin make menuconfig make package/v2ray-plugin/compile V=99 当然编译前还要装些软件,https://openwrt.org/docs/guide-developer/start ,翻翻
好的,谢谢了。我去看看
yuanwb1984 [email protected] 于2019年11月30日周六 上午9:25写道:
for openwrt 18.06.4 https://c-t.work/s/7de39a5f826d42 大概步骤是下载解压 openwrt的sdk
https://downloads.openwrt.org/releases/18.06.4/targets/sunxi/cortexa53/openwrt-sdk-18.06.4-sunxi-cortexa53_gcc-7.3.0_musl.Linux-x86_64.tar.xz cd到sdk目录里 git clone https://github.com/poscat0x04/openwrt-v2ray-plugin.git package/v2ray-plugin make menuconfig make package/v2ray-plugin/compile V=99 当然编译前还要装些软件,https://openwrt.org/docs/guide-developer/start ,翻翻
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/shadowsocks/v2ray-plugin/issues/109?email_source=notifications&email_token=ACXXGRHPDNJOZ6WTJHOM643QWG6JDA5CNFSM4IIZTGFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFPW6FI#issuecomment-559902485, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXXGRD3QJX2BQ4PHIGSFMTQWG6JDANCNFSM4IIZTGFA .
编译好之后不发运行,看了下源码 ifeq ($(ARCH),aarch64) BIN_ARCH=amd64 endif 这里改成 ifeq ($(ARCH),aarch64) BIN_ARCH=arm64 endif 好了,晕死😂
Francisco Lin [email protected] 于2019年11月30日周六 下午12:36写道:
好的,谢谢了。我去看看
yuanwb1984 [email protected] 于2019年11月30日周六 上午9:25写道:
for openwrt 18.06.4 https://c-t.work/s/7de39a5f826d42 大概步骤是下载解压 openwrt的sdk
https://downloads.openwrt.org/releases/18.06.4/targets/sunxi/cortexa53/openwrt-sdk-18.06.4-sunxi-cortexa53_gcc-7.3.0_musl.Linux-x86_64.tar.xz cd到sdk目录里 git clone https://github.com/poscat0x04/openwrt-v2ray-plugin.git package/v2ray-plugin make menuconfig make package/v2ray-plugin/compile V=99 当然编译前还要装些软件,https://openwrt.org/docs/guide-developer/start ,翻翻
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/shadowsocks/v2ray-plugin/issues/109?email_source=notifications&email_token=ACXXGRHPDNJOZ6WTJHOM643QWG6JDA5CNFSM4IIZTGFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFPW6FI#issuecomment-559902485, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXXGRD3QJX2BQ4PHIGSFMTQWG6JDANCNFSM4IIZTGFA .