I was hoping someone might point me in the right direction for things to
check about a simple hello world that is not running on an arm device.
Device is pretty custom. I am running the following:
sudo
CC_FOR_TARGET=/home/me/Downloads/armv7-marvell-linux-gnueabi-softfp_i686/bin/arm-marvell-linux-gnueabi-gcc-4.6.4
GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=1 ./make.bash --no-clean
which succeeds. Then to build the helloworld that looks like:
package main
import "fmt"
func main() {
fmt.Println("hello")
}
GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=1 go build test.go
file test yeilds: test: ELF 32-bit LSB executable, ARM, EABI5 version 1
(SYSV), statically linked, not stripped
cat /proc/cpuinfo looks like:
Processor : Marvell PJ4Bv7 Processor rev 1 (v7l)
BogoMIPS : 1196.85
Features : swp half thumb fastmult vfp edsp vfpv3 vfpv3d16 tls
CPU implementer : 0x56
CPU architecture: 7
CPU variant : 0x1
CPU part : 0x581
CPU revision : 1
Hardware : Marvell Armada-370
Revision : 0000
Serial : 0000000000000000
but when I run it on the device the following happens:
unexpected fault address 0xa8e24
fatal error: fault
[signal 0xb code=0x2 addr=0xa8e24 pc=0xa8e24]
goroutine 1 [running, locked to thread]:
runtime.gothrow(0xcc9f8, 0x5)
/usr/local/go/src/runtime/panic.go:503 +0x84 fp=0x10335eb4 sp=0x10335ea8
runtime.sigpanic()
/usr/local/go/src/runtime/sigpanic_unix.go:29 +0x2a4 fp=0x10335edc
sp=0x10335eb4
sync/atomic.LoadUint32(0x126b78, 0x0)
?:0 fp=0x10335ee0 sp=0x10335ee0
syscall.Getenv(0xb, 0x1030a060, 0x72ccc, 0xcecf0, 0x8)
/usr/local/go/src/syscall/env_unix.go:72 +0x54 fp=0x10335f0c sp=0x10335ee0
syscall.Getenv(0x10335f60, 0x30315500, 0x1030a060, 0x5e064, 0x10338010)
/usr/local/go/src/syscall/env_unix.go:72 +0x54 fp=0x10335f38 sp=0x10335f0c
goroutine 2 [runnable]:
runtime.forcegchelper()
/usr/local/go/src/runtime/proc.go:90
runtime.goexit()
/usr/local/go/src/runtime/asm_arm.s:1322 +0x4
goroutine 3 [runnable]:
runtime.bgsweep()
/usr/local/go/src/runtime/mgc0.go:82
runtime.goexit()
/usr/local/go/src/runtime/asm_arm.s:1322 +0x4
Of course I have tried GOARM 5, 6 and 7.. for both the go src build and
test.go build.
Thanks !!
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.