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
    

    Thanks!



  • @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 https://github.com/mysensors/MySensors/blob/b9d9cc339659f724aa94d4108fc5289a720d1bcd/configure#L266
    This is where you edit it. Just delete -mfpu=neon-fp-armv8 -mfloat-abi=hard and do

    make clean
    ./configure
    

    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

9
Online

11.4k
Users

11.1k
Topics

112.7k
Posts