summaryrefslogtreecommitdiffstats
path: root/src/boot-env
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot-env')
-rw-r--r--src/boot-env/OpenSLX/BootEnvironment/PXE.pm2
-rw-r--r--src/boot-env/OpenSLX/MakeInitRamFS/Distro/Scilin.pm61
-rw-r--r--src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm92
-rw-r--r--src/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm2
-rw-r--r--src/boot-env/OpenSLX/MakeInitRamFS/Engine/SlxBoot.pm6
-rw-r--r--src/boot-env/iPXE/undionly-pool.kkpxebin0 -> 83354 bytes
-rw-r--r--src/boot-env/iPXE/undionly.kpxebin61973 -> 0 bytes
-rw-r--r--src/boot-env/iPXE/unifr-rz.ipxe4
-rw-r--r--src/boot-env/iPXE/unifr-rz.kpxebin61783 -> 0 bytes
9 files changed, 65 insertions, 102 deletions
diff --git a/src/boot-env/OpenSLX/BootEnvironment/PXE.pm b/src/boot-env/OpenSLX/BootEnvironment/PXE.pm
index 56549bf4..e48c7a1a 100644
--- a/src/boot-env/OpenSLX/BootEnvironment/PXE.pm
+++ b/src/boot-env/OpenSLX/BootEnvironment/PXE.pm
@@ -305,7 +305,7 @@ sub _prepareBootloaderConfigFolder
}
}
#copy iPXE to tftproot
- my @ipxeFiles = <$basePath/share/boot-env/iPXE/*.kpxe>;
+ my @ipxeFiles = <$basePath/share/boot-env/iPXE/*>;
foreach my $ipxeFile (@ipxeFiles) {
slxsystem(
qq[cp -p "$ipxeFile" $pxePath/]
diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Scilin.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Scilin.pm
deleted file mode 100644
index f2372f8f..00000000
--- a/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Scilin.pm
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright (c) 2009..2010 - OpenSLX GmbH
-#
-# This program is free software distributed under the GPL version 2.
-# See http://openslx.org/COPYING
-#
-# If you have any feedback please consult http://openslx.org/feedback and
-# send your suggestions, praise, or complaints to feedback@openslx.org
-#
-# General information about OpenSLX can be found at http://openslx.org/
-# -----------------------------------------------------------------------------
-# MakeInitRamFS::Distro::Scilin.pm
-# - provides Scientific Linux specific overrides of the
-# MakeInitRamFS::Distro API.
-# -----------------------------------------------------------------------------
-package OpenSLX::MakeInitRamFS::Distro::Scilin;
-
-use strict;
-use warnings;
-
-use base qw(OpenSLX::MakeInitRamFS::Distro::Base);
-
-use OpenSLX::Basics;
-
-################################################################################
-### implementation
-################################################################################
-sub new
-{
- my $class = shift;
- my $self = {
- 'base-name' => 'scilin',
- };
- return bless $self, $class;
-}
-
-sub applyChanges
-{
- my $self = shift;
- my $engine = shift;
- # filter modules which are part of the main kernel already
- $engine->_addFilteredKernelModules( qw( af_packet hid hid-bright usbhid unix vesafb fbcon ));
-
- return;
-}
-
-sub determineMatchingHwinfoVersion
-{
- my $self = shift;
- my $distroVersion = shift;
-
- my %versionMap = (
- '4.7' => '13.11',
- '5.3' => '15.3',
- '5.4' => '15.21',
- '5.5' => '16.0',
- );
- return $versionMap{$distroVersion}
- || $self->SUPER::determineMatchingHwinfoVersion($distroVersion);
-}
-
-1;
diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
index 9fd2c8bc..1eb91e88 100644
--- a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
+++ b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
@@ -278,50 +278,63 @@ 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->addCMD("ln -s . $self->{'build-path'}/lib/firmware/$self->{'kernel-version'}");
- foreach my $moduleToBeCopied(%modulesToBeCopied) {
+ foreach my $moduleToBeCopied(sort keys %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"
- }
- # 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/"}
+ # use modinfo to check if module depends on firmware, and add it
+ my @dependsFirmware = `modinfo -F firmware $self->{'root-path'}/$moduleToBeCopied`;
+ foreach my $firmware(@dependsFirmware) {
+ push @firmwares, split ' ', "$firmware";
}
+ # old static copy
+ ## implies usage of switch
+ #vlog(1,$1);
+ #switch ($1){
+ # #case "bnx2.ko" {push @firmwares, split ' ', "bnx2/"}
+ # #case "bnx2x.ko" {push @firmwares, split ' ', "bnx2x/"}
+ # case "e100.ko" {push @firmwares, split ' ', "e100"}
+ # 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"
+ # }
+ # # 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/"}
+ # case "tg3.ko" {push @firmwares, split ' ', "tigon/"}
+ #}
}
+
# copy all the firmwares that we think are required
foreach my $firmwareToBeCopied (@firmwares) {
- my $source = followLink(
- "$self->{'root-path'}/lib/firmware/$self->{'kernel-version'}/$firmwareToBeCopied", $self->{'root-path'}
+ my $firmwareSource = followLink(
+ "$self->{'root-path'}/lib/firmware/$firmwareToBeCopied" ,
+ $self->{'root-path'}
);
- my $alternative_source = followLink(
- "$self->{'root-path'}/lib/firmware/$firmwareToBeCopied", $self->{'root-path'}
+ my $kernelFWSource = followLink(
+ "$self->{'root-path'}/lib/firmware/$self->{'kernel-version'}/" .
+ "$firmwareToBeCopied", $self->{'root-path'}
);
- my $target = "$self->{'build-path'}/lib/firmware/";
- if (-e $source){
- $self->addCMD("cp -pr --dereference $source $target");
- }
- elsif (-e $alternative_source){
- $self->addCMD("cp -pr --dereference $alternative_source $target");
+
+ if (-e $firmwareSource){
+ my $targetDir = dirname("$self->{'build-path'}/lib/firmware/" .
+ "$firmwareToBeCopied");
+ $self->addCMD("mkdir -p $targetDir; \
+ cp -pr --dereference $firmwareSource $targetDir");
+ } else {
+ vlog(3,"unable to find $firmwareSource for copying purposes");
}
- else {
- vlog(3,"unable to find $source for copying purposes");
+
+ if (-e $kernelFWSource){
+ my $targetDir = dirname("$self->{'build-path'}/lib/firmware/" .
+ "$self->{'kernel-version'}/$firmwareToBeCopied");
+ $self->addCMD("mkdir -p $targetDir; \
+ cp -pr --dereference $kernelFWSource $targetDir");
+ } else {
+ vlog(3,"unable to find $kernelFWSource for copying purposes");
}
}
-
+
# copy all the modules that we think are required
foreach my $moduleToBeCopied (sort keys %modulesToBeCopied) {
my $source = followLink(
@@ -337,6 +350,17 @@ sub _copyKernelModules
return;
}
+sub _copyModprobeD
+{
+ my $self = shift;
+
+ my $source = "$self->{'root-path'}/etc/modprobe.d";
+ my $target = "$self->{'build-path'}/etc";
+ $self->addCMD("cp -pr --dereference $source $target");
+
+ return;
+}
+
sub _platformSpecificFileFor
{
my $self = shift;
diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm
index 319ff65e..e0123aa7 100644
--- a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm
+++ b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm
@@ -43,6 +43,8 @@ sub _collectCMDs
$self->_copyKernelModules();
+ $self->_copyModprobeD();
+
$self->_createInitRamFS();
return;
diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/SlxBoot.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/SlxBoot.pm
index a0c24edb..23448998 100644
--- a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/SlxBoot.pm
+++ b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/SlxBoot.pm
@@ -52,6 +52,8 @@ sub _collectCMDs
$self->{distro}->applyChanges($self);
$self->_copyKernelModules();
+
+ $self->_copyModprobeD();
$self->_createInitRamFS();
@@ -235,9 +237,9 @@ sub _copyPreAndPostinitFiles
foreach my $cfg (
'default/initramfs/preinit.local',
- "$self->{'system-name'}/initramfs/preinit.local",
+ "$self->{'system-name'}/default/initramfs/preinit.local",
'default/initramfs/postinit.local',
- "$self->{'system-name'}/initramfs/postinit.local"
+ "$self->{'system-name'}/default/initramfs/postinit.local"
) {
my $cfgPath = "$openslxConfig{'private-path'}/config/stage3/$cfg";
next if !-f $cfgPath;
diff --git a/src/boot-env/iPXE/undionly-pool.kkpxe b/src/boot-env/iPXE/undionly-pool.kkpxe
new file mode 100644
index 00000000..30491744
--- /dev/null
+++ b/src/boot-env/iPXE/undionly-pool.kkpxe
Binary files differ
diff --git a/src/boot-env/iPXE/undionly.kpxe b/src/boot-env/iPXE/undionly.kpxe
deleted file mode 100644
index dec7dd1a..00000000
--- a/src/boot-env/iPXE/undionly.kpxe
+++ /dev/null
Binary files differ
diff --git a/src/boot-env/iPXE/unifr-rz.ipxe b/src/boot-env/iPXE/unifr-rz.ipxe
deleted file mode 100644
index 59a19c33..00000000
--- a/src/boot-env/iPXE/unifr-rz.ipxe
+++ /dev/null
@@ -1,4 +0,0 @@
-#!ipxe
-
-dhcp
-chain http://pbs2.mp.openslx.org/ipxe/auth/serial/serialnumber/55-44-33-22-11/mac/${net0/mac}
diff --git a/src/boot-env/iPXE/unifr-rz.kpxe b/src/boot-env/iPXE/unifr-rz.kpxe
deleted file mode 100644
index 452189df..00000000
--- a/src/boot-env/iPXE/unifr-rz.kpxe
+++ /dev/null
Binary files differ