summaryrefslogtreecommitdiffstats
path: root/boot-env
diff options
context:
space:
mode:
authorroot2010-04-13 15:49:09 +0200
committerroot2010-04-13 15:49:09 +0200
commit91c3a8df4be49fba4c7398413e15fc9868b94bd0 (patch)
tree7305f330b58eed9a0d9bd01b20ca0efbe8b4f23d /boot-env
parentfix pbs stuff (diff)
parentvirtualization plugin, now with calculation of mem, run-vmgrid and run-virt u... (diff)
downloadcore-91c3a8df4be49fba4c7398413e15fc9868b94bd0.tar.gz
core-91c3a8df4be49fba4c7398413e15fc9868b94bd0.tar.xz
core-91c3a8df4be49fba4c7398413e15fc9868b94bd0.zip
Merge branch 'master' of git@openslx.org:openslx/core
Diffstat (limited to 'boot-env')
-rw-r--r--boot-env/OpenSLX/BootEnvironment/PXE.pm11
-rw-r--r--boot-env/OpenSLX/MakeInitRamFS/Distro/Suse.pm1
-rw-r--r--boot-env/OpenSLX/MakeInitRamFS/Distro/Ubuntu.pm4
-rw-r--r--boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm18
-rwxr-xr-xboot-env/pbs/uclib-rootfs/bin/bbinit19
-rwxr-xr-xboot-env/pbs/uclib-rootfs/bin/handleEvents38
-rwxr-xr-xboot-env/pbs/uclib-rootfs/etc/bbinit.d/example32
-rw-r--r--boot-env/pbs/uclib-rootfs/etc/events/example2
-rwxr-xr-xboot-env/pbs/uclib-rootfs/init34
-rwxr-xr-xboot-env/preboot/uclib-rootfs/init21
-rwxr-xr-xboot-env/syslinux/extlinuxbin52714 -> 52294 bytes
-rw-r--r--boot-env/syslinux/isolinux.binbin14336 -> 14336 bytes
-rwxr-xr-xboot-env/syslinux/mboot.c32bin31148 -> 30380 bytes
-rwxr-xr-xboot-env/syslinux/menu.c32bin57140 -> 54836 bytes
-rw-r--r--boot-env/syslinux/pxelinux.0bin16138 -> 16662 bytes
-rwxr-xr-xboot-env/syslinux/syslinuxbin25604 -> 25472 bytes
-rwxr-xr-xboot-env/syslinux/vesamenu.c32bin147728 -> 147996 bytes
17 files changed, 171 insertions, 9 deletions
diff --git a/boot-env/OpenSLX/BootEnvironment/PXE.pm b/boot-env/OpenSLX/BootEnvironment/PXE.pm
index 06df1361..d46786d0 100644
--- a/boot-env/OpenSLX/BootEnvironment/PXE.pm
+++ b/boot-env/OpenSLX/BootEnvironment/PXE.pm
@@ -79,13 +79,16 @@ sub writeBootloaderMenuFor
$label = $info->{name};
}
}
- $info->{pxeLabel} = $label;
+ $info->{menuLabel} = $label;
}
+# if kernel=*xen* then run sub _xenLabel from xen.pm
my $slxLabels = '';
foreach my $info (sort { $a->{label} cmp $b->{label} } @$systemInfos) {
my $vendorOSName = $info->{'vendor-os'}->{name};
my $kernelName = basename($info->{'kernel-file'});
my $append = $info->{attrs}->{kernel_params};
+ my $pxeLabel = $info->{'external-id'};
+ $pxeLabel =~ s/::/-/g;
my $pxePrefix = '';
my $tftpPrefix = '';
$info->{'pxe_prefix_ip'} ||= '';
@@ -110,12 +113,14 @@ sub writeBootloaderMenuFor
$append .= " file=$bootURI" if length($bootURI);
$append .= " file=$tftpPrefix" if length($tftpPrefix);
$append .= " $clientAppend";
- $slxLabels .= "LABEL openslx-$info->{'external-id'}\n";
+ $slxLabels .= "LABEL openslx-$pxeLabel\n";
$slxLabels .= $pxeDefault;
- $slxLabels .= "\tMENU LABEL ^$info->{pxeLabel}\n";
+ $slxLabels .= "\tMENU LABEL ^$info->{menuLabel}\n";
$slxLabels .= "\tKERNEL $pxePrefix$vendorOSName/$kernelName\n";
$slxLabels .= "\tAPPEND $append\n";
$slxLabels .= "\tIPAPPEND 3\n";
+# if kernel=*xen* then run sub _xenBootEntry from xen.pm
+# if (!defined $xenKernel) {...}
my $helpText = $info->{description} || '';
if (length($helpText)) {
# make sure that text matches the given margin
diff --git a/boot-env/OpenSLX/MakeInitRamFS/Distro/Suse.pm b/boot-env/OpenSLX/MakeInitRamFS/Distro/Suse.pm
index c664c1ba..1628c5f1 100644
--- a/boot-env/OpenSLX/MakeInitRamFS/Distro/Suse.pm
+++ b/boot-env/OpenSLX/MakeInitRamFS/Distro/Suse.pm
@@ -52,6 +52,7 @@ sub determineMatchingHwinfoVersion
'10.3' => '14.19',
'11.0' => '15.3',
'11.1' => '15.21',
+ '11.2' => '15.21'
);
return $versionMap{$distroVersion}
|| $self->SUPER::determineMatchingHwinfoVersion($distroVersion);
diff --git a/boot-env/OpenSLX/MakeInitRamFS/Distro/Ubuntu.pm b/boot-env/OpenSLX/MakeInitRamFS/Distro/Ubuntu.pm
index 9240f5b5..64c20538 100644
--- a/boot-env/OpenSLX/MakeInitRamFS/Distro/Ubuntu.pm
+++ b/boot-env/OpenSLX/MakeInitRamFS/Distro/Ubuntu.pm
@@ -1,4 +1,4 @@
-# Copyright (c) 2006..2009 - OpenSLX GmbH
+ # Copyright (c) 2006..2009 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -54,6 +54,8 @@ sub determineMatchingHwinfoVersion
'8.04' => '15.3',
'8.10' => '15.21',
'9.04' => '15.21',
+ '9.10' => '15.21',
+ '10.04' => '15.21',
);
return $versionMap{$distroVersion}
|| $self->SUPER::determineMatchingHwinfoVersion($distroVersion);
diff --git a/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm b/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
index a4a984e9..6de0a4fe 100644
--- a/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
+++ b/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
@@ -240,6 +240,10 @@ sub _copyKernelModules
push @kernelModules, split ' ', $self->{attrs}->{ramfs_miscmods};
push @kernelModules, split ' ', $self->{attrs}->{ramfs_nicmods};
+ if ($self->{attrs}->{ramfs_nicmods} =~ m{virtio}i) {
+ push @kernelModules, qw( virtio_pci virtio_net );
+ }
+
# a function that determines dependent modules recursively
my $addDependentsSub;
$addDependentsSub = sub {
@@ -379,13 +383,21 @@ sub _writeSlxSystemConf
# check if default directories available and copy them to /etc
my $defaultDirConfig = "$self->{'root-path'}/etc/opt/openslx/openslx.conf";
my $configTargetPath = "$self->{'build-path'}/etc";
-
+ #my $defaultConfVer = slurpFile("$defaultDirConfig");
+ #my $actConfVer = "Version 0.2";
+
if (-r $defaultDirConfig) {
$self->addCMD("cp -p $defaultDirConfig $configTargetPath/");
+# if ($defaultConfVer =~ m{$actConfVer}) {
+# warn _tr(
+# "Your version of default dir file (openslx.conf) is to old!\n".
+# "Eventually the system won't work.\n" .
+# "Please run install, update or clone of this system again!\n");
+# }
} else {
die _tr(
- "No default directories defined!\n" .
- "Please run install, update or clone of this system again!\n");
+ "No default directories defined!\n" .
+ "Please run install, update or clone of this system again!\n");
}
return;
diff --git a/boot-env/pbs/uclib-rootfs/bin/bbinit b/boot-env/pbs/uclib-rootfs/bin/bbinit
new file mode 100755
index 00000000..3fd67612
--- /dev/null
+++ b/boot-env/pbs/uclib-rootfs/bin/bbinit
@@ -0,0 +1,19 @@
+#!/bin/hush
+
+# create clean setup
+mkdir -p /etc/events.conf
+mkdir -p /etc/events.d
+rm /etc/events.d/*
+for f in $(ls -1 /etc/events)
+do
+ ln -sf /etc/events/$f /etc/events.d/$f
+done
+
+mkdir -p /tmp/event
+rm /tmp/event/*
+rm /tmp/events
+
+# start bbinit
+inotifyd /bin/handleEvents /tmp/event/:n &
+# initial call (executing all zero dependent scipts)
+handleEvents
diff --git a/boot-env/pbs/uclib-rootfs/bin/handleEvents b/boot-env/pbs/uclib-rootfs/bin/handleEvents
new file mode 100755
index 00000000..9bb78951
--- /dev/null
+++ b/boot-env/pbs/uclib-rootfs/bin/handleEvents
@@ -0,0 +1,38 @@
+#!/bin/hush
+
+# wait for lock
+while [ -f /tmp/bbinit.lock ]
+do
+ sleep 0.1
+done
+
+# lock eventhandler
+touch /tmp/bbinit.lock
+
+# source list of finished events
+[ -f /tmp/events ] && . /tmp/events
+
+# go through all unhandled events
+for f in $( ls -1 /etc/events.d/ )
+do
+ . /etc/events.d/$f
+
+ # check dependencies
+ eval dep=\$${f}_depends
+ havealldeps=1
+ for d in $dep
+ do
+ eval havedep=\$have${d}
+ [ "x$havedep" == "x1" ] || havealldeps=0
+ done
+
+ # if nothing is missing execute script
+ if [ "x$havealldeps" == "x1" ]; then
+ echo executing $f
+ /etc/bbinit.d/$f &
+ rm /etc/events.d/$f
+ fi
+done
+
+# unlock eventhandler
+rm /tmp/bbinit.lock
diff --git a/boot-env/pbs/uclib-rootfs/etc/bbinit.d/example b/boot-env/pbs/uclib-rootfs/etc/bbinit.d/example
new file mode 100755
index 00000000..122cf566
--- /dev/null
+++ b/boot-env/pbs/uclib-rootfs/etc/bbinit.d/example
@@ -0,0 +1,32 @@
+#!/bin/hush
+
+me=$(basename $0)
+
+# read event parameters
+. /etc/events/$me
+eval provides=\$${me}_provides
+
+# get config output of the dependencies
+eval dep=\$${me}_depends
+for d in $dep
+do
+ [ -f /etc/event.conf/$d ] && . /etc/event.conf/$d
+done
+
+# do some stuff
+echo "[$me] starting .."
+for i in 1 2 3 4 5 6
+do
+ echo "[$me] $i"
+ sleep 1
+done
+echo "[$me] finished .."
+
+# write configuration output
+value="test"
+echo "${provides}_someconfig=\"$value\"" >> /etc/event.conf/$provides
+
+# trigger eventhandler
+echo "have${provides}=1" >> /tmp/events
+touch /tmp/event/$me
+
diff --git a/boot-env/pbs/uclib-rootfs/etc/events/example b/boot-env/pbs/uclib-rootfs/etc/events/example
new file mode 100644
index 00000000..75768967
--- /dev/null
+++ b/boot-env/pbs/uclib-rootfs/etc/events/example
@@ -0,0 +1,2 @@
+example_depends=""
+example_provides="example"
diff --git a/boot-env/pbs/uclib-rootfs/init b/boot-env/pbs/uclib-rootfs/init
index 3c992070..847cad87 100755
--- a/boot-env/pbs/uclib-rootfs/init
+++ b/boot-env/pbs/uclib-rootfs/init
@@ -45,7 +45,20 @@ done
# device files get their own filesystem
devdir="/dev"
-mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir}
+mount -n -t tmpfs -o 'size=25%,mode=0755' mdev ${devdir}
+mkdir -p /dev/pts
+mount -t devpts devpts /dev/pts
+echo /sbin/mdev > /proc/sys/kernel/hotplug
+cat > /etc/mdev.conf << "EOF"
+sda* 0:6 0660
+sdb* 0:6 0660
+sg* 0:6 0660
+hda* 0:6 0660
+hdb* 0:6 0660
+EOF
+
+mdev -s
+
export DEBUGLEVEL=0
# create basic device files an directories in dev
@@ -143,6 +156,25 @@ fi
if [ -n "${SSID}" ] ; then
# WLAN setup will most probably change the network interface name stored in
# nwif (to wlan0 or something like that)
+ [ $DEBUGLEVEL -gt 0 ] && echo "set essid to ${essid}";
+ #value of essid unchecked yet
+ # load network adaptor modules
+ cd /lib/modules/$(ls /lib/modules/)/kernel/drivers/net/wireless
+ for mod in $(find . | grep .ko | sed 's,.*/\([^/]*\).ko,\1',); do
+ echo "Mod:";
+ echo $mod;
+ modprobe $mod || echo "module $mod did not load for some reason"
+ usleep 10000
+ done
+ cd /
+ wlanif=$(iwconfig 2>/dev/null|sed -n "/ESSID:/p"|sed "s/ .*//")
+ [ $DEBUGLEVEL -gt 0 ] && echo "wlancard recognized as ${wlanif}";
+ ip link set dev ${wlanif} up
+ if iwconfig ${wlanif} mode managed essid "${essid}"; then
+ nwif=${wlanif}
+ else
+ error " Unable to configure the WLAN interface."
+ fi
:
else
# check here for the active Ethernet link
diff --git a/boot-env/preboot/uclib-rootfs/init b/boot-env/preboot/uclib-rootfs/init
index f240d65d..ab2f9ca0 100755
--- a/boot-env/preboot/uclib-rootfs/init
+++ b/boot-env/preboot/uclib-rootfs/init
@@ -14,7 +14,7 @@
fetchip () {
# we expect to get an ip address within 10++ seconds
-( sleep 6 ; killall udhcpc >/dev/null 2>&1 ) &
+( sleep 10 ; killall udhcpc >/dev/null 2>&1 ) &
for i in 1 2 ; do
udhcpc -f -n -q $vci -s /usr/share/udhcpc/default.script -i $nwif 2>/dev/null
if grep "ip=" /tmp/ipstuff >/dev/null 2>&1 ; then
@@ -141,6 +141,25 @@ fi
if [ -n "${SSID}" ] ; then
# WLAN setup will most probably change the network interface name stored in
# nwif (to wlan0 or something like that)
+ [ $DEBUGLEVEL -gt 0 ] && echo "set essid to ${essid}";
+ #value of essid unchecked yet
+ # load network adaptor modules
+ cd /lib/modules/$(ls /lib/modules/)/kernel/drivers/net/wireless
+ for mod in $(find . | grep .ko | sed 's,.*/\([^/]*\).ko,\1',); do
+ echo "Mod:";
+ echo $mod;
+ modprobe $mod || echo "module $mod did not load for some reason"
+ usleep 10000
+ done
+ cd /
+ wlanif=$(iwconfig 2>/dev/null|sed -n "/ESSID:/p"|sed "s/ .*//")
+ [ $DEBUGLEVEL -gt 0 ] && echo "wlancard recognized as ${wlanif}";
+ ip link set dev ${wlanif} up
+ if iwconfig ${wlanif} mode managed essid "${essid}"; then
+ nwif=${wlanif}
+ else
+ error " Unable to configure the WLAN interface."
+ fi
:
else
# check here for the active Ethernet link
diff --git a/boot-env/syslinux/extlinux b/boot-env/syslinux/extlinux
index d97dd70c..69d8bf56 100755
--- a/boot-env/syslinux/extlinux
+++ b/boot-env/syslinux/extlinux
Binary files differ
diff --git a/boot-env/syslinux/isolinux.bin b/boot-env/syslinux/isolinux.bin
index 80f71c98..bd778b3b 100644
--- a/boot-env/syslinux/isolinux.bin
+++ b/boot-env/syslinux/isolinux.bin
Binary files differ
diff --git a/boot-env/syslinux/mboot.c32 b/boot-env/syslinux/mboot.c32
index dfff3789..929ade6f 100755
--- a/boot-env/syslinux/mboot.c32
+++ b/boot-env/syslinux/mboot.c32
Binary files differ
diff --git a/boot-env/syslinux/menu.c32 b/boot-env/syslinux/menu.c32
index 9413ec46..67f9c29b 100755
--- a/boot-env/syslinux/menu.c32
+++ b/boot-env/syslinux/menu.c32
Binary files differ
diff --git a/boot-env/syslinux/pxelinux.0 b/boot-env/syslinux/pxelinux.0
index 743948e3..0df4fbed 100644
--- a/boot-env/syslinux/pxelinux.0
+++ b/boot-env/syslinux/pxelinux.0
Binary files differ
diff --git a/boot-env/syslinux/syslinux b/boot-env/syslinux/syslinux
index dd0319cf..92b1b907 100755
--- a/boot-env/syslinux/syslinux
+++ b/boot-env/syslinux/syslinux
Binary files differ
diff --git a/boot-env/syslinux/vesamenu.c32 b/boot-env/syslinux/vesamenu.c32
index d9884770..804e2fb8 100755
--- a/boot-env/syslinux/vesamenu.c32
+++ b/boot-env/syslinux/vesamenu.c32
Binary files differ