summaryrefslogtreecommitdiffstats
path: root/src/boot-env
diff options
context:
space:
mode:
authorMichael Janczyk2012-11-07 18:48:54 +0100
committerMichael Janczyk2012-11-07 18:48:54 +0100
commit9cbaf3a23a9791bc2d2c3a7fd3516922debfb464 (patch)
treef4a31ac193db18c77a4e42700242be247f0a77fd /src/boot-env
parentplymouth plugin updated to set the theme to the target system (diff)
downloadcore-9cbaf3a23a9791bc2d2c3a7fd3516922debfb464.tar.gz
core-9cbaf3a23a9791bc2d2c3a7fd3516922debfb464.tar.xz
core-9cbaf3a23a9791bc2d2c3a7fd3516922debfb464.zip
added rhel, centos, scientific linux 5 and 6.
centos and sl are depending on rhel. simple pxe menu for default blue look. firmwares of other nw cards are copied now.
Diffstat (limited to 'src/boot-env')
-rw-r--r--src/boot-env/OpenSLX/BootEnvironment/PXE.pm8
-rw-r--r--src/boot-env/OpenSLX/MakeInitRamFS/Distro/Centos.pm36
-rw-r--r--src/boot-env/OpenSLX/MakeInitRamFS/Distro/Rhel.pm58
-rw-r--r--src/boot-env/OpenSLX/MakeInitRamFS/Distro/Scientific.pm36
-rw-r--r--src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm23
-rw-r--r--src/boot-env/syslinux/themes/simple/theme.conf19
6 files changed, 168 insertions, 12 deletions
diff --git a/src/boot-env/OpenSLX/BootEnvironment/PXE.pm b/src/boot-env/OpenSLX/BootEnvironment/PXE.pm
index 507ca9dc..56549bf4 100644
--- a/src/boot-env/OpenSLX/BootEnvironment/PXE.pm
+++ b/src/boot-env/OpenSLX/BootEnvironment/PXE.pm
@@ -216,7 +216,11 @@ sub _getTemplate
# generate PXE-Menu
my $pxeTemplate =
"# generated by slxconfig-demuxer (on $callDate at $callTime)\n";
- $pxeTemplate .= "\nDEFAULT vesamenu.c32\n";
+ if ($pxeTheme eq "simple") {
+ $pxeTemplate .= "\nDEFAULT menu.c32\n";
+ } else {
+ $pxeTemplate .= "\nDEFAULT vesamenu.c32\n";
+ }
# include static defaults
$pxeTemplate .= "\n# static configuration (override with include file)\n";
$pxeTemplate .= "NOESCAPE 0\n";
@@ -292,7 +296,7 @@ sub _prepareBootloaderConfigFolder
rmtree($pxeConfigPath);
mkpath($pxeConfigPath);
- for my $file ('pxelinux.0', 'pxechain.com', 'vesamenu.c32',
+ for my $file ('pxelinux.0', 'pxechain.com', 'vesamenu.c32', 'menu.c32',
'mboot.c32', 'kernel-shutdown', 'initramfs-shutdown') {
if (!-e "$pxePath/$file") {
slxsystem(
diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Centos.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Centos.pm
new file mode 100644
index 00000000..abfaf622
--- /dev/null
+++ b/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Centos.pm
@@ -0,0 +1,36 @@
+# Copyright (c) 2012 - 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::Centos.pm
+# - provides CentOS Linux specific overrides of the
+# MakeInitRamFS::Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::MakeInitRamFS::Distro::Centos;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::MakeInitRamFS::Distro::Rhel);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'centos',
+ };
+ return bless $self, $class;
+}
+
+1;
diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Rhel.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Rhel.pm
new file mode 100644
index 00000000..54bb2c6d
--- /dev/null
+++ b/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Rhel.pm
@@ -0,0 +1,58 @@
+# Copyright (c) 2012 - 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::Rhel.pm
+# - provides RHEL specific overrides of the MakeInitRamFS::Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::MakeInitRamFS::Distro::Rhel;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::MakeInitRamFS::Distro::Base);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'rhel',
+ };
+ 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 = (
+ '5.x' => '16.0',
+ '6.x' => '16.0',
+ );
+ return $versionMap{$distroVersion}
+ || $self->SUPER::determineMatchingHwinfoVersion($distroVersion);
+}
+
+1;
diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Scientific.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Scientific.pm
new file mode 100644
index 00000000..5b2d7613
--- /dev/null
+++ b/src/boot-env/OpenSLX/MakeInitRamFS/Distro/Scientific.pm
@@ -0,0 +1,36 @@
+# Copyright (c) 2012 - 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::Scientific.pm
+# - provides Scientific Linux specific overrides of the
+# MakeInitRamFS::Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::MakeInitRamFS::Distro::Scientific;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::MakeInitRamFS::Distro::Rhel);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'scientific',
+ };
+ return bless $self, $class;
+}
+
+1;
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
diff --git a/src/boot-env/syslinux/themes/simple/theme.conf b/src/boot-env/syslinux/themes/simple/theme.conf
new file mode 100644
index 00000000..97cc153e
--- /dev/null
+++ b/src/boot-env/syslinux/themes/simple/theme.conf
@@ -0,0 +1,19 @@
+# openslx theme style definition
+# please define only look of your theme
+# for non-theme definitions use slxsettings
+# or include file in /etc/opt/openslx/boot-env/syslinux/pxemenu-include
+
+MENU WIDTH 78
+MENU MARGIN 9
+MENU PASSWORDMARGIN 9
+MENU ROWS 10
+MENU TABMSGROW 16
+MENU CMDLINEROW 16
+MENU ENDROW -1
+MENU PASSWORDROW 16
+MENU TIMEOUTROW 20
+MENU HELPMSGROW 16
+MENU HELPMSGENDROW -1
+MENU HSHIFT 0
+MENU VSHIFT 7
+