Compile on arm64 Raspi 3

  • Hi there,
    wanted to compile on a Raspi with arm64 but it thows errors at make:

    /home/moses/MySensors# ./configure --my-transport=rf24 --my-gateway=ethernet --my-port=5003
    [SECTION] Detecting target machine.
      [OK] machine detected: SoC=BCM2837, Type=rpi3, CPU=aarch64.
    [SECTION] Detecting SPI driver.
      [OK] SPI driver detected:BCM.
    [SECTION] Gateway configuration.
      [OK] Type: ethernet.
      [OK] Transport: rf24.
      [OK] Signing: Disabled.
      [OK] Encryption: Disabled.
      [OK] CPPFLAGS: -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_PORT=5003
      [OK] CXXFLAGS:  -std=c++11
    [SECTION] Detecting init system.
      [OK] Init system detected: systemd.
    [SECTION] Saving configuration.
      [OK] Saved.
    [SECTION] Cleaning previous builds.
      [OK] Finished.
    root@raspberrypi:/home/moses/MySensors# make
    gcc -MT build/hal/architecture/Linux/drivers/core/config.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_PORT=5003  -Ofast -g -Wall -Wextra  -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/config.c -o build/hal/architecture/Linux/drivers/core/config.o
    gcc: error: unrecognized command-line option ‘-mfpu=neon-fp-armv8’
    gcc: error: unrecognized command-line option ‘-mfloat-abi=hard’
    make: *** [Makefile:103: build/hal/architecture/Linux/drivers/core/config.o] Fehler 1

    Does it simple not work and i have to use 32bit OS or is there a way around? Would like to use the raspi just as Ethernetgateway for HASS. Didn't find a similar Info on the net so maybe its not popular to install it on raspberry and even less on 64bit?

    System Info:

    moses@raspberrypi:~ $ cat /proc/cpuinfo | grep Model && uname -a
    Model           : Raspberry Pi 3 Model B Rev 1.2
    Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux


  • @moses said in Compile on arm64 Raspi 3:

    unrecognized command-line option ‘-mfpu=neon-fp-armv8’
    unrecognized command-line option ‘-mfloat-abi=hard’

    Try removing those flags from make file, apparently they are not needed for arm64.

  • Thanks @monte - how can i do that? Think I google the wrong term...

  • @moses
    This is where you edit it. Just delete -mfpu=neon-fp-armv8 -mfloat-abi=hard and do

    make clean

    I'm not sure this will work, but I did compile mysensors for aarch64, just for another board and SoC.

  • @monte thanks, did it!

Log in to reply

Suggested Topics

  • 3
  • 2
  • 2
  • 15
  • 3
  • 1