在Arduino Y和xFA上执行Go程序;N

在Arduino Y和xFA上执行Go程序;N,go,arduino,cross-compiling,mips32,arduino-yun,Go,Arduino,Cross Compiling,Mips32,Arduino Yun,我想在Arduino Youún平台上运行Go程序。它的特点是在32位MIPS处理器(Atheros AR9331)上运行嵌入式Linux test.go的内容: package main import "fmt" func main() { fmt.Println("Hello!") } 我在Linux上使用以下命令(4.13.12-1-ARCH#1 SMP PREEMPT Wed Nov 8 11:54:06 CET 2017 x86_64 GNU/Linux),Go(go1.

我想在Arduino Youún平台上运行Go程序。它的特点是在32位MIPS处理器(Atheros AR9331)上运行嵌入式Linux

test.go的内容:

package main

import "fmt"

func main() {
    fmt.Println("Hello!")
}
我在Linux上使用以下命令(4.13.12-1-ARCH#1 SMP PREEMPT Wed Nov 8 11:54:06 CET 2017 x86_64 GNU/Linux),Go(go1.9.2 Linux/amd64)编译二进制文件:

GOOS=linux GOARCH=mips go build test.go
我将二进制文件复制到设备(通过SSH)并在那里执行它。它不会崩溃。它不打印“你好!”。它似乎只是在等待标准时间。如何调试/修复此问题

设备上/proc/cpuinfo的内容:

system type     : Atheros AR9330 rev 1
machine         : Arduino Yun
processor       : 0
cpu model       : MIPS 24Kc V7.4
BogoMIPS        : 265.42
wait instruction    : yes
microsecond timers  : yes
tlb_entries     : 16
extra interrupt vector  : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0920, 0x04b8, 0x0180]
ASEs implemented    : mips16
shadow register sets    : 1
kscratch registers  : 0
core            : 0
VCED exceptions     : not available
VCEI exceptions     : not available
execve("./test", ["./test"], [/* 11 vars */]) = 0
Linux B4218AF03376 3.3.8 #1 Sun Oct 4 02:29:26 CEST 2015 mips GNU/Linux
设备上的strace/测试输出:

system type     : Atheros AR9330 rev 1
machine         : Arduino Yun
processor       : 0
cpu model       : MIPS 24Kc V7.4
BogoMIPS        : 265.42
wait instruction    : yes
microsecond timers  : yes
tlb_entries     : 16
extra interrupt vector  : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0920, 0x04b8, 0x0180]
ASEs implemented    : mips16
shadow register sets    : 1
kscratch registers  : 0
core            : 0
VCED exceptions     : not available
VCEI exceptions     : not available
execve("./test", ["./test"], [/* 11 vars */]) = 0
Linux B4218AF03376 3.3.8 #1 Sun Oct 4 02:29:26 CEST 2015 mips GNU/Linux
设备上uname-r的输出:

system type     : Atheros AR9330 rev 1
machine         : Arduino Yun
processor       : 0
cpu model       : MIPS 24Kc V7.4
BogoMIPS        : 265.42
wait instruction    : yes
microsecond timers  : yes
tlb_entries     : 16
extra interrupt vector  : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0920, 0x04b8, 0x0180]
ASEs implemented    : mips16
shadow register sets    : 1
kscratch registers  : 0
core            : 0
VCED exceptions     : not available
VCEI exceptions     : not available
execve("./test", ["./test"], [/* 11 vars */]) = 0
Linux B4218AF03376 3.3.8 #1 Sun Oct 4 02:29:26 CEST 2015 mips GNU/Linux

您可能希望使用Go 1.10再试一次,它添加了32位MIPS软件浮点模拟

您可以使用
GOMIPS=softfloat
启用此功能,请参阅

您可以运行
strace程序
来找出它发出的系统调用,并可能阻塞。我已经添加了strace输出。在问题的前一个版本中,我确实上传了一个为错误平台构建的二进制文件。
uname-a
的输出是什么?您的linux中是否编译了浮点仿真?当设备缺少FPU且不支持浮点仿真时,我听说过类似的行为@Heinoldwage我怎么能检查?我已经读到,自内核2.2.4以来,它默认启用,但这可能是错误的。