avoid testing Raspberry model when cross-compiling

This commit is contained in:
Jean-Michel Friedt 2022-03-01 09:05:29 +01:00
parent b0f253232b
commit 7769983370
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ STD_CFLAGS = -Wall -std=gnu99 -c -g
UNAME := $(shell uname -m) UNAME := $(shell uname -m)
# Determine Raspberry Pi version (if 2 or greater) # Determine Raspberry Pi version (if 2 or greater)
RPI_VERSION := $(shell cat /proc/device-tree/model | grep -a -o "Raspberry\sPi\s[0-9]" | grep -o "[0-9]") RPI_VERSION := $(shell if [ -e /proc/device-tree/model ]; then cat /proc/device-tree/model | grep -a -o "Raspberry\sPi\s[0-9]" | grep -o "[0-9]"; else echo 4; fi)
# Determine the hardware platform and set proper compilation flags # Determine the hardware platform and set proper compilation flags
ifeq ($(UNAME), armv6l) ifeq ($(UNAME), armv6l)