Download geth from GitHub repository then compile it:
curl -O https://github.com/ethereum/go-ethereum/archive/master.zip unzip go-ethereum-master.zip && cd go-ethereum-master make geth
At one point, the compilation process will stop:
# github.com/ethereum/go-ethereum/cmd/geth /usr/local/go/pkg/tool/linux_arm/link: running gcc failed: fork/exec /usr/bin/gcc: cannot allocate memory util.go:44: exit status 2 exit status 1 Makefile:15: recipe for target 'geth' failed make: *** [geth] Error 1
Ooops, the compilation process requires more memory than then available on the C.H.I.P (which has 512MB of DRAM). We can solve this problem using SWAP. My first thought was to create a swapfile on the C.H.I.P filesystem, but apparently this is a very bad idea to use NAND memory as SWAP.
Let's move on and create some SWAP on an external USB thumb drive. Be careful tho; using an external drive will consume more power. Since my laptop USB port was not able to supply enough current, I had to connect to a dedicated charger and connect to it through SSH or UART.
The following command will wipe out your external disk and use it as SWAP. It is also possible to create a swapfile on an existing filesystem so you don't need to erase it if you have enough free space.
sudo mkswap /dev/sda1 sudo swapon /dev/sda1
make geth again and it should succeed:
Done building. Run "build/bin/geth" to launch geth.
Since there is not enough built-in storage on the C.H.I.P to store the entire blockchain, you can use geth in light client mode using the
--light flag. You could also store the blockchain on an external drive.