From eeb91dbb63c9c3efceb4030ebcb514b92520550a Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 13 Feb 2008 20:20:12 +0000 Subject: * added support for letting plugins suggest additional kernel modules * used this new functionality in the theme and vmware plugins to suggest the kernel modules they need (this should fix showing the console in ubuntu) * added distro-specific kernel module filtering, such that there no longer are the spurious warnings about 'hid', 'unix' and/or 'af_packet' not being found git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1540 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/OpenSLX/OSPlugin/Base.pm | 29 ++++++++++++++++++++++ os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm | 17 ++++++++++++- .../plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 11 ++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) (limited to 'os-plugins') diff --git a/os-plugins/OpenSLX/OSPlugin/Base.pm b/os-plugins/OpenSLX/OSPlugin/Base.pm index 0f601704..51990912 100644 --- a/os-plugins/OpenSLX/OSPlugin/Base.pm +++ b/os-plugins/OpenSLX/OSPlugin/Base.pm @@ -39,6 +39,8 @@ sub initialize # to installing stuff into the vendor-OS, like downloading functionality, # access to meta-packager, ... $self->{'os-plugin-engine'} = shift; + + return; } sub getInfo @@ -79,6 +81,8 @@ sub preInstallationPhase # required by the corresponding stage3 runlevel script my $pluginTempPath = shift; # a temporary playground that will be cleaned up automatically + + return; } sub installationPhase @@ -89,6 +93,8 @@ sub installationPhase # the repository folder, this time from inside the chroot my $pluginTempPath = shift; # the temporary folder, this time from inside the chroot + + return; } sub postInstallationPhase @@ -97,6 +103,8 @@ sub postInstallationPhase my $self = shift; my $pluginRepositoryPath = shift; my $pluginTempPath = shift; + + return; } sub preRemovalPhase @@ -109,6 +117,8 @@ sub preRemovalPhase # required by the corresponding stage3 runlevel script my $pluginTempPath = shift; # a temporary playground that will be cleaned up automatically + + return; } sub removalPhase @@ -119,6 +129,8 @@ sub removalPhase # the repository folder, this time from inside the chroot my $pluginTempPath = shift; # the temporary folder, this time from inside the chroot + + return; } sub postRemovalPhase @@ -127,6 +139,8 @@ sub postRemovalPhase my $self = shift; my $pluginRepositoryPath = shift; my $pluginTempPath = shift; + + return; } sub suggestAdditionalKernelParams @@ -137,6 +151,19 @@ sub suggestAdditionalKernelParams # that it would like to see added. my $self = shift; my $kernelParams = shift; + + return; +} + +sub suggestAdditionalKernelModules +{ # called by config-demuxer in order to give the plugin a chance to add + # any kernel modules it requires. + # In order to do so, the plugin should return the names of additional kernel + # modules that it would like to see added. + my $self = shift; + my $makeInitRamFSEngine = shift; + + return; } sub copyRequiredFilesIntoInitramfs @@ -149,4 +176,6 @@ sub copyRequiredFilesIntoInitramfs my $targetPath = shift; my $attrs = shift; my $makeInitRamFSEngine = shift; + + return; } diff --git a/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm b/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm index a00cd8a2..c2897eec 100644 --- a/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm +++ b/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm @@ -133,6 +133,21 @@ sub suggestAdditionalKernelParams return @suggestedParams; } +sub suggestAdditionalKernelModules +{ + my $self = shift; + my $makeInitRamFSEngine = shift; + + my @suggestedModules; + + # Ubuntu needs vesafb and fbcon (which drags along some others) + if ($makeInitRamFSEngine->{'distro-name'} =~ m{^ubuntu}i) { + push @suggestedModules, qw( vesafb fbcon ) + } + + return @suggestedModules; +} + sub copyRequiredFilesIntoInitramfs { my $self = shift; @@ -179,7 +194,7 @@ sub copyRequiredFilesIntoInitramfs } vlog( - 0, + 1, _tr( "theme-plugin: bootsplash=%s displaymanager=%s", $splashTheme, $displayManagerTheme diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index 69492160..b466dd17 100644 --- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -77,4 +77,15 @@ sub getAttrInfo }; } +sub suggestAdditionalKernelModules +{ + my $self = shift; + my $makeInitRamFSEngine = shift; + + # simply suggest these and see where we go from there (what is vmblock?) + my @suggestedModules = qw( vmmon vmnet vmblock ); + + return @suggestedModules; +} + 1; -- cgit v1.2.3-55-g7522