Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-16-2015, 01:22 PM   #1
transient
Junior Member
transient began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2015
Device: PocketBook 622
Golang for arm and Pocketbook

Golang for arm and Pocketbook

Go cross compiler (1.4.2) with CGO support is now ready for PocketBook arm platform (armel, arm 5).

You can download my binary for Ubuntu 12.04 or compile from src with instructions below (coming soon... maybe).

In any case (if you want to work with CGO!), you should install toolchain from sergeyvl

After downloading binary, unpack into "/opt" and set environments:

Code:
PATH="/opt/go/bin:$HOME/bin:$PATH"
export GOROOT="/opt/go"
export GOPATH="/home/me/mygo"
Then, you can compile your golang program for host as usual:

Code:
go build prog.go
and compile program for PocketBook arm target:

Code:
GOOS=linux GOARCH=arm GOARM=5 go build armprog.go
and if you want to compile with CGO support:

Code:
CC=arm-none-linux-gnueabi-g++ GOOS=linux GOARCH=arm GOARM=5 CGO_ENABLED=1 go build armprog.go
Support CGO means to link C libs and code to go code (and vice versa).
There are some limitations, but I could use inkview and its graphics.

sample of code, ... hm..
transient is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Arm V5te is not our friend glorfybe enTourage eDGe 7 09-12-2011 10:29 AM
Calibre on ARM Linux cstross Calibre 8 07-25-2011 11:06 AM
Calibre on Ubuntu/ARM? cstross Calibre 2 10-01-2009 02:49 PM
Linux and ARM processors mobelby Calibre 3 06-15-2009 11:55 PM
iLiad ARM (+Xwindows) resources arivero iRex Developer's Corner 0 10-22-2006 10:19 AM


All times are GMT -4. The time now is 03:33 PM.


MobileRead.com is a privately owned, operated and funded community.