summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-11-13 11:43:50 +0100
committerColin Guthrie <colin@mageia.org>2013-11-13 12:35:41 +0100
commit79b08a48f3cff888454ebc4a71db4a3e92d992fd (patch)
treebabe68fc39b380ded8261fa880c6d4a77ab07c09
parent9c8e358edad9ec6b7b0569113f5448b0f3a19faa (diff)
downloaddrakx-79b08a48f3cff888454ebc4a71db4a3e92d992fd.tar
drakx-79b08a48f3cff888454ebc4a71db4a3e92d992fd.tar.gz
drakx-79b08a48f3cff888454ebc4a71db4a3e92d992fd.tar.bz2
drakx-79b08a48f3cff888454ebc4a71db4a3e92d992fd.tar.xz
drakx-79b08a48f3cff888454ebc4a71db4a3e92d992fd.zip
images/kernel: Pass the modules we need to be in modules.alias through to dracut.
The installer needs to have the modules.alias information for more kernel modules than are actually included. In order to do this we need to use and environment variable as there is no sensible way to do this via dracut command line arguments. The mgainstaller dracut module will need updating accordingly. This should solve the problem where Sound Cards are shown as 'not configured' at the end of the install.
-rw-r--r--images/NEWS2
-rwxr-xr-ximages/make_boot_img3
-rw-r--r--kernel/modules.pl14
3 files changed, 18 insertions, 1 deletions
diff --git a/images/NEWS b/images/NEWS
index eab97dad3..0a91e7a9b 100644
--- a/images/NEWS
+++ b/images/NEWS
@@ -1,3 +1,5 @@
+- pass the modules we want in modules.alias, but not in the initrd through to
+ dracut via an environment variable
- add BOOT_AUTOMATIC_METHOD to inject command line params into boot.iso syslinux
Version 2.1 - 5 November 2013 by Colin Guthrie
diff --git a/images/make_boot_img b/images/make_boot_img
index 457572ca0..2ac8eb189 100755
--- a/images/make_boot_img
+++ b/images/make_boot_img
@@ -154,6 +154,7 @@ sub initrd {
my ($ext) = $img =~ /rdz-(.*)/ or die "bad initrd name ($img)";
my $modules = " mgainstaller ";
my $drivers = `perl ../kernel/modules.pl list_needed_modules $kernel | xargs`;
+ my $fakedrivers = `perl ../kernel/modules.pl list_fake_modules $kernel | xargs`;
if ($ENV{DEBUGSTAGE1} || $ENV{BUILD_KA}) {
$modules="$modules busybox ";
@@ -162,7 +163,7 @@ sub initrd {
mkdir_p("build/dracut.conf.d");
# TODO if --nofscks and --no-hostonly are switched, dracut gives an error - fix or report upstream
- __ "DRAKX_STAGE1_BINARY=$stage1_binary DRAKX_INIT_BINARY=$init_binary dracut --conf dracut.conf --confdir ./build/dracut.conf.d --add ' $modules ' --add-drivers ' $drivers ' '$img' '$kernel'";
+ __ "DRAKX_STAGE1_BINARY=$stage1_binary DRAKX_INIT_BINARY=$init_binary DRAKX_FAKE_MODULES='$fakedrivers' dracut --conf dracut.conf --confdir ./build/dracut.conf.d --add ' $modules ' --add-drivers ' $drivers ' '$img' '$kernel'";
chmod(0644, $img);
}
diff --git a/kernel/modules.pl b/kernel/modules.pl
index 3b68b4039..70d6ed0bd 100644
--- a/kernel/modules.pl
+++ b/kernel/modules.pl
@@ -56,6 +56,20 @@ sub list_needed_modules {
}
}
+sub list_fake_modules {
+ my ($kern_ver) = @_;
+
+ load_dependencies("/lib/modules/$kern_ver/modules.dep");
+
+ my @all = map { category2modules($_) } split(' ', 'multimedia/*');
+ my %wanted_modules = map { (list_modules::modname2filename($_) => 1) } @all;
+ foreach (`find /lib/modules/$kern_ver -name '*.ko.?z'`) {
+ my $modfile = basename($_);
+ $modfile =~ s/\.ko\.xz//;
+ $wanted_modules{$modfile} and print "$modfile\n";
+ }
+}
+
sub get_main_modules() {
my $base = dirname($0);
my $main = chomp_(cat_("$base/RPMS/.main"));