To anyone, who will come here searching for a way to compile MySensors Gateway on 64bit OS, here is how I managed to do that on Ubuntu Server 20.04:
ubuntu@ubuntu:~ $ cat /proc/cpuinfo | grep Model && uname -a
Model : Raspberry Pi 4 Model B Rev 1.4
Linux rpi-ubuntu-server 5.4.0-1034-raspi #37-Ubuntu SMP PREEMPT Mon Apr 12 23:14:49 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
- Make sure to use development branch(
git clone https://github.com/mysensors/MySensors.git --branch development
), otherwise you may facefatal error: stropts.h: No such file or directory
[1], which is not fixed in master branch. - As I understood from [2] and [3], unrecognized command line options (-mfpu=neon-fp-armv8 -mfloat-abi=hard) are not valid for ARMv8 AArch64 targets, so it's safe to remove them. I did that by updating
./configure
as follows (in my case soc=BCM2711, so I left others intact):
function gcc_cpu_flags {
local soc=$1
case $soc in
// ...
BCM2711)
flags="-march=armv8-a+crc -mtune=cortex-a72"
;;
// ...
}
- With above setup I was able to build Ethernet Gateway:
/configure --my-gateway=ethernet --my-port=5003 --my-transport=rf24 --my-rf24-irq-pin=15 --soc=BCM2711
[1] https://github.com/mysensors/MySensors/issues/1431
[2] https://developer.arm.com/documentation/dui0774/b/compiler-command-line-options/-mfloat-abi
[3] https://lists.linaro.org/pipermail/linaro-toolchain/2016-July/005815.html