@@ -15,20 +15,24 @@ TTY_GROUPNAME := tty
15
15
CC =g++
16
16
# get PI Revision from cpuinfo
17
17
PIREV := $(shell cat /proc/cpuinfo | grep Revision | cut -f 2 -d ":" | sed -e 's/^[[:space:]]* //' -e 's/[[:space:]]* $$//')
18
- CCFLAGS =-Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -mtune=arm1176jzf-s -D_TTY_NAME=\"${TTY_NAME}\" -D_TTY_GROUPNAME=\"${TTY_GROUPNAME}\"
19
-
20
- ifeq (${PIREV},$(filter ${PIREV},a01041 a21041) )
21
- # a01041 and a21041 are PI 2 Model B and armv7
22
- CCFLAGS += -march=armv7-a
18
+ CCFLAGS =-Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME=\"${TTY_NAME}\" -D_TTY_GROUPNAME=\"${TTY_GROUPNAME}\"
19
+
20
+ ifeq (${PIREV}, $(filter ${PIREV}, a02082) )
21
+ # a02082 is PI 3 Model B (ARM Cortex A53)
22
+ CCFLAGS += -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8
23
+ else ifeq (${PIREV}, $(filter ${PIREV}, a01041 a21041))
24
+ # a01041 and a21041 are PI 2 Model B (Arm Cortex A7)
25
+ CCFLAGS += -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4
23
26
else
24
27
# anything else is armv6
25
- CCFLAGS += -march=armv6zk
28
+ CCFLAGS += -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp
26
29
endif
27
30
28
- ifeq (${PIREV},$(filter ${PIREV},a01041 a21041 0010) )
31
+ ifeq (${PIREV}, $(filter ${PIREV}, a01041 a21041 0010 a02082 ) )
29
32
# a01041 and a21041 are PI 2 Model B with BPLUS Layout and 0010 is Pi Model B+ with BPLUS Layout
33
+ # a02082 is PI 3 Model B (ARM Cortex A53)
30
34
CCFLAGS += -D__PI_BPLUS
31
- endif
35
+ endif
32
36
33
37
# define all programs
34
38
PROGRAMS = MyGateway MySensor MyMessage PiEEPROM
@@ -67,14 +71,14 @@ clean:
67
71
68
72
install : all install-gatewayserial install-gateway install-initscripts
69
73
70
- install-gatewayserial :
74
+ install-gatewayserial :
71
75
@echo " Installing ${GATEWAY_SERIAL} to ${BINDIR} "
72
76
@install -m 0755 ${GATEWAY_SERIAL} ${BINDIR}
73
77
74
- install-gateway :
78
+ install-gateway :
75
79
@echo " Installing ${GATEWAY} to ${BINDIR} "
76
80
@install -m 0755 ${GATEWAY} ${BINDIR}
77
-
81
+
78
82
install-initscripts :
79
83
@echo " Installing initscripts to /etc/init.d"
80
84
@install -m 0755 initscripts/PiGatewaySerial /etc/init.d
@@ -86,21 +90,20 @@ install-initscripts:
86
90
87
91
enable-gw : install
88
92
@update-rc.d PiGateway defaults
89
-
93
+
90
94
enable-gwserial : install
91
95
@update-rc.d PiGatewaySerial defaults
92
-
96
+
93
97
remove-gw :
94
98
@update-rc.d -f PiGateway remove
95
-
99
+
96
100
remove-gwserial :
97
101
@update-rc.d -f PiGatewaySerial remove
98
-
102
+
99
103
uninstall : remove-gw remove-gwserial
100
104
@echo " Stopping daemon PiGatewaySerial (ignore errors)"
101
105
-@service PiGatewaySerial stop
102
106
@echo " Stopping daemon PiGateway (ignore errors)"
103
107
-@service PiGateway stop
104
108
@echo " removing files"
105
109
rm ${BINDIR} /PiGatewaySerial ${BINDIR} /PiGateway /etc/init.d/PiGatewaySerial /etc/init.d/PiGateway /etc/rsyslog.d/30-PiGatewaySerial.conf /etc/rsyslog.d/30-PiGateway.conf
106
-
0 commit comments