Libraries use cpuinfo to determine the raspbery pi version. But it doesn't work as Hardware and Revision are not set in Fedora
# cat /proc/cpuinfo
...
processor : 3
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
Hardware : Generic DT based system
Revision : 0000
processor : 3
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 76.80
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
Hardware : BCM2709
Revision : a02082
https://sourceforge.net/p/raspberry-gpio-python/code/ci/default/tree/source/cpuinfo.c
if ((fp = fopen("/proc/cpuinfo", "r")) == NULL)
return -1;
while(!feof(fp)) {
fgets(buffer, sizeof(buffer), fp);
sscanf(buffer, "Hardware : %s", hardware);
if (strcmp(hardware, "BCM2708") == 0 ||
strcmp(hardware, "BCM2709") == 0 ||
strcmp(hardware, "BCM2835") == 0 ||
strcmp(hardware, "BCM2836") == 0 ||
strcmp(hardware, "BCM2837") == 0 ) {
found = 1;
}
sscanf(buffer, "Revision : %s", revision);
}