miegl / PiFmAdv

Advanced Raspberry Pi FM transmitter with RDS encoding
GNU General Public License v3.0
484 stars 82 forks source link

Add aarch64 support #102

Open Mabbs opened 11 months ago

Mabbs commented 11 months ago

Fixed #93 Tested on Raspberry Pi 3b and 4b.

ellartdev commented 11 months ago

Wouldn't this be better, as there are multiple revisions of RPi 4 Model B boards? Multiple revisions (i.e. I have Revision 1.5, PCPUI variable outputs 15), but CPU is the same. My example below:

...
LSCPU := $(shell lscpu | grep "Model name" | awk '{print $$3}')
...
...
else ifeq ($(UNAME), aarch64)
    ifeq ($(LSCPU), Cortex-A72)
        CFLAGS = $(STD_CFLAGS) -march=armv8-a -mtune=cortex-a72 -ffast-math -DRASPI=4
        TARGET = pi4
    else
        CFLAGS = $(STD_CFLAGS) -march=armv7-a -ffast-math -DRASPI=2
        TARGET = pi2
    endif
else
    CFLAGS = $(STD_CFLAGS)
    TARGET = other
endif
...
Mabbs commented 11 months ago

Wouldn't this be better, as there are multiple revisions of RPi 4 Model B boards? Multiple revisions (i.e. I have Revision 1.5, PCPUI variable outputs 15), but CPU is the same. My example below:

...
LSCPU := $(shell lscpu | grep "Model name" | awk '{print $$3}')
...
...
else ifeq ($(UNAME), aarch64)
  ifeq ($(LSCPU), Cortex-A72)
      CFLAGS = $(STD_CFLAGS) -march=armv8-a -mtune=cortex-a72 -ffast-math -DRASPI=4
      TARGET = pi4
  else
      CFLAGS = $(STD_CFLAGS) -march=armv7-a -ffast-math -DRASPI=2
      TARGET = pi2
  endif
else
  CFLAGS = $(STD_CFLAGS)
  TARGET = other
endif
...

You're right, I modified.