summaryrefslogtreecommitdiffstats
path: root/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm')
-rw-r--r--src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
index 1771784c..9fd2c8bc 100644
--- a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
+++ b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
@@ -278,23 +278,28 @@ sub _copyKernelModules
# build a list of required firmwares out of the list of modules - not
# totally optimal
my @firmwares;
- $self->addCMD("mkdir -p $self->{'build-path'}/lib/firmware/$self->{'kernel-version'}");
+ $self->addCMD("mkdir -p $self->{'build-path'}/lib/firmware");
+ $self->addCMD("ln -s . $self->{'build-path'}/lib/firmware/$self->{'kernel-version'}");
foreach my $moduleToBeCopied(%modulesToBeCopied) {
$moduleToBeCopied =~ /.*\/(.*?)$/;
# implies usage of switch
vlog(1,$1);
switch ($1){
+ # nic modules fw
+ case "bnx2.ko" {push @firmwares, split ' ', "bnx2/"}
+ case "bnx2x.ko" {push @firmwares, split ' ', "bnx2x/"}
case "e100.ko" {push @firmwares, split ' ', "e100"}
+ case "r8169.ko" {push @firmwares, split ' ', "rtl_nic/"}
+ case "tg3.ko" {push @firmwares, split ' ', "tigon/"}
+ # wifi fw
case "iwlwifi" {
push @firmwares, split ' ',
"iwlwifi-3945-1.ucode iwlwifi-3945-2.ucode iwlwifi-4965-1.ucode iwlwifi-4965-2.ucode iwlwifi-5000-1.ucode"
}
- case "tg3.ko" {push @firmwares, split ' ', "tigon/"}
# modules required for graphic adaptors (bootsplash, Xorg)
case "radeon.ko" {push @firmwares, split ' ', "radeon/"}
case "mga.ko" {push @firmwares, split ' ', "matrox/"}
case "r128.ko" {push @firmwares, split ' ', "r128/"}
- case "r8169.ko" {push @firmwares, split ' ', "rtl_nic/"}
}
}
# copy all the firmwares that we think are required
@@ -305,18 +310,16 @@ sub _copyKernelModules
my $alternative_source = followLink(
"$self->{'root-path'}/lib/firmware/$firmwareToBeCopied", $self->{'root-path'}
);
+ my $target = "$self->{'build-path'}/lib/firmware/";
if (-e $source){
- my $target = "$self->{'build-path'}/lib/firmware/$self->{'kernel-version'}/";
-
$self->addCMD("cp -pr --dereference $source $target");
- } else {
- vlog(3,"unable to find $source for copying purposes");
}
- if (-e $alternative_source){
- my $target = "$self->{'build-path'}/lib/firmware/";
-
+ elsif (-e $alternative_source){
$self->addCMD("cp -pr --dereference $alternative_source $target");
}
+ else {
+ vlog(3,"unable to find $source for copying purposes");
+ }
}
# copy all the modules that we think are required