View Single Post
Old 10-09-2012, 10:05 PM   #1
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
I've been looking at learning Go, google's programming language, and decided, "Hey wouldn't it be nice if could get Go binaries to run on the Kindle?"
Guess what. With a simple
Code:
export GOARCH=arm
export GOARM=5
export GOOS=linux
bash $go/src/make.bash
You produced go, gofmt, and godoc binaries that run on the kindle.
But wait! Trouble looms ahead. The backend ARMv5 compilers that were supposed to be built along with those shiny frontends didn't and probably wont get built until someone hooks a crosscompiler into the mix to cross compile 4 compilrs for go....
But, you can still crosscompile go binaires, much easier than crosscompiling other things. (from what ive seen here...)
With a simple (on the host, btw)
Code:
export GOARCH=arm
export GOOS=linux
export ARM=5
go build helloworld.go
You should end up with a nice shiny ARMv5 binary.

TLDR: crosscompiling Go binaries for the K3 and above is a breeze, however Go natively on the kindles may have to wait a little while...
(Feel free to correct glaring errors! did this from my kindle )

Last edited by qlob; 10-18-2012 at 02:39 PM.
qlob is offline   Reply With Quote