Provide Tor/obfsproxy arm binaries for Linux
Let's properly document all the ARM binary stuff for Briar Headless.
Briar Headless currently only includes binaries for linux-x86_64
. While Briar Android works on ARM, we need a special binary for (plain) Linux systems and enable them in code.
Here is a table with required flags for specified target devices:
command | -march= |
other flags | target devices |
---|---|---|---|
arm-linux-gnueabi-gcc |
armv6 |
-marm |
Raspberry Pi Model B Rev 2 |
arm-linux-gnueabi-gcc |
armv6zk |
-marm |
Raspberry Pi Model B Rev 2 |
arm-linux-gnueabi-gcc |
armv6zk+fp |
-marm |
Raspberry Pi Model B Rev 2 |
arm-linux-gnueabihf-gcc |
armv7-a+fp |
-mmusl |
Google Nexus 5 (postmarketOS) |
arm-linux-gnueabihf-gcc |
armv7ve+simd |
-marm |
Raspberry Pi 2 Model B (not tested) |
arm-linux-gnueabihf-gcc |
unknown | unknown | Raspberry Pi Model 3 (not tested) |
aarch64-linux-gnu-gcc |
armv8-a+crc+simd |
-marm |
Raspberry Pi 4 Model B (not tested) |
aarch64-linux-gnu-gcc |
armv8-a+crypto+crc |
- | Purism Librem 5 (not tested) |
To add information on another device, the following commands are helpful:
cat /proc/cpuinfo
gcc -c -Q -march=native --help=target
gcc -v
Python also gives interesting information (enter these commands after starting python3
; you can exit with ctrl + d):
import platform
platform.architecture()
platform.machine()
For detecting your device properly, we depend on Java to tell us which is it:
public class Arch {
public static void main(String[] args) {
System.out.println(System.getProperty("os.arch"));
}
}
Please compile it with javac Arch.java
and post the output of java Arch
.
Once you have that information, feel free to post the output to this issues. Your work will help getting Briar run on your device.
You can further help by trying to do a test compile. Using the following briar.c
...
#include <stdio.h>
int main() {
float a = 3.33 + 6.66;
printf("Briar rocks, %f!", a);
return 0;
}
...you can compile the program using e.g. arm-linux-gnueabi-gcc test.c -o test.out -march=armv6zk+fp -marm
. Under Debian, there are gcc-arm-linux-gnueabihf
and gcc-arm-linux-gnueabi
available as cross-compilers. Please compile the program on your desktop device using the right compiler flags, copy the test.out binary to your target device and try to execute it there. If it works, you can additionally provide the exact compile command that worked for you.