summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-08-22 11:33:37 +0000
committerThierry Vignaud <tv@mageia.org>2011-08-22 11:33:37 +0000
commite1de3d3e802c171f7ca1c4d10d9da4a02ae1a8ef (patch)
tree304b55ad4bd59346cae901ffd49b0ec1b6cf370e
parent7f0d77a7038da9667ec08274b5b704ff1cc80bde (diff)
downloaddrakx-e1de3d3e802c171f7ca1c4d10d9da4a02ae1a8ef.tar
drakx-e1de3d3e802c171f7ca1c4d10d9da4a02ae1a8ef.tar.gz
drakx-e1de3d3e802c171f7ca1c4d10d9da4a02ae1a8ef.tar.bz2
drakx-e1de3d3e802c171f7ca1c4d10d9da4a02ae1a8ef.tar.xz
drakx-e1de3d3e802c171f7ca1c4d10d9da4a02ae1a8ef.zip
(hasCPUMicrocode) add support to detect if CPU microcode is upgradable
-rw-r--r--perl-install/detect_devices.pm10
-rw-r--r--perl-install/install/NEWS2
2 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 46655599b..117f14ed8 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -1238,6 +1238,7 @@ sub matching_types() {
mips_ict => is_mips_ict(),
mips_st_ls2f => is_mips_st_ls2f(),
cpufreq => hasCPUFreq(),
+ microcode => hasCPUMicrocode(),
laptop => isLaptop(),
'numpad' => hasNumpad(),
'touchpad' => hasTouchpad(),
@@ -1246,6 +1247,15 @@ sub matching_types() {
};
}
+sub hasCPUMicrocode() {
+ state $hasCPUMicrocode;
+ if (!defined $hasCPUMicrocode) {
+ eval { modules::load('microcode') };
+ $hasCPUMicrocode = to_bool(find { 'microcode' } modules::loaded_modules());
+ }
+ return $hasCPUMicrocode;
+}
+
sub hasCPUFreq() { require cpufreq; cpufreq::get_modules() }
sub hasWacom() { find { $_->{vendor} == 0x056a || $_->{driver} =~ /wacom/ } usb_probe() }
sub hasTouchpad() { any { $_->{Synaptics} || $_->{ALPS} || $_->{Elantech} } getInputDevices() }
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 4780e5ace..0c7d2b76c 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,5 +1,7 @@
- always align partitions to start at megabyte boundaries to avoid
performance issues with drives with 4k physical sectors (mga#1215)
+- add support to detect if CPU microcode is upgradable in order to
+ install microcode_ctl
Version 13.61.1 - 05 August 2011