summaryrefslogtreecommitdiffstats
path: root/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
diff options
context:
space:
mode:
authorAlexander Hoppe2009-08-26 15:37:49 +0200
committerAlexander Hoppe2009-08-26 15:37:49 +0200
commit252535d478f27f05153edc13d1afae91abb7a374 (patch)
tree76655235a06ad451b791060550c0dfb681f6fc2d /boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
parentFix for suse local kernel version mismatch (diff)
downloadcore-252535d478f27f05153edc13d1afae91abb7a374.tar.gz
core-252535d478f27f05153edc13d1afae91abb7a374.tar.xz
core-252535d478f27f05153edc13d1afae91abb7a374.zip
function for firmwares to be copied to /lib/firmware and attribute ramfs_firmmods
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3133 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm')
-rw-r--r--boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm31
1 files changed, 31 insertions, 0 deletions
diff --git a/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm b/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
index ec80f6a6..30ad500a 100644
--- a/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
+++ b/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
@@ -187,6 +187,36 @@ sub _addFilteredKernelModules
return;
}
+sub _copyFirmware
+{
+ my $self = shift;
+
+ my $sourcePath = "$self->{'root-path'}/lib/firmware/$self->{'kernel-version'}";
+ vlog(3,"sourcePath: $sourcePath");
+
+ my $targetPath
+ = "$self->{'build-path'}/lib/firmware";
+ vlog(3,"targetPath: $targetPath");
+ $self->addCMD("mkdir -p $targetPath");
+
+ # add a couple of kernel modules that we expect to be used in stage3
+ # (some of these modules do not exist on all distros, so they will be
+ # filtered out again by the respective distro object):
+ my @firmwareModules;
+ vlog(3,"ramfs_firmmods: $self->{attrs}->{ramfs_firmmods}");
+ push @firmwareModules, split ' ', $self->{attrs}->{ramfs_firmmods};
+ # copy all the modules that we think are required
+ foreach my $moduleToBeCopied (@firmwareModules) {
+ my $source = followLink(
+ "$self->{'root-path'}/lib/firmware/$self->{'kernel-version'}/$moduleToBeCopied", $self->{'root-path'}
+ );
+ my $target = "$targetPath/$moduleToBeCopied";
+ $self->addCMD("cp -pa --dereference $source $target");
+
+ }
+ return;
+}
+
sub _copyKernelModules
{
my $self = shift;
@@ -306,6 +336,7 @@ sub _writeInitramfsSetup
'ramfs_fsmods' => $self->{attrs}->{ramfs_fsmods} || '',
'ramfs_miscmods' => $self->{attrs}->{ramfs_miscmods} || '',
'ramfs_nicmods' => $self->{attrs}->{ramfs_nicmods} || '',
+ 'ramfs_firmmods' => $self->{attrs}->{ramfs_firmmods} || '',
'rootfs' => $self->{'export-uri'} || '',
'hw_local_disk' => $self->{attrs}->{hw_local_disk} || '',
};