mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-25 11:25:48 -05:00
[hostinfo] Try to recognize ARM as well
- /proc/cpuinfo is a terrible information source; it contains very different information on x86 from arm (testen on rpi4 and rock64).
This commit is contained in:
parent
0902c74809
commit
272cf099be
1 changed files with 15 additions and 0 deletions
|
@ -91,6 +91,17 @@ hostCPUmatch( const QString& s )
|
|||
return QString();
|
||||
}
|
||||
|
||||
static QString
|
||||
hostCPUmatchARM( const QString& s )
|
||||
{
|
||||
// Both Rock64 and Raspberry pi mention 0x41
|
||||
if ( s.contains( ": 0x41" ) )
|
||||
{
|
||||
return QStringLiteral( "ARM" );
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
#if defined( Q_OS_FREEBSD )
|
||||
QString
|
||||
hostCPU_FreeBSD()
|
||||
|
@ -127,6 +138,10 @@ hostCPU_Linux()
|
|||
{
|
||||
return hostCPUmatch( line );
|
||||
}
|
||||
if ( line.startsWith( "CPU implementer" ) )
|
||||
{
|
||||
return hostCPUmatchARM( line );
|
||||
}
|
||||
}
|
||||
}
|
||||
return QString(); // Not open, or not found
|
||||
|
|
Loading…
Add table
Reference in a new issue