summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 7948cc649..b2083ca60 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -1085,6 +1085,20 @@ sub is_virtualbox() {
any { $_->{driver} eq 'vboxadd' } detect_devices::pci_probe();
}
+sub is_netbook_nettop() {
+ my @cpus = getCPUs();
+ (any { $_->{'model name'} =~ /(\bIntel\(R\) Atom\(TM\)\B)/i } @cpus) ||
+ (any { $_->{'model name'} =~ /(\bIntel\(R\) Celeron\(R\) M processor\b|\bVIA C7-M Processor\b|\bGeode\(TM\)\B)/i && $_->{'cpu MHz'} < 1500 } @cpus);
+}
+
+sub has_low_resources() {
+ availableRamMB() < 100 || arch() =~ /i.86/ && ix86_cpu_frequency() < 350;
+}
+
+sub need_light_desktop() {
+ has_low_resources() || is_netbook_nettop();
+}
+
sub has_cpu_flag {
my ($flag) = @_;
cat_('/proc/cpuinfo') =~ /^flags.*\b$flag\b/m;