Go-ethereum over LEDE

Hi There,

I'm fishing for brains: I'm trying to install go-ethereum (a cryptocurrency node, like Bitcoin) on a Linksys WRT1200AC router. My end goal is to meter data up/down on the router, then execute an ethereum-based smart contract to debit token accounts for users that connect to the router. I am using LEDE/OpenWRT "linux" release on the router, and have downloaded a compiled binary of go-ethereum for 64 bit ARM processors w/ linux. I am not quite sure if my "linux" binary is compatible with BusyBox but the router has a 64-bit ARM A9 chip, and while I am able to get the binary onto the router, it does not execute. A command such as "geth --fast --cache=512 console" should bring up their console but it fails. Do you think I am missing dependencies because LEDE/BusyBox is so small? Or perhaps my binary's target ("64 bit ARM ") is not the same as the target I am trying to use (WRT1200AC is actually a dual-core, 64 bit ARM a9, via a Marvell Armada 385 system-on-chip)? Do you think I'll need to build my own go-ethereum binary from source? Any recommendations on how I could tackle this problem would be greatly appreciated. Also--let me know if you want to help!

Thanks, Dave

1 Like

Yes, most likely.

Thanks for the reply, hnyman.

Pretty amateur question, but how do I correctly install a binary so that when I issue a command, it will run in the LEDE/busybox? I was thinking of just moving it to the /bin directory, then creating an alias for it in a .profile file, or similar. Is this the right way? I noticed a very basic a compiled "hello world" C program (hello_world.out) had the same problems, namely, that I couldn't execute it on the router. Any tips here?

I loaded a binary of go-ethereum (titled geth-linux-arm-7), which is compiled for ARM A9 processor, but it fails to execute. An expert suggested to me that this failure has to do with the endian-ness of the binary, and perhaps the LEDE distribution... So, is LEDE/OpenWRT compiled as big-endian for ARM? Apparently Go is only compatible with little-endian ARM, this would explain the difference. If LEDE is by default big-endian, is there a way I can compile from source to be little-endian?

(please pardon if my use of jargon is not 100%, as I am pretty new to the concept above).

Thanks,
Dave

I've successfully got the go-ethereum binary to run on a Linksys EA4500. I had to use something called XGo cross compiler. If you search "geth cross compile", it has instructions. There is a Makefile in the go-ethereum github, and you might have to edit the ARM make commands to compile statically (the MIPS make command in the Makefile shows how to set this flag) I was able to get it running with cache=16 and ethash.cachesinmem=1. I was able to fast/full sync to the Rinkeby network. To speed up the process, I would install Ethereum Wallet, have it download/confirm all the past blocks, then I just copy them to a USB drive for the router. I also had to set 2GB of the USBdrive to be SWAP for the router's memory. Note this was all on OpenWrt

has anyone tried yet with a WRT3200ACM?