From 6ad6d7707e893016e82eeb75f4f08131d12700e7 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Mon, 4 Oct 2010 17:42:02 +0200 Subject: remove uClibc stuff - part I --- src/boot-env/OpenSLX/BootEnvironment/Preboot.pm | 2 +- src/boot-env/OpenSLX/MakeInitRamFS/Engine/PBS.pm | 4 +- .../OpenSLX/MakeInitRamFS/Engine/Preboot.pm | 10 +- .../OpenSLX/MakeInitRamFS/Engine/SlxBoot.pm | 8 +- src/boot-env/pbs/rootfs/bin/bbinit | 19 ++ src/boot-env/pbs/rootfs/bin/handleEvents | 38 ++++ src/boot-env/pbs/rootfs/etc/bbinit.d/example | 32 +++ src/boot-env/pbs/rootfs/etc/events/example | 2 + src/boot-env/pbs/rootfs/init | 234 +++++++++++++++++++++ .../preboot/preboot-scripts/dialog.functions | 105 +++++++++ src/boot-env/pbs/uclib-rootfs/bin/bbinit | 19 -- src/boot-env/pbs/uclib-rootfs/bin/handleEvents | 38 ---- src/boot-env/pbs/uclib-rootfs/etc/bbinit.d/example | 32 --- src/boot-env/pbs/uclib-rootfs/etc/events/example | 2 - src/boot-env/pbs/uclib-rootfs/init | 234 --------------------- .../preboot/preboot-scripts/dialog.functions | 105 --------- src/boot-env/preboot/rootfs/init | 216 +++++++++++++++++++ src/boot-env/preboot/rootfs/lib/libcurses.so | 1 + src/boot-env/preboot/rootfs/lib/libncurses.so | 1 + src/boot-env/preboot/rootfs/lib/libncurses.so.5 | 1 + src/boot-env/preboot/rootfs/lib/libncurses.so.5.6 | Bin 0 -> 229164 bytes src/boot-env/preboot/rootfs/usr/bin/clear | Bin 0 -> 5156 bytes src/boot-env/preboot/rootfs/usr/bin/dialog | Bin 0 -> 108520 bytes src/boot-env/preboot/rootfs/usr/bin/w3m | Bin 0 -> 1093832 bytes src/boot-env/preboot/rootfs/usr/lib/libcrypto.so | 1 + .../preboot/rootfs/usr/lib/libcrypto.so.0.9.8 | Bin 0 -> 1143120 bytes src/boot-env/preboot/rootfs/usr/lib/libcurses.so | 11 + src/boot-env/preboot/rootfs/usr/lib/libform.so | 1 + src/boot-env/preboot/rootfs/usr/lib/libform.so.5 | 1 + src/boot-env/preboot/rootfs/usr/lib/libform.so.5.6 | Bin 0 -> 39044 bytes src/boot-env/preboot/rootfs/usr/lib/libmenu.so | 1 + src/boot-env/preboot/rootfs/usr/lib/libmenu.so.5 | 1 + src/boot-env/preboot/rootfs/usr/lib/libmenu.so.5.6 | Bin 0 -> 21968 bytes src/boot-env/preboot/rootfs/usr/lib/libncurses.so | 11 + src/boot-env/preboot/rootfs/usr/lib/libpanel.so | 1 + src/boot-env/preboot/rootfs/usr/lib/libpanel.so.5 | 1 + .../preboot/rootfs/usr/lib/libpanel.so.5.6 | Bin 0 -> 9212 bytes src/boot-env/preboot/rootfs/usr/lib/libssl.so | 1 + .../preboot/rootfs/usr/lib/libssl.so.0.9.8 | Bin 0 -> 237392 bytes src/boot-env/preboot/rootfs/usr/sbin/kdump | Bin 0 -> 5200 bytes src/boot-env/preboot/rootfs/usr/sbin/kexec | Bin 0 -> 104068 bytes src/boot-env/preboot/uclib-rootfs/init | 216 ------------------- src/boot-env/preboot/uclib-rootfs/lib/libcurses.so | 1 - .../preboot/uclib-rootfs/lib/libncurses.so | 1 - .../preboot/uclib-rootfs/lib/libncurses.so.5 | 1 - .../preboot/uclib-rootfs/lib/libncurses.so.5.6 | Bin 229164 -> 0 bytes src/boot-env/preboot/uclib-rootfs/usr/bin/clear | Bin 5156 -> 0 bytes src/boot-env/preboot/uclib-rootfs/usr/bin/dialog | Bin 108520 -> 0 bytes src/boot-env/preboot/uclib-rootfs/usr/bin/w3m | Bin 1093832 -> 0 bytes .../preboot/uclib-rootfs/usr/lib/libcrypto.so | 1 - .../uclib-rootfs/usr/lib/libcrypto.so.0.9.8 | Bin 1143120 -> 0 bytes .../preboot/uclib-rootfs/usr/lib/libcurses.so | 11 - .../preboot/uclib-rootfs/usr/lib/libform.so | 1 - .../preboot/uclib-rootfs/usr/lib/libform.so.5 | 1 - .../preboot/uclib-rootfs/usr/lib/libform.so.5.6 | Bin 39044 -> 0 bytes .../preboot/uclib-rootfs/usr/lib/libmenu.so | 1 - .../preboot/uclib-rootfs/usr/lib/libmenu.so.5 | 1 - .../preboot/uclib-rootfs/usr/lib/libmenu.so.5.6 | Bin 21968 -> 0 bytes .../preboot/uclib-rootfs/usr/lib/libncurses.so | 11 - .../preboot/uclib-rootfs/usr/lib/libpanel.so | 1 - .../preboot/uclib-rootfs/usr/lib/libpanel.so.5 | 1 - .../preboot/uclib-rootfs/usr/lib/libpanel.so.5.6 | Bin 9212 -> 0 bytes .../preboot/uclib-rootfs/usr/lib/libssl.so | 1 - .../preboot/uclib-rootfs/usr/lib/libssl.so.0.9.8 | Bin 237392 -> 0 bytes src/boot-env/preboot/uclib-rootfs/usr/sbin/kdump | Bin 5200 -> 0 bytes src/boot-env/preboot/uclib-rootfs/usr/sbin/kexec | Bin 104068 -> 0 bytes 66 files changed, 691 insertions(+), 691 deletions(-) create mode 100755 src/boot-env/pbs/rootfs/bin/bbinit create mode 100755 src/boot-env/pbs/rootfs/bin/handleEvents create mode 100755 src/boot-env/pbs/rootfs/etc/bbinit.d/example create mode 100644 src/boot-env/pbs/rootfs/etc/events/example create mode 100755 src/boot-env/pbs/rootfs/init create mode 100644 src/boot-env/pbs/rootfs/preboot/preboot-scripts/dialog.functions delete mode 100755 src/boot-env/pbs/uclib-rootfs/bin/bbinit delete mode 100755 src/boot-env/pbs/uclib-rootfs/bin/handleEvents delete mode 100755 src/boot-env/pbs/uclib-rootfs/etc/bbinit.d/example delete mode 100644 src/boot-env/pbs/uclib-rootfs/etc/events/example delete mode 100755 src/boot-env/pbs/uclib-rootfs/init delete mode 100644 src/boot-env/pbs/uclib-rootfs/preboot/preboot-scripts/dialog.functions create mode 100755 src/boot-env/preboot/rootfs/init create mode 120000 src/boot-env/preboot/rootfs/lib/libcurses.so create mode 120000 src/boot-env/preboot/rootfs/lib/libncurses.so create mode 120000 src/boot-env/preboot/rootfs/lib/libncurses.so.5 create mode 100755 src/boot-env/preboot/rootfs/lib/libncurses.so.5.6 create mode 100755 src/boot-env/preboot/rootfs/usr/bin/clear create mode 100755 src/boot-env/preboot/rootfs/usr/bin/dialog create mode 100755 src/boot-env/preboot/rootfs/usr/bin/w3m create mode 120000 src/boot-env/preboot/rootfs/usr/lib/libcrypto.so create mode 100755 src/boot-env/preboot/rootfs/usr/lib/libcrypto.so.0.9.8 create mode 100755 src/boot-env/preboot/rootfs/usr/lib/libcurses.so create mode 120000 src/boot-env/preboot/rootfs/usr/lib/libform.so create mode 120000 src/boot-env/preboot/rootfs/usr/lib/libform.so.5 create mode 100755 src/boot-env/preboot/rootfs/usr/lib/libform.so.5.6 create mode 120000 src/boot-env/preboot/rootfs/usr/lib/libmenu.so create mode 120000 src/boot-env/preboot/rootfs/usr/lib/libmenu.so.5 create mode 100755 src/boot-env/preboot/rootfs/usr/lib/libmenu.so.5.6 create mode 100755 src/boot-env/preboot/rootfs/usr/lib/libncurses.so create mode 120000 src/boot-env/preboot/rootfs/usr/lib/libpanel.so create mode 120000 src/boot-env/preboot/rootfs/usr/lib/libpanel.so.5 create mode 100755 src/boot-env/preboot/rootfs/usr/lib/libpanel.so.5.6 create mode 120000 src/boot-env/preboot/rootfs/usr/lib/libssl.so create mode 100755 src/boot-env/preboot/rootfs/usr/lib/libssl.so.0.9.8 create mode 100755 src/boot-env/preboot/rootfs/usr/sbin/kdump create mode 100755 src/boot-env/preboot/rootfs/usr/sbin/kexec delete mode 100755 src/boot-env/preboot/uclib-rootfs/init delete mode 120000 src/boot-env/preboot/uclib-rootfs/lib/libcurses.so delete mode 120000 src/boot-env/preboot/uclib-rootfs/lib/libncurses.so delete mode 120000 src/boot-env/preboot/uclib-rootfs/lib/libncurses.so.5 delete mode 100755 src/boot-env/preboot/uclib-rootfs/lib/libncurses.so.5.6 delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/bin/clear delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/bin/dialog delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/bin/w3m delete mode 120000 src/boot-env/preboot/uclib-rootfs/usr/lib/libcrypto.so delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/lib/libcrypto.so.0.9.8 delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/lib/libcurses.so delete mode 120000 src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so delete mode 120000 src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so.5 delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so.5.6 delete mode 120000 src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so delete mode 120000 src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so.5 delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so.5.6 delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/lib/libncurses.so delete mode 120000 src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so delete mode 120000 src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so.5 delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so.5.6 delete mode 120000 src/boot-env/preboot/uclib-rootfs/usr/lib/libssl.so delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/lib/libssl.so.0.9.8 delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/sbin/kdump delete mode 100755 src/boot-env/preboot/uclib-rootfs/usr/sbin/kexec (limited to 'src/boot-env') diff --git a/src/boot-env/OpenSLX/BootEnvironment/Preboot.pm b/src/boot-env/OpenSLX/BootEnvironment/Preboot.pm index b06de7d2..370009ad 100644 --- a/src/boot-env/OpenSLX/BootEnvironment/Preboot.pm +++ b/src/boot-env/OpenSLX/BootEnvironment/Preboot.pm @@ -112,7 +112,7 @@ sub writeBootloaderMenuFor End-of-Here if (!$self->{'dry-run'}) { - # default to iso encoding, let's see how uclibc copes with it ... + # default to iso encoding ... spitFile($menuFile, $bootmenu, { 'io-layer' => 'encoding(iso8859-1)' }); # copy the preboot script into the folder to be tared diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/PBS.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/PBS.pm index 571057ad..83d848d0 100644 --- a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/PBS.pm +++ b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/PBS.pm @@ -28,12 +28,12 @@ sub _copyPrebootSpecificFiles # write secondary rootfs-layer (including init) on top of base layer my $prebootRootfs - = "$openslxConfig{'base-path'}/share/boot-env/preboot/uclib-rootfs"; + = "$openslxConfig{'base-path'}/share/boot-env/preboot/rootfs"; $self->addCMD("rsync -rlpt $prebootRootfs/ $self->{'build-path'}"); # overwrite preboot defaults my $pbsRootfs - = "$openslxConfig{'base-path'}/share/boot-env/pbs/uclib-rootfs"; + = "$openslxConfig{'base-path'}/share/boot-env/pbs/rootfs"; $self->addCMD("rsync -rlpt $pbsRootfs/ $self->{'build-path'}"); return 1; diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm index aecfd00f..1a68bfd0 100644 --- a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm +++ b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm @@ -36,7 +36,7 @@ sub _collectCMDs $self->_writeInitramfsSetup(); $self->_writeSlxSystemConf(); - $self->_copyUclibcRootfs(); + $self->_copyRootfs(); $self->_copyPrebootSpecificFiles(); $self->{distro}->applyChanges($self); @@ -107,11 +107,11 @@ sub _writeInitramfsSetup return; } -sub _copyUclibcRootfs +sub _copyRootfs { my $self = shift; - my $uclibcRootfs = "$openslxConfig{'base-path'}/share/uclib-rootfs"; + my $rootfs = "$openslxConfig{'base-path'}/share/rootfs"; my @excludes = qw( ); @@ -123,7 +123,7 @@ sub _copyUclibcRootfs my $exclOpts = join ' ', map { "--exclude $_" } @excludes; - $self->addCMD("rsync $exclOpts -rlpt $uclibcRootfs/ $self->{'build-path'}"); + $self->addCMD("rsync $exclOpts -rlpt $rootfs/ $self->{'build-path'}"); return 1; } @@ -134,7 +134,7 @@ sub _copyPrebootSpecificFiles # write secondary rootfs-layer (including init) on top of base layer my $prebootRootfs - = "$openslxConfig{'base-path'}/share/boot-env/preboot/uclib-rootfs"; + = "$openslxConfig{'base-path'}/share/boot-env/preboot/rootfs"; $self->addCMD("rsync -rlpt $prebootRootfs/ $self->{'build-path'}"); return 1; diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/SlxBoot.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/SlxBoot.pm index 1334c444..82f46103 100644 --- a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/SlxBoot.pm +++ b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/SlxBoot.pm @@ -40,7 +40,7 @@ sub _collectCMDs $self->_writeInitramfsSetup(); $self->_writeSlxSystemConf(); - $self->_copyUclibcRootfs(); + $self->_copyRootfs(); $self->_copyHwinfo(); $self->_copyDistroSpecificFiles(); $self->_copyInitramfsFiles(); @@ -115,11 +115,11 @@ sub _copyDistroSpecificFiles return 1; } -sub _copyUclibcRootfs +sub _copyRootfs { my $self = shift; - my $uclibcRootfs = "$openslxConfig{'base-path'}/share/uclib-rootfs"; + my $rootfs = "$openslxConfig{'base-path'}/share/rootfs"; my @excludes = qw( dialog @@ -136,7 +136,7 @@ sub _copyUclibcRootfs my $exclOpts = join ' ', map { "--exclude $_" } @excludes; - $self->addCMD("rsync $exclOpts -rlpt $uclibcRootfs/ $self->{'build-path'}"); + $self->addCMD("rsync $exclOpts -rlpt $rootfs/ $self->{'build-path'}"); return 1; } diff --git a/src/boot-env/pbs/rootfs/bin/bbinit b/src/boot-env/pbs/rootfs/bin/bbinit new file mode 100755 index 00000000..3fd67612 --- /dev/null +++ b/src/boot-env/pbs/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/src/boot-env/pbs/rootfs/bin/handleEvents b/src/boot-env/pbs/rootfs/bin/handleEvents new file mode 100755 index 00000000..9bb78951 --- /dev/null +++ b/src/boot-env/pbs/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/src/boot-env/pbs/rootfs/etc/bbinit.d/example b/src/boot-env/pbs/rootfs/etc/bbinit.d/example new file mode 100755 index 00000000..122cf566 --- /dev/null +++ b/src/boot-env/pbs/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/src/boot-env/pbs/rootfs/etc/events/example b/src/boot-env/pbs/rootfs/etc/events/example new file mode 100644 index 00000000..75768967 --- /dev/null +++ b/src/boot-env/pbs/rootfs/etc/events/example @@ -0,0 +1,2 @@ +example_depends="" +example_provides="example" diff --git a/src/boot-env/pbs/rootfs/init b/src/boot-env/pbs/rootfs/init new file mode 100755 index 00000000..847cad87 --- /dev/null +++ b/src/boot-env/pbs/rootfs/init @@ -0,0 +1,234 @@ +#!/bin/ash +# Copyright (c) 2008..2009 - 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 feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org +# +# Main script for preboot initial ramfs - preloading environment for running +# OpenSLX linux stateless clients version 5. + +fetchip () { +# we expect to get an ip address within 10++ seconds +( sleep 6 ; 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 + . /tmp/ipstuff + for ns in $dns ; do + echo "nameserver $ns" >>/etc/resolv.conf + done + # simply add a single dns server for passing via kernel cmdline to stage3 + # (quickhack, just the last, list of dns might be better ...) + echo "dnssrv=$ns" >>/tmp/ipstuff + return + else + if [ $i -eq 1 ] ; then + sleep 1 + else + dialog --msgbox "Did not get any proper IP configuration: Please check \ +that your Ethernet card is supported, the machine is connected to the network \ +and a DHCP server is answering your requests." 7 65 + ash + echo "o" >/proc/sysrq-trigger + fi + fi +done +} + +############################################################################# +# PreBoot init main part + +# device files get their own filesystem +devdir="/dev" +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 +for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \ + "/dev/urandom c 1 9" "/dev/kmsg c 1 11" "/dev/tty0 c 4 0" \ + "/dev/tty1 c 4 1" "/dev/tty2 c 4 2" "/dev/tty3 c 4 3" \ + "/dev/tty4 c 4 4" "/dev/tty5 c 4 5" "/dev/tty6 c 4 6" \ + "/dev/tty7 c 4 7" "/dev/tty8 c 4 8" "/dev/tty9 c 4 9" \ + "/dev/tty10 c 4 10" "/dev/tty c 5 0" "/dev/console c 5 1" \ + "/dev/ptmx c 5 2" "/dev/psaux c 10 1" "/dev/agpgart c 10 175" \ + "/dev/fb0 c 29 0" "/dev/bootsplash p" "/dev/xconsole p"; do + mknod $i +done +mkdir -p ${devdir}/pts ${devdir}/shm +export PATH=/bin:/sbin:/usr/bin/:/usr/sbin + +# redirect kernel messages to tty10 instead of tty1 +getty -i -n -l /bin/cat 38400 tty10 & +setlogcons 10 + +# initramfs-setup configuration (common settings for all clients using a +# certain InitRamFS generated by slxmkramfs/mkdxsinitrd) +[ -f /etc/initramfs-setup ] && . /etc/initramfs-setup 2>/dev/null + +# set a default LAN interface, has to be modified for WLAN or on machines +# with more than one ethernet card built in +nwif="eth0" + +# mount the important standard directories +[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc +[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys + +# load framebuffer modules if needed +for mod in vesafb fbcon; do + if [ x != x$(find /lib/modules -name ${mod}.ko) ]; then + modprobe $mod || \ + dialog --infobox "Module $mod did not load for some reason." 3 65 + usleep 1000 + fi +done + +# give startup information +dialog --infobox "Starting OpenSLX preboot environment ..." 3 65 + +# load usb keyboard and network adaptor modules +for mod in ${ramfs_nicmods} af_packet unix hid hid-bright usbhid \ + uhci-hcd ohci-hcd ; do + if [ x != x$(find /lib/modules -name ${mod}.ko) ]; then + modprobe $mod || \ + dialog --infobox "Module $mod did not load for some reason." 3 65 + usleep 10000 + fi +done + +# set the default for boot type and read kernel commandline (for this and +# other options) +export TYPE=fastboot +read KCMDLINE /bin/watchdog +#!/bin/ash +echo \$$ > /tmp/watchdogpid +[ ! -f /proc/version ] && mount -n -t proc proc /proc +sleep 120 2>/dev/null +echo "o" >/proc/sysrq-trigger +EOF + chmod u+x /bin/watchdog + watchdog & +else + getty -i -n -l /bin/ash 38400 tty2 & +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 + ip link show dev eth1 >/dev/null 2>&1 && \ + dialog --msgbox "More than one network interface found. This could cause \ +some trouble as their activation and ordering depends on the module load \ +order ..." 7 65 +fi + +# set up loopback networking and power up ethernet +ip link set dev lo up +ip addr add 127.0.0.1/8 dev lo +ip link set dev $nwif up || echo "I did not find any usable network adaptor." + +# run udhcpc and start a debug shell if no lease could be obtained +mkdir -p /usr/share/udhcpc +echo -e "#!/bin/ash\nunset infomsg HOME IFS mask lease interface DEBUGLEVEL \ +BOOT_IMAGE\nset >/tmp/ipstuff" >/usr/share/udhcpc/default.script +chmod u+x /usr/share/udhcpc/default.script +modprobe -q af_packet +[ -n $vci ] && vci="-V $vci" +fetchip +ip addr add $ip/$(ipcalc -s -p $ip $subnet|sed s/.*=//) dev $nwif +ip route add default via $router + +# get the mac address of the boot network adaptor +macaddr=$(ip link show dev $nwif 2>/dev/null | \ + sed -n "/ether [0-9e-f]\{2\}:.*/p" | sed -e "s/.*ether //;s/ .*//") +echo "macaddr=$macaddr" >>/etc/initramfs-setup + +# at this point a little selection script could be downloaded, which lets the +# user choose what kind of SLX client he wants to get +dialog --infobox "Fetching preboot interactive part and configuration from \ +the net ($boot_uri) ..." 4 65 +mkdir -p /preboot +wget -q -O /preboot/preboot.init ${boot_uri}bootloader/env/getinit/formedia/$PBS_ID +chmod u+x /preboot/preboot.init + +echo "pbs_id=$PBS_ID" >> /etc/pbs.conf + +# start a debug shell if needed, else set quiet kernel parameter +if [ "${DEBUGLEVEL}" -gt 0 ] ; then + echo "Starting shell, leaving it would continue init." + /bin/ash +else + # no debugging output for stage3 run + echo "quiet=quiet" >>/etc/initramfs-setup +fi +# run the preboot interactive part which finally will execute kexec +cd /preboot +exec ./preboot.init +# we should never return from that one ... +dialog --msgbox "The execution of the main preboot component failed. Please \ +check network access of your box. Is $boot_uri reachable!?" 6 65 +# ping -c 1 $boot_uri +sleep 20 && echo "o" >/proc/sysrq-trigger + diff --git a/src/boot-env/pbs/rootfs/preboot/preboot-scripts/dialog.functions b/src/boot-env/pbs/rootfs/preboot/preboot-scripts/dialog.functions new file mode 100644 index 00000000..7c6dd784 --- /dev/null +++ b/src/boot-env/pbs/rootfs/preboot/preboot-scripts/dialog.functions @@ -0,0 +1,105 @@ +# Copyright (c) 2009 - 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/ +# ----------------------------------------------------------------------------- +# dialog.functions +# provides shell scripts for dialog handling +# ----------------------------------------------------------------------------- + +# set -x + +if [ "x" == "x$DIALOG_HEIGHT" ]; then + DIALOG_HEIGHT="10" +fi + +if [ "x" == "x$DIALOG_WIDTH" ]; then + DIALOG_WIDTH="40" +fi + +_ddownload_checkpercentage () { + local lf=$1 + percentage=$(tail -n 5 $lf | sed 's/\.//g' | awk '{print $2}'| sed -n "s/%//p"| tail -n 1) + return $percentage +} + +ddownload () { + local dl_url=$1 + local dl_titel=$2 + local dl_outfile=$3 + local dl_logfile=$4 + + local dl_server=$(dirname $dl_url) + local dl_file=$(basename $dl_url) + + local dl_count + + if [ "x" == "x$dl_logfile" ]; then + dl_logfile="/tmp/logfile.$$" + fi + + if [ "x" == "x$dl_outfile" ]; then + dl_outfile="$dl_file" + fi + + if [ "x" == "x$dl_title" ]; then + dl_title="Downloading $dl_file .." + fi + + if [ -f "$dl_logfile" ]; then + rm $dl_logfile + fi + + # start wget in background + wget -v -b $dl_url -o "$dl_logfile" -O $dl_outfile + + sleep 0.1; + _ddownload_checkpercentage "$dl_logfile" + + dl_count=$? + + while [ $dl_count -le 99 ]; + do + echo $dl_count |dialog --gauge "$dl_title" $DIALOG_HEIGHT $DIALOG_WIDTH + sleep 0.5 + _ddownload_checkpercentage "$dl_logfile" + dl_count=$? + done + + local finished=0 + while [ ! $finished ]; do + finished=$(tail -n 4 $dl_logfile | grep -c "$dl_file"); + done + + echo 100 | dialog --gauge "$dl_title" $DIALOG_HEIGHT $DIALOG_WIDTH; + +} + + + +menu_firststart () { + while [ "x$(cat result)" = "x" ] ; do + dialog --menu "OpenSLX" 30 60 22 \ + 01 "Kiosk" \ + 02 "Kiosk Setup" \ + 03 "Custom System" \ + 2>result + done +} + +menu_oldconfig () { + oldconf=$1; + while [ "x$(cat result)" = "x" ] ; do + dialog --menu "OpenSLX" 30 60 22 \ + 01 "Kiosk" \ + 02 "Kiosk Setup" \ + 03 "Custom System" \ + 04 "Custom System" + 2>result + done +} diff --git a/src/boot-env/pbs/uclib-rootfs/bin/bbinit b/src/boot-env/pbs/uclib-rootfs/bin/bbinit deleted file mode 100755 index 3fd67612..00000000 --- a/src/boot-env/pbs/uclib-rootfs/bin/bbinit +++ /dev/null @@ -1,19 +0,0 @@ -#!/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/src/boot-env/pbs/uclib-rootfs/bin/handleEvents b/src/boot-env/pbs/uclib-rootfs/bin/handleEvents deleted file mode 100755 index 9bb78951..00000000 --- a/src/boot-env/pbs/uclib-rootfs/bin/handleEvents +++ /dev/null @@ -1,38 +0,0 @@ -#!/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/src/boot-env/pbs/uclib-rootfs/etc/bbinit.d/example b/src/boot-env/pbs/uclib-rootfs/etc/bbinit.d/example deleted file mode 100755 index 122cf566..00000000 --- a/src/boot-env/pbs/uclib-rootfs/etc/bbinit.d/example +++ /dev/null @@ -1,32 +0,0 @@ -#!/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/src/boot-env/pbs/uclib-rootfs/etc/events/example b/src/boot-env/pbs/uclib-rootfs/etc/events/example deleted file mode 100644 index 75768967..00000000 --- a/src/boot-env/pbs/uclib-rootfs/etc/events/example +++ /dev/null @@ -1,2 +0,0 @@ -example_depends="" -example_provides="example" diff --git a/src/boot-env/pbs/uclib-rootfs/init b/src/boot-env/pbs/uclib-rootfs/init deleted file mode 100755 index 847cad87..00000000 --- a/src/boot-env/pbs/uclib-rootfs/init +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/ash -# Copyright (c) 2008..2009 - 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 feedback to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org -# -# Main script for preboot initial ramfs - preloading environment for running -# OpenSLX linux stateless clients version 5. - -fetchip () { -# we expect to get an ip address within 10++ seconds -( sleep 6 ; 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 - . /tmp/ipstuff - for ns in $dns ; do - echo "nameserver $ns" >>/etc/resolv.conf - done - # simply add a single dns server for passing via kernel cmdline to stage3 - # (quickhack, just the last, list of dns might be better ...) - echo "dnssrv=$ns" >>/tmp/ipstuff - return - else - if [ $i -eq 1 ] ; then - sleep 1 - else - dialog --msgbox "Did not get any proper IP configuration: Please check \ -that your Ethernet card is supported, the machine is connected to the network \ -and a DHCP server is answering your requests." 7 65 - ash - echo "o" >/proc/sysrq-trigger - fi - fi -done -} - -############################################################################# -# PreBoot init main part - -# device files get their own filesystem -devdir="/dev" -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 -for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \ - "/dev/urandom c 1 9" "/dev/kmsg c 1 11" "/dev/tty0 c 4 0" \ - "/dev/tty1 c 4 1" "/dev/tty2 c 4 2" "/dev/tty3 c 4 3" \ - "/dev/tty4 c 4 4" "/dev/tty5 c 4 5" "/dev/tty6 c 4 6" \ - "/dev/tty7 c 4 7" "/dev/tty8 c 4 8" "/dev/tty9 c 4 9" \ - "/dev/tty10 c 4 10" "/dev/tty c 5 0" "/dev/console c 5 1" \ - "/dev/ptmx c 5 2" "/dev/psaux c 10 1" "/dev/agpgart c 10 175" \ - "/dev/fb0 c 29 0" "/dev/bootsplash p" "/dev/xconsole p"; do - mknod $i -done -mkdir -p ${devdir}/pts ${devdir}/shm -export PATH=/bin:/sbin:/usr/bin/:/usr/sbin - -# redirect kernel messages to tty10 instead of tty1 -getty -i -n -l /bin/cat 38400 tty10 & -setlogcons 10 - -# initramfs-setup configuration (common settings for all clients using a -# certain InitRamFS generated by slxmkramfs/mkdxsinitrd) -[ -f /etc/initramfs-setup ] && . /etc/initramfs-setup 2>/dev/null - -# set a default LAN interface, has to be modified for WLAN or on machines -# with more than one ethernet card built in -nwif="eth0" - -# mount the important standard directories -[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc -[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys - -# load framebuffer modules if needed -for mod in vesafb fbcon; do - if [ x != x$(find /lib/modules -name ${mod}.ko) ]; then - modprobe $mod || \ - dialog --infobox "Module $mod did not load for some reason." 3 65 - usleep 1000 - fi -done - -# give startup information -dialog --infobox "Starting OpenSLX preboot environment ..." 3 65 - -# load usb keyboard and network adaptor modules -for mod in ${ramfs_nicmods} af_packet unix hid hid-bright usbhid \ - uhci-hcd ohci-hcd ; do - if [ x != x$(find /lib/modules -name ${mod}.ko) ]; then - modprobe $mod || \ - dialog --infobox "Module $mod did not load for some reason." 3 65 - usleep 10000 - fi -done - -# set the default for boot type and read kernel commandline (for this and -# other options) -export TYPE=fastboot -read KCMDLINE /bin/watchdog -#!/bin/ash -echo \$$ > /tmp/watchdogpid -[ ! -f /proc/version ] && mount -n -t proc proc /proc -sleep 120 2>/dev/null -echo "o" >/proc/sysrq-trigger -EOF - chmod u+x /bin/watchdog - watchdog & -else - getty -i -n -l /bin/ash 38400 tty2 & -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 - ip link show dev eth1 >/dev/null 2>&1 && \ - dialog --msgbox "More than one network interface found. This could cause \ -some trouble as their activation and ordering depends on the module load \ -order ..." 7 65 -fi - -# set up loopback networking and power up ethernet -ip link set dev lo up -ip addr add 127.0.0.1/8 dev lo -ip link set dev $nwif up || echo "I did not find any usable network adaptor." - -# run udhcpc and start a debug shell if no lease could be obtained -mkdir -p /usr/share/udhcpc -echo -e "#!/bin/ash\nunset infomsg HOME IFS mask lease interface DEBUGLEVEL \ -BOOT_IMAGE\nset >/tmp/ipstuff" >/usr/share/udhcpc/default.script -chmod u+x /usr/share/udhcpc/default.script -modprobe -q af_packet -[ -n $vci ] && vci="-V $vci" -fetchip -ip addr add $ip/$(ipcalc -s -p $ip $subnet|sed s/.*=//) dev $nwif -ip route add default via $router - -# get the mac address of the boot network adaptor -macaddr=$(ip link show dev $nwif 2>/dev/null | \ - sed -n "/ether [0-9e-f]\{2\}:.*/p" | sed -e "s/.*ether //;s/ .*//") -echo "macaddr=$macaddr" >>/etc/initramfs-setup - -# at this point a little selection script could be downloaded, which lets the -# user choose what kind of SLX client he wants to get -dialog --infobox "Fetching preboot interactive part and configuration from \ -the net ($boot_uri) ..." 4 65 -mkdir -p /preboot -wget -q -O /preboot/preboot.init ${boot_uri}bootloader/env/getinit/formedia/$PBS_ID -chmod u+x /preboot/preboot.init - -echo "pbs_id=$PBS_ID" >> /etc/pbs.conf - -# start a debug shell if needed, else set quiet kernel parameter -if [ "${DEBUGLEVEL}" -gt 0 ] ; then - echo "Starting shell, leaving it would continue init." - /bin/ash -else - # no debugging output for stage3 run - echo "quiet=quiet" >>/etc/initramfs-setup -fi -# run the preboot interactive part which finally will execute kexec -cd /preboot -exec ./preboot.init -# we should never return from that one ... -dialog --msgbox "The execution of the main preboot component failed. Please \ -check network access of your box. Is $boot_uri reachable!?" 6 65 -# ping -c 1 $boot_uri -sleep 20 && echo "o" >/proc/sysrq-trigger - diff --git a/src/boot-env/pbs/uclib-rootfs/preboot/preboot-scripts/dialog.functions b/src/boot-env/pbs/uclib-rootfs/preboot/preboot-scripts/dialog.functions deleted file mode 100644 index 7c6dd784..00000000 --- a/src/boot-env/pbs/uclib-rootfs/preboot/preboot-scripts/dialog.functions +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright (c) 2009 - 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/ -# ----------------------------------------------------------------------------- -# dialog.functions -# provides shell scripts for dialog handling -# ----------------------------------------------------------------------------- - -# set -x - -if [ "x" == "x$DIALOG_HEIGHT" ]; then - DIALOG_HEIGHT="10" -fi - -if [ "x" == "x$DIALOG_WIDTH" ]; then - DIALOG_WIDTH="40" -fi - -_ddownload_checkpercentage () { - local lf=$1 - percentage=$(tail -n 5 $lf | sed 's/\.//g' | awk '{print $2}'| sed -n "s/%//p"| tail -n 1) - return $percentage -} - -ddownload () { - local dl_url=$1 - local dl_titel=$2 - local dl_outfile=$3 - local dl_logfile=$4 - - local dl_server=$(dirname $dl_url) - local dl_file=$(basename $dl_url) - - local dl_count - - if [ "x" == "x$dl_logfile" ]; then - dl_logfile="/tmp/logfile.$$" - fi - - if [ "x" == "x$dl_outfile" ]; then - dl_outfile="$dl_file" - fi - - if [ "x" == "x$dl_title" ]; then - dl_title="Downloading $dl_file .." - fi - - if [ -f "$dl_logfile" ]; then - rm $dl_logfile - fi - - # start wget in background - wget -v -b $dl_url -o "$dl_logfile" -O $dl_outfile - - sleep 0.1; - _ddownload_checkpercentage "$dl_logfile" - - dl_count=$? - - while [ $dl_count -le 99 ]; - do - echo $dl_count |dialog --gauge "$dl_title" $DIALOG_HEIGHT $DIALOG_WIDTH - sleep 0.5 - _ddownload_checkpercentage "$dl_logfile" - dl_count=$? - done - - local finished=0 - while [ ! $finished ]; do - finished=$(tail -n 4 $dl_logfile | grep -c "$dl_file"); - done - - echo 100 | dialog --gauge "$dl_title" $DIALOG_HEIGHT $DIALOG_WIDTH; - -} - - - -menu_firststart () { - while [ "x$(cat result)" = "x" ] ; do - dialog --menu "OpenSLX" 30 60 22 \ - 01 "Kiosk" \ - 02 "Kiosk Setup" \ - 03 "Custom System" \ - 2>result - done -} - -menu_oldconfig () { - oldconf=$1; - while [ "x$(cat result)" = "x" ] ; do - dialog --menu "OpenSLX" 30 60 22 \ - 01 "Kiosk" \ - 02 "Kiosk Setup" \ - 03 "Custom System" \ - 04 "Custom System" - 2>result - done -} diff --git a/src/boot-env/preboot/rootfs/init b/src/boot-env/preboot/rootfs/init new file mode 100755 index 00000000..ab2f9ca0 --- /dev/null +++ b/src/boot-env/preboot/rootfs/init @@ -0,0 +1,216 @@ +#!/bin/ash +# Copyright (c) 2008..2009 - 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 feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org +# +# Main script for preboot initial ramfs - preloading environment for running +# OpenSLX linux stateless clients version 5. + +fetchip () { +# we expect to get an ip address within 10++ seconds +( 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 + . /tmp/ipstuff + for ns in $dns ; do + echo "nameserver $ns" >>/etc/resolv.conf + done + # simply add a single dns server for passing via kernel cmdline to stage3 + # (quickhack, just the last, list of dns might be better ...) + echo "dnssrv=$ns" >>/tmp/ipstuff + return + else + if [ $i -eq 1 ] ; then + sleep 1 + else + dialog --msgbox "Did not get any proper IP configuration: Please check \ +that your Ethernet card is supported, the machine is connected to the network \ +and a DHCP server is answering your requests." 7 65 + ash + echo "o" >/proc/sysrq-trigger + fi + fi +done +} + +############################################################################# +# PreBoot init main part + +# device files get their own filesystem +devdir="/dev" +mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir} +export DEBUGLEVEL=0 + +# create basic device files an directories in dev +for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \ + "/dev/urandom c 1 9" "/dev/kmsg c 1 11" "/dev/tty0 c 4 0" \ + "/dev/tty1 c 4 1" "/dev/tty2 c 4 2" "/dev/tty3 c 4 3" \ + "/dev/tty4 c 4 4" "/dev/tty5 c 4 5" "/dev/tty6 c 4 6" \ + "/dev/tty7 c 4 7" "/dev/tty8 c 4 8" "/dev/tty9 c 4 9" \ + "/dev/tty10 c 4 10" "/dev/tty c 5 0" "/dev/console c 5 1" \ + "/dev/ptmx c 5 2" "/dev/psaux c 10 1" "/dev/agpgart c 10 175" \ + "/dev/fb0 c 29 0" "/dev/bootsplash p" "/dev/xconsole p"; do + mknod $i +done +mkdir -p ${devdir}/pts ${devdir}/shm +export PATH=/bin:/sbin:/usr/bin/:/usr/sbin + +# redirect kernel messages to tty10 instead of tty1 +getty -i -n -l /bin/cat 38400 tty10 & +setlogcons 10 + +# initramfs-setup configuration (common settings for all clients using a +# certain InitRamFS generated by slxmkramfs/mkdxsinitrd) +[ -f /etc/initramfs-setup ] && . /etc/initramfs-setup 2>/dev/null + +# set a default LAN interface, has to be modified for WLAN or on machines +# with more than one ethernet card built in +nwif="eth0" + +# mount the important standard directories +[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc +[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys + +# load framebuffer modules if needed +for mod in vesafb fbcon; do + if [ x != x$(find /lib/modules -name ${mod}.ko) ]; then + modprobe $mod || \ + dialog --infobox "Module $mod did not load for some reason." 3 65 + usleep 1000 + fi +done + +# give startup information +dialog --infobox "Starting OpenSLX preboot environment ..." 3 65 + +# load usb keyboard and network adaptor modules +for mod in ${ramfs_nicmods} af_packet unix hid hid-bright usbhid \ + uhci-hcd ohci-hcd ; do + if [ x != x$(find /lib/modules -name ${mod}.ko) ]; then + modprobe $mod || \ + dialog --infobox "Module $mod did not load for some reason." 3 65 + usleep 10000 + fi +done + +# set the default for boot type and read kernel commandline (for this and +# other options) +export TYPE=fastboot +read KCMDLINE /bin/watchdog +#!/bin/ash +echo \$$ > /tmp/watchdogpid +[ ! -f /proc/version ] && mount -n -t proc proc /proc +sleep 120 2>/dev/null +echo "o" >/proc/sysrq-trigger +EOF + chmod u+x /bin/watchdog + watchdog & +else + getty -i -n -l /bin/ash 38400 tty2 & +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 + ip link show dev eth1 >/dev/null 2>&1 && \ + dialog --msgbox "More than one network interface found. This could cause \ +some trouble as their activation and ordering depends on the module load \ +order ..." 7 65 +fi + +# set up loopback networking and power up ethernet +ip link set dev lo up +ip addr add 127.0.0.1/8 dev lo +ip link set dev $nwif up || echo "I did not find any usable network adaptor." + +# run udhcpc and start a debug shell if no lease could be obtained +mkdir -p /usr/share/udhcpc +echo -e "#!/bin/ash\nunset infomsg HOME IFS mask lease interface DEBUGLEVEL \ +BOOT_IMAGE\nset >/tmp/ipstuff" >/usr/share/udhcpc/default.script +chmod u+x /usr/share/udhcpc/default.script +modprobe -q af_packet +[ -n $vci ] && vci="-V $vci" +fetchip +ip addr add $ip/$(ipcalc -s -p $ip $subnet|sed s/.*=//) dev $nwif +ip route add default via $router + +# get the mac address of the boot network adaptor +macaddr=$(ip link show dev $nwif 2>/dev/null | \ + sed -n "/ether [0-9e-f]\{2\}:.*/p" | sed -e "s/.*ether //;s/ .*//") +echo "macaddr=$macaddr" >>/etc/initramfs-setup + +# at this point a little selection script could be downloaded, which lets the +# user choose what kind of SLX client he wants to get +dialog --infobox "Fetching preboot interactive part and configuration from \ +the net ($boot_uri) ..." 4 65 +wget -q -O /tmp/preboot.env $boot_uri/bootloader/${preboot_id}.env +mkdir /preboot +tar -xzf /tmp/preboot.env -C /preboot +# start a debug shell if needed, else set quiet kernel parameter +if [ "${DEBUGLEVEL}" -gt 0 ] ; then + echo "Starting shell, leaving it would continue init." + /bin/ash +else + # no debugging output for stage3 run + echo "quiet=quiet" >>/etc/initramfs-setup +fi +# run the preboot interactive part which finally will execute kexec +cd /preboot +exec ./preboot.sh +# we should never return from that one ... +dialog --msgbox "The execution of the main preboot component failed. Please \ +check network access of your box. Is $boot_uri reachable!?" 6 65 +# ping -c 1 $boot_uri +sleep 20 && echo "o" >/proc/sysrq-trigger + diff --git a/src/boot-env/preboot/rootfs/lib/libcurses.so b/src/boot-env/preboot/rootfs/lib/libcurses.so new file mode 120000 index 00000000..c7b1e02a --- /dev/null +++ b/src/boot-env/preboot/rootfs/lib/libcurses.so @@ -0,0 +1 @@ +libncurses.so.5.6 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/lib/libncurses.so b/src/boot-env/preboot/rootfs/lib/libncurses.so new file mode 120000 index 00000000..7257b6af --- /dev/null +++ b/src/boot-env/preboot/rootfs/lib/libncurses.so @@ -0,0 +1 @@ +libncurses.so.5 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/lib/libncurses.so.5 b/src/boot-env/preboot/rootfs/lib/libncurses.so.5 new file mode 120000 index 00000000..c7b1e02a --- /dev/null +++ b/src/boot-env/preboot/rootfs/lib/libncurses.so.5 @@ -0,0 +1 @@ +libncurses.so.5.6 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/lib/libncurses.so.5.6 b/src/boot-env/preboot/rootfs/lib/libncurses.so.5.6 new file mode 100755 index 00000000..a395c6b7 Binary files /dev/null and b/src/boot-env/preboot/rootfs/lib/libncurses.so.5.6 differ diff --git a/src/boot-env/preboot/rootfs/usr/bin/clear b/src/boot-env/preboot/rootfs/usr/bin/clear new file mode 100755 index 00000000..acc13246 Binary files /dev/null and b/src/boot-env/preboot/rootfs/usr/bin/clear differ diff --git a/src/boot-env/preboot/rootfs/usr/bin/dialog b/src/boot-env/preboot/rootfs/usr/bin/dialog new file mode 100755 index 00000000..6929569f Binary files /dev/null and b/src/boot-env/preboot/rootfs/usr/bin/dialog differ diff --git a/src/boot-env/preboot/rootfs/usr/bin/w3m b/src/boot-env/preboot/rootfs/usr/bin/w3m new file mode 100755 index 00000000..2766a681 Binary files /dev/null and b/src/boot-env/preboot/rootfs/usr/bin/w3m differ diff --git a/src/boot-env/preboot/rootfs/usr/lib/libcrypto.so b/src/boot-env/preboot/rootfs/usr/lib/libcrypto.so new file mode 120000 index 00000000..cda623f3 --- /dev/null +++ b/src/boot-env/preboot/rootfs/usr/lib/libcrypto.so @@ -0,0 +1 @@ +libcrypto.so.0.9.8 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/usr/lib/libcrypto.so.0.9.8 b/src/boot-env/preboot/rootfs/usr/lib/libcrypto.so.0.9.8 new file mode 100755 index 00000000..bb1b8163 Binary files /dev/null and b/src/boot-env/preboot/rootfs/usr/lib/libcrypto.so.0.9.8 differ diff --git a/src/boot-env/preboot/rootfs/usr/lib/libcurses.so b/src/boot-env/preboot/rootfs/usr/lib/libcurses.so new file mode 100755 index 00000000..32ad8efe --- /dev/null +++ b/src/boot-env/preboot/rootfs/usr/lib/libcurses.so @@ -0,0 +1,11 @@ +/* GNU ld script + Since Gentoo has critical dynamic libraries in /lib, and the static versions + in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we + run into linking problems. This "fake" dynamic lib is a linker script that + redirects the linker to the real lib. And yes, this works in the cross- + compiling scenario as the sysroot-ed linker will prepend the real path. + + See bug http://bugs.gentoo.org/4411 for more info. + */ +OUTPUT_FORMAT ( elf32-i386 ) +GROUP ( /lib/libcurses.so ) diff --git a/src/boot-env/preboot/rootfs/usr/lib/libform.so b/src/boot-env/preboot/rootfs/usr/lib/libform.so new file mode 120000 index 00000000..10e91696 --- /dev/null +++ b/src/boot-env/preboot/rootfs/usr/lib/libform.so @@ -0,0 +1 @@ +libform.so.5 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/usr/lib/libform.so.5 b/src/boot-env/preboot/rootfs/usr/lib/libform.so.5 new file mode 120000 index 00000000..4a80f6b6 --- /dev/null +++ b/src/boot-env/preboot/rootfs/usr/lib/libform.so.5 @@ -0,0 +1 @@ +libform.so.5.6 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/usr/lib/libform.so.5.6 b/src/boot-env/preboot/rootfs/usr/lib/libform.so.5.6 new file mode 100755 index 00000000..888adb22 Binary files /dev/null and b/src/boot-env/preboot/rootfs/usr/lib/libform.so.5.6 differ diff --git a/src/boot-env/preboot/rootfs/usr/lib/libmenu.so b/src/boot-env/preboot/rootfs/usr/lib/libmenu.so new file mode 120000 index 00000000..b12b5cfb --- /dev/null +++ b/src/boot-env/preboot/rootfs/usr/lib/libmenu.so @@ -0,0 +1 @@ +libmenu.so.5 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/usr/lib/libmenu.so.5 b/src/boot-env/preboot/rootfs/usr/lib/libmenu.so.5 new file mode 120000 index 00000000..869f4a57 --- /dev/null +++ b/src/boot-env/preboot/rootfs/usr/lib/libmenu.so.5 @@ -0,0 +1 @@ +libmenu.so.5.6 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/usr/lib/libmenu.so.5.6 b/src/boot-env/preboot/rootfs/usr/lib/libmenu.so.5.6 new file mode 100755 index 00000000..fb190a90 Binary files /dev/null and b/src/boot-env/preboot/rootfs/usr/lib/libmenu.so.5.6 differ diff --git a/src/boot-env/preboot/rootfs/usr/lib/libncurses.so b/src/boot-env/preboot/rootfs/usr/lib/libncurses.so new file mode 100755 index 00000000..e7122a85 --- /dev/null +++ b/src/boot-env/preboot/rootfs/usr/lib/libncurses.so @@ -0,0 +1,11 @@ +/* GNU ld script + Since Gentoo has critical dynamic libraries in /lib, and the static versions + in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we + run into linking problems. This "fake" dynamic lib is a linker script that + redirects the linker to the real lib. And yes, this works in the cross- + compiling scenario as the sysroot-ed linker will prepend the real path. + + See bug http://bugs.gentoo.org/4411 for more info. + */ +OUTPUT_FORMAT ( elf32-i386 ) +GROUP ( /lib/libncurses.so ) diff --git a/src/boot-env/preboot/rootfs/usr/lib/libpanel.so b/src/boot-env/preboot/rootfs/usr/lib/libpanel.so new file mode 120000 index 00000000..b5cd4a70 --- /dev/null +++ b/src/boot-env/preboot/rootfs/usr/lib/libpanel.so @@ -0,0 +1 @@ +libpanel.so.5 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/usr/lib/libpanel.so.5 b/src/boot-env/preboot/rootfs/usr/lib/libpanel.so.5 new file mode 120000 index 00000000..ff2e80a5 --- /dev/null +++ b/src/boot-env/preboot/rootfs/usr/lib/libpanel.so.5 @@ -0,0 +1 @@ +libpanel.so.5.6 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/usr/lib/libpanel.so.5.6 b/src/boot-env/preboot/rootfs/usr/lib/libpanel.so.5.6 new file mode 100755 index 00000000..4acbc076 Binary files /dev/null and b/src/boot-env/preboot/rootfs/usr/lib/libpanel.so.5.6 differ diff --git a/src/boot-env/preboot/rootfs/usr/lib/libssl.so b/src/boot-env/preboot/rootfs/usr/lib/libssl.so new file mode 120000 index 00000000..7874414f --- /dev/null +++ b/src/boot-env/preboot/rootfs/usr/lib/libssl.so @@ -0,0 +1 @@ +libssl.so.0.9.8 \ No newline at end of file diff --git a/src/boot-env/preboot/rootfs/usr/lib/libssl.so.0.9.8 b/src/boot-env/preboot/rootfs/usr/lib/libssl.so.0.9.8 new file mode 100755 index 00000000..194078c5 Binary files /dev/null and b/src/boot-env/preboot/rootfs/usr/lib/libssl.so.0.9.8 differ diff --git a/src/boot-env/preboot/rootfs/usr/sbin/kdump b/src/boot-env/preboot/rootfs/usr/sbin/kdump new file mode 100755 index 00000000..07226a4b Binary files /dev/null and b/src/boot-env/preboot/rootfs/usr/sbin/kdump differ diff --git a/src/boot-env/preboot/rootfs/usr/sbin/kexec b/src/boot-env/preboot/rootfs/usr/sbin/kexec new file mode 100755 index 00000000..cc49c45c Binary files /dev/null and b/src/boot-env/preboot/rootfs/usr/sbin/kexec differ diff --git a/src/boot-env/preboot/uclib-rootfs/init b/src/boot-env/preboot/uclib-rootfs/init deleted file mode 100755 index ab2f9ca0..00000000 --- a/src/boot-env/preboot/uclib-rootfs/init +++ /dev/null @@ -1,216 +0,0 @@ -#!/bin/ash -# Copyright (c) 2008..2009 - 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 feedback to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org -# -# Main script for preboot initial ramfs - preloading environment for running -# OpenSLX linux stateless clients version 5. - -fetchip () { -# we expect to get an ip address within 10++ seconds -( 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 - . /tmp/ipstuff - for ns in $dns ; do - echo "nameserver $ns" >>/etc/resolv.conf - done - # simply add a single dns server for passing via kernel cmdline to stage3 - # (quickhack, just the last, list of dns might be better ...) - echo "dnssrv=$ns" >>/tmp/ipstuff - return - else - if [ $i -eq 1 ] ; then - sleep 1 - else - dialog --msgbox "Did not get any proper IP configuration: Please check \ -that your Ethernet card is supported, the machine is connected to the network \ -and a DHCP server is answering your requests." 7 65 - ash - echo "o" >/proc/sysrq-trigger - fi - fi -done -} - -############################################################################# -# PreBoot init main part - -# device files get their own filesystem -devdir="/dev" -mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir} -export DEBUGLEVEL=0 - -# create basic device files an directories in dev -for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \ - "/dev/urandom c 1 9" "/dev/kmsg c 1 11" "/dev/tty0 c 4 0" \ - "/dev/tty1 c 4 1" "/dev/tty2 c 4 2" "/dev/tty3 c 4 3" \ - "/dev/tty4 c 4 4" "/dev/tty5 c 4 5" "/dev/tty6 c 4 6" \ - "/dev/tty7 c 4 7" "/dev/tty8 c 4 8" "/dev/tty9 c 4 9" \ - "/dev/tty10 c 4 10" "/dev/tty c 5 0" "/dev/console c 5 1" \ - "/dev/ptmx c 5 2" "/dev/psaux c 10 1" "/dev/agpgart c 10 175" \ - "/dev/fb0 c 29 0" "/dev/bootsplash p" "/dev/xconsole p"; do - mknod $i -done -mkdir -p ${devdir}/pts ${devdir}/shm -export PATH=/bin:/sbin:/usr/bin/:/usr/sbin - -# redirect kernel messages to tty10 instead of tty1 -getty -i -n -l /bin/cat 38400 tty10 & -setlogcons 10 - -# initramfs-setup configuration (common settings for all clients using a -# certain InitRamFS generated by slxmkramfs/mkdxsinitrd) -[ -f /etc/initramfs-setup ] && . /etc/initramfs-setup 2>/dev/null - -# set a default LAN interface, has to be modified for WLAN or on machines -# with more than one ethernet card built in -nwif="eth0" - -# mount the important standard directories -[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc -[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys - -# load framebuffer modules if needed -for mod in vesafb fbcon; do - if [ x != x$(find /lib/modules -name ${mod}.ko) ]; then - modprobe $mod || \ - dialog --infobox "Module $mod did not load for some reason." 3 65 - usleep 1000 - fi -done - -# give startup information -dialog --infobox "Starting OpenSLX preboot environment ..." 3 65 - -# load usb keyboard and network adaptor modules -for mod in ${ramfs_nicmods} af_packet unix hid hid-bright usbhid \ - uhci-hcd ohci-hcd ; do - if [ x != x$(find /lib/modules -name ${mod}.ko) ]; then - modprobe $mod || \ - dialog --infobox "Module $mod did not load for some reason." 3 65 - usleep 10000 - fi -done - -# set the default for boot type and read kernel commandline (for this and -# other options) -export TYPE=fastboot -read KCMDLINE /bin/watchdog -#!/bin/ash -echo \$$ > /tmp/watchdogpid -[ ! -f /proc/version ] && mount -n -t proc proc /proc -sleep 120 2>/dev/null -echo "o" >/proc/sysrq-trigger -EOF - chmod u+x /bin/watchdog - watchdog & -else - getty -i -n -l /bin/ash 38400 tty2 & -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 - ip link show dev eth1 >/dev/null 2>&1 && \ - dialog --msgbox "More than one network interface found. This could cause \ -some trouble as their activation and ordering depends on the module load \ -order ..." 7 65 -fi - -# set up loopback networking and power up ethernet -ip link set dev lo up -ip addr add 127.0.0.1/8 dev lo -ip link set dev $nwif up || echo "I did not find any usable network adaptor." - -# run udhcpc and start a debug shell if no lease could be obtained -mkdir -p /usr/share/udhcpc -echo -e "#!/bin/ash\nunset infomsg HOME IFS mask lease interface DEBUGLEVEL \ -BOOT_IMAGE\nset >/tmp/ipstuff" >/usr/share/udhcpc/default.script -chmod u+x /usr/share/udhcpc/default.script -modprobe -q af_packet -[ -n $vci ] && vci="-V $vci" -fetchip -ip addr add $ip/$(ipcalc -s -p $ip $subnet|sed s/.*=//) dev $nwif -ip route add default via $router - -# get the mac address of the boot network adaptor -macaddr=$(ip link show dev $nwif 2>/dev/null | \ - sed -n "/ether [0-9e-f]\{2\}:.*/p" | sed -e "s/.*ether //;s/ .*//") -echo "macaddr=$macaddr" >>/etc/initramfs-setup - -# at this point a little selection script could be downloaded, which lets the -# user choose what kind of SLX client he wants to get -dialog --infobox "Fetching preboot interactive part and configuration from \ -the net ($boot_uri) ..." 4 65 -wget -q -O /tmp/preboot.env $boot_uri/bootloader/${preboot_id}.env -mkdir /preboot -tar -xzf /tmp/preboot.env -C /preboot -# start a debug shell if needed, else set quiet kernel parameter -if [ "${DEBUGLEVEL}" -gt 0 ] ; then - echo "Starting shell, leaving it would continue init." - /bin/ash -else - # no debugging output for stage3 run - echo "quiet=quiet" >>/etc/initramfs-setup -fi -# run the preboot interactive part which finally will execute kexec -cd /preboot -exec ./preboot.sh -# we should never return from that one ... -dialog --msgbox "The execution of the main preboot component failed. Please \ -check network access of your box. Is $boot_uri reachable!?" 6 65 -# ping -c 1 $boot_uri -sleep 20 && echo "o" >/proc/sysrq-trigger - diff --git a/src/boot-env/preboot/uclib-rootfs/lib/libcurses.so b/src/boot-env/preboot/uclib-rootfs/lib/libcurses.so deleted file mode 120000 index c7b1e02a..00000000 --- a/src/boot-env/preboot/uclib-rootfs/lib/libcurses.so +++ /dev/null @@ -1 +0,0 @@ -libncurses.so.5.6 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/lib/libncurses.so b/src/boot-env/preboot/uclib-rootfs/lib/libncurses.so deleted file mode 120000 index 7257b6af..00000000 --- a/src/boot-env/preboot/uclib-rootfs/lib/libncurses.so +++ /dev/null @@ -1 +0,0 @@ -libncurses.so.5 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/lib/libncurses.so.5 b/src/boot-env/preboot/uclib-rootfs/lib/libncurses.so.5 deleted file mode 120000 index c7b1e02a..00000000 --- a/src/boot-env/preboot/uclib-rootfs/lib/libncurses.so.5 +++ /dev/null @@ -1 +0,0 @@ -libncurses.so.5.6 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/lib/libncurses.so.5.6 b/src/boot-env/preboot/uclib-rootfs/lib/libncurses.so.5.6 deleted file mode 100755 index a395c6b7..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/lib/libncurses.so.5.6 and /dev/null differ diff --git a/src/boot-env/preboot/uclib-rootfs/usr/bin/clear b/src/boot-env/preboot/uclib-rootfs/usr/bin/clear deleted file mode 100755 index acc13246..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/usr/bin/clear and /dev/null differ diff --git a/src/boot-env/preboot/uclib-rootfs/usr/bin/dialog b/src/boot-env/preboot/uclib-rootfs/usr/bin/dialog deleted file mode 100755 index 6929569f..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/usr/bin/dialog and /dev/null differ diff --git a/src/boot-env/preboot/uclib-rootfs/usr/bin/w3m b/src/boot-env/preboot/uclib-rootfs/usr/bin/w3m deleted file mode 100755 index 2766a681..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/usr/bin/w3m and /dev/null differ diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libcrypto.so b/src/boot-env/preboot/uclib-rootfs/usr/lib/libcrypto.so deleted file mode 120000 index cda623f3..00000000 --- a/src/boot-env/preboot/uclib-rootfs/usr/lib/libcrypto.so +++ /dev/null @@ -1 +0,0 @@ -libcrypto.so.0.9.8 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libcrypto.so.0.9.8 b/src/boot-env/preboot/uclib-rootfs/usr/lib/libcrypto.so.0.9.8 deleted file mode 100755 index bb1b8163..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/usr/lib/libcrypto.so.0.9.8 and /dev/null differ diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libcurses.so b/src/boot-env/preboot/uclib-rootfs/usr/lib/libcurses.so deleted file mode 100755 index 32ad8efe..00000000 --- a/src/boot-env/preboot/uclib-rootfs/usr/lib/libcurses.so +++ /dev/null @@ -1,11 +0,0 @@ -/* GNU ld script - Since Gentoo has critical dynamic libraries in /lib, and the static versions - in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we - run into linking problems. This "fake" dynamic lib is a linker script that - redirects the linker to the real lib. And yes, this works in the cross- - compiling scenario as the sysroot-ed linker will prepend the real path. - - See bug http://bugs.gentoo.org/4411 for more info. - */ -OUTPUT_FORMAT ( elf32-i386 ) -GROUP ( /lib/libcurses.so ) diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so b/src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so deleted file mode 120000 index 10e91696..00000000 --- a/src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so +++ /dev/null @@ -1 +0,0 @@ -libform.so.5 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so.5 b/src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so.5 deleted file mode 120000 index 4a80f6b6..00000000 --- a/src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so.5 +++ /dev/null @@ -1 +0,0 @@ -libform.so.5.6 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so.5.6 b/src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so.5.6 deleted file mode 100755 index 888adb22..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/usr/lib/libform.so.5.6 and /dev/null differ diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so b/src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so deleted file mode 120000 index b12b5cfb..00000000 --- a/src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so +++ /dev/null @@ -1 +0,0 @@ -libmenu.so.5 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so.5 b/src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so.5 deleted file mode 120000 index 869f4a57..00000000 --- a/src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so.5 +++ /dev/null @@ -1 +0,0 @@ -libmenu.so.5.6 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so.5.6 b/src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so.5.6 deleted file mode 100755 index fb190a90..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/usr/lib/libmenu.so.5.6 and /dev/null differ diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libncurses.so b/src/boot-env/preboot/uclib-rootfs/usr/lib/libncurses.so deleted file mode 100755 index e7122a85..00000000 --- a/src/boot-env/preboot/uclib-rootfs/usr/lib/libncurses.so +++ /dev/null @@ -1,11 +0,0 @@ -/* GNU ld script - Since Gentoo has critical dynamic libraries in /lib, and the static versions - in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we - run into linking problems. This "fake" dynamic lib is a linker script that - redirects the linker to the real lib. And yes, this works in the cross- - compiling scenario as the sysroot-ed linker will prepend the real path. - - See bug http://bugs.gentoo.org/4411 for more info. - */ -OUTPUT_FORMAT ( elf32-i386 ) -GROUP ( /lib/libncurses.so ) diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so b/src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so deleted file mode 120000 index b5cd4a70..00000000 --- a/src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so +++ /dev/null @@ -1 +0,0 @@ -libpanel.so.5 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so.5 b/src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so.5 deleted file mode 120000 index ff2e80a5..00000000 --- a/src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so.5 +++ /dev/null @@ -1 +0,0 @@ -libpanel.so.5.6 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so.5.6 b/src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so.5.6 deleted file mode 100755 index 4acbc076..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/usr/lib/libpanel.so.5.6 and /dev/null differ diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libssl.so b/src/boot-env/preboot/uclib-rootfs/usr/lib/libssl.so deleted file mode 120000 index 7874414f..00000000 --- a/src/boot-env/preboot/uclib-rootfs/usr/lib/libssl.so +++ /dev/null @@ -1 +0,0 @@ -libssl.so.0.9.8 \ No newline at end of file diff --git a/src/boot-env/preboot/uclib-rootfs/usr/lib/libssl.so.0.9.8 b/src/boot-env/preboot/uclib-rootfs/usr/lib/libssl.so.0.9.8 deleted file mode 100755 index 194078c5..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/usr/lib/libssl.so.0.9.8 and /dev/null differ diff --git a/src/boot-env/preboot/uclib-rootfs/usr/sbin/kdump b/src/boot-env/preboot/uclib-rootfs/usr/sbin/kdump deleted file mode 100755 index 07226a4b..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/usr/sbin/kdump and /dev/null differ diff --git a/src/boot-env/preboot/uclib-rootfs/usr/sbin/kexec b/src/boot-env/preboot/uclib-rootfs/usr/sbin/kexec deleted file mode 100755 index cc49c45c..00000000 Binary files a/src/boot-env/preboot/uclib-rootfs/usr/sbin/kexec and /dev/null differ -- cgit v1.2.3-55-g7522