From 2bda3af4163cee7aa8fa4de0752703c890a00bc7 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Mon, 25 Jan 2021 17:47:59 +0100 Subject: [PATCH] Add section about cross-compiling to README. --- README | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README b/README index a8fb4ae..d54b770 100644 --- a/README +++ b/README @@ -50,7 +50,7 @@ You should be able to access Galène at `https://localhost:8443`. Connect to the group that you have just set up in two distinct browser windows, then press *Ready* in one of the two; you should see a video in the other. -If you have set up a TURN server, type */relay-test* in the chat box; if +If you have set up a TURN server, type `/relay-test` in the chat box; if the TURN server is properly configured, you should see a message saying that the relay test has been successful. (The relay test will fail if you didn't configure a TURN server; this is normal, and nothing to worry @@ -77,6 +77,31 @@ forward, at a minimum, ports 8443 and 1194. In addition, you should add the option `-turn 192.0.2.1:1194` to Galène's command line, where `192.0.2.1` is your NAT's external (global) IPv4 address. +## Cross-compile for your server + +If your server runs a different OS or has a different CPU than your build +machine, you will need to recompile the binary for the server. + +For a Linux server with an Intel or AMD CPU: + + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags='-s -w' + +For a Raspberry Pi 1: + + CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags='-s -w' + +For a BeagleBone or a Raspberry Pi 2 or later: + + CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -ldflags='-s -w' + +For a 64-bit ARM board (Olimex Olinuxino-A64, Pine64, etc.): + + CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags='-s -w' + +For a 32-bit MIPS board with no hardware floating point (WNDR3800, etc.): + + CGO_ENABLED=0 GOOS=linux GOARCH=mips GOMIPS=softfloat go build -ldflags='-s -w' + ## Deploy to your server Set up a user *galene* on your server, then do: