summaryrefslogtreecommitdiffstats
path: root/initrd
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-07-04 01:22:21 +0200
committerDirk von Suchodoletz2006-07-04 01:22:21 +0200
commit6c3c818766288b204a55edbfae08cd450dbd6b77 (patch)
treeee7b8634aea1aced0b2ca5d5150ee07f00741f5d /initrd
parentEnhanced debugging settings (see DebugLevel), some fixes for the use (diff)
downloadcore-6c3c818766288b204a55edbfae08cd450dbd6b77.tar.gz
core-6c3c818766288b204a55edbfae08cd450dbd6b77.tar.xz
core-6c3c818766288b204a55edbfae08cd450dbd6b77.zip
Simplified screenres a bit for busybox compatibility (all lowercase in
file) ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@268 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rwxr-xr-xinitrd/initrd-stuff/bin/hwautocfg8
-rwxr-xr-xinitrd/initrd-stuff/bin/screenres18
-rw-r--r--initrd/initrd-stuff/etc/functions28
-rw-r--r--initrd/initrd-stuff/usr/share/hwdata/Cards2
-rwxr-xr-xinitrd/mkdxsinitrd4
5 files changed, 36 insertions, 24 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg
index ecc48b1a..8992a947 100755
--- a/initrd/initrd-stuff/bin/hwautocfg
+++ b/initrd/initrd-stuff/bin/hwautocfg
@@ -98,7 +98,7 @@ if [ -n "$hw_graphic" ] ; then
CDP=${hw_graphic##* }
msg="Please check your graphic adaptor settings ($hw_graphic)."
if [ -z "$DRV" ] ; then error " Manual configuration of your graphic \
-hardware module to set failed.\n $msg" nonfatal
+hardware module setting failed.\n $msg" nonfatal
XMODULE=DRV
else
[ -z "${XMODULE}" ] && XMODULE=vesa
@@ -145,6 +145,9 @@ if [ -z "$SCR_MODES" ] ; then #error " $hwmsg resolution was attempted but not
fi
monmanual=yes
+# check for special X driver (fglrx, nvidia, ...)
+check_glx
+
# finally write config file
echo -e "#\n# autogenerated X hardware configuration by $0\n# \
Dirk von Suchodoletz <dirk@goe.net>, $date" >$xfc
@@ -368,12 +371,11 @@ test -f /proc/bus/usb/devices || mount -n -t usbfs usbfs /proc/bus/usb
[ -n "$IDE" ] && modprobe -q ide_generic 2>/dev/null
usleep 10 && hwsetup -v > /tmp/hwsetup.info
# remaining drivers listed in /tmp/hwsetup.info
-DRIVERLIST="${DRIVERLIST} ps/2 "
cat /tmp/hwsetup.info| while read LINE ; do
if strinstr "driver:" "${LINE}"; then
DRIVER=${LINE##driver: }
if ! strinstr " ${DRIVER} " "${DRIVERLIST}"; then
- strinstr "Card:" "${DRIVER}" || {
+ strinstr "Card:" "${DRIVER}" || strinstr "ps/2" "${DRIVER}" || {
modprobe ${MODPRV} ${DRIVER} &
usleep 8; }
DRIVERLIST="${DRIVERLIST} ${DRIVER}"
diff --git a/initrd/initrd-stuff/bin/screenres b/initrd/initrd-stuff/bin/screenres
index aa795174..8518b22e 100755
--- a/initrd/initrd-stuff/bin/screenres
+++ b/initrd/initrd-stuff/bin/screenres
@@ -1,6 +1,7 @@
#!/bin/sh
#
# Author(s): Felix Endres
+# Dirk von Suchodoletz, 04-07-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
@@ -36,7 +37,6 @@ default_vert_freq_range_hz="" #"60-90"
default_recommended_screen_modes="" #'"1024x768" "800x600" "640x480"'
-
calculate_max_horizontal_freq () {
highest_resolution=` echo $screen_resolutions | sed -n 's/"\([0-9x]*\)".*/\1/p'`
[ -z $highest_resolution ] && return # if the highest resolution can not be extracted, the frequency can not be calculated
@@ -123,9 +123,11 @@ define_max_recommended_horizontal_pixel_count () {
tmp_ddcprobe_output=$1
if [ -z $tmp_ddcprobe_output ]; then
tmp_ddcprobe_output=/tmp/ddcprobe_output
- ddcprobe > ${tmp_ddcprobe_output}
+ ddcprobe | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" \
+ > ${tmp_ddcprobe_output}
fi
-failed=`sed -n '/edid.*failed/Ip' ${tmp_ddcprobe_output}`
+# fixme: parameter I is not compatible with busybox - how to circumvent?
+failed=`sed -n '/edid.*failed/p' ${tmp_ddcprobe_output}`
if [ -n "$failed" ]; then
echo "Error: Display seems to be incapable of providing DDC Information"
# Print Defaults OPTIMIZEME: The defaults could be command line parameters
@@ -134,9 +136,9 @@ if [ -n "$failed" ]; then
echo "Vertical Frequency Range (Hz): $default_vert_freq_range_hz"
exit 1;
fi
-screen_size_in_qcm=$((`sed -n "s/[Ss]creen.*[Ss]ize[^0-9]*\([0-9]*\)[^0-9]*\([0-9]*\).*/\1 * \2/p" ${tmp_ddcprobe_output}`))
-max_pixels=$((`echo "\`sed -n '/edid/I,$s/.*[ \t]\([0-9]\{3,4\}\)x\([0-9]\{3,4\}\).*/\2 * \1/p' ${tmp_ddcprobe_output}|sort -rn| sed -n 1p\`"`))
-manufacturing_year=`sed -n 's/manufact.*\([12][90][0-9][0-9]\).*/\1/Ip' ${tmp_ddcprobe_output}`
+screen_size_in_qcm=$((`sed -n "s/screen.*size[^0-9]*\([0-9]*\)[^0-9]*\([0-9]*\).*/\1 * \2/p" ${tmp_ddcprobe_output}`))
+max_pixels=$((`echo "\`sed -n '/edid/,$s/.*[ \t]\([0-9]\{3,4\}\)x\([0-9]\{3,4\}\).*/\2 * \1/p' ${tmp_ddcprobe_output}|sort -rn| sed -n 1p\`"`))
+manufacturing_year=`sed -n 's/manufact.*\([12][90][0-9][0-9]\).*/\1/p' ${tmp_ddcprobe_output}`
[ -n "$DEBUG" ] && echo "Maximal Resolution: $max_pixels"
# 640x400 (below)
@@ -194,7 +196,7 @@ fi
# Find the lines with two times 3 to 4 digits delimited by an x. Print with the two values reverted, so sort sorts w.r.t the 2nd value. Then swap back
# Minor problem: If two Modes are found in a line, the second one is used.
-screen_resolutions=`sed -n '/edid/I,$s/\(.*[ \t]\)*\([0-9]\{3,4\}\) *x *\([0-9]\{3,4\}\).*/\3 x \2/p' ${tmp_ddcprobe_output}| sort -rn | sort -rnu | sed -n 's/\([0-9]\{3,4\}\) x \([0-9]\{3,4\}\).*/"\2x\1"/p' `
+screen_resolutions=`sed -n '/edid/,$s/\(.*[ \t]\)*\([0-9]\{3,4\}\) *x *\([0-9]\{3,4\}\).*/\3 x \2/p' ${tmp_ddcprobe_output}| sort -rn | sort -rnu | sed -n 's/\([0-9]\{3,4\}\) x \([0-9]\{3,4\}\).*/"\2x\1"/p' `
screen_resolutions=`echo $screen_resolutions`
echo "Supported Screen Modes: $screen_resolutions"
@@ -202,7 +204,7 @@ echo "Supported Screen Modes: $screen_resolutions"
######## Vertical and horizontal frequency ranges #########
# find a line with the word range and and numbers with a minus in the middle (e.g 123-321)
-frequency_ranges=`sed '/[Rr][Aa][Nn][Gg][Ee]/!d;s/[^0-9]*\([1-9][0-9]\)[ \t]*-[ \t]*\([1-9][0-9]*\)[^0-9]*\([1-9][0-9]*\)[ \t]*-[ \t]*\([1-9][0-9]*\).*/\1-\2 \3-\4/' ${tmp_ddcprobe_output}`
+frequency_ranges=`sed '/range/!d;s/[^0-9]*\([1-9][0-9]\)[ \t]*-[ \t]*\([1-9][0-9]*\)[^0-9]*\([1-9][0-9]*\)[ \t]*-[ \t]*\([1-9][0-9]*\).*/\1-\2 \3-\4/' ${tmp_ddcprobe_output}`
set -- $frequency_ranges # split into $1 und $2
if [ -z "$frequency_ranges" ] && [ $tft_probability -lt 50 ]; then
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index e48d52bc..a19b3eab 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -100,7 +100,7 @@ echo -e "$1 info: $2"
# the first argument gotten until zero
usleep () {
if [ -x /bin/usleep ]; then
- /bin/usleep `expr $1 \* 80000`
+ /bin/usleep `expr $1 \* 60000`
else
local count=`expr $1 \* 10`
while [ $count -gt 0 ] ; do count=`expr $count \- 1` ; done
@@ -741,6 +741,23 @@ for i in boot.ld ${D_INITSCRIPTS}; do
ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/K${revcnt}$i
done
}
+#######################################################################
+# find out if prerequisites for special X server modules are met
+# incomplete
+check_glx () {
+case "${XMODULE}" in
+ radeon)
+ # check ${XDESC}/ hwsetup.info device string in Cards file and then
+ # for needed components
+ test -f /lib/modules/${KERNEL}/kernel/drivers/char/drm/fglrx.ko && \
+ test -f /usr/X11R6/lib/modules/drivers/fglrx_drv.o
+ ;;
+ nv)
+ #
+ # test -f /usr/X11R6/lib/modules/drivers/nvidia_drv.o
+ ;;
+esac
+}
#######################################################################
# dummy functions
@@ -750,15 +767,6 @@ displayvars (){
:
}
-# AUS SuSE-9.3
-
-# linking runlevel scripts
-rllinker () {
- :
-}
-
-# group of functions for the normal runlevels - first parameter is start
-# second stop
# function for ntp configuration
config_ntp () {
:
diff --git a/initrd/initrd-stuff/usr/share/hwdata/Cards b/initrd/initrd-stuff/usr/share/hwdata/Cards
index 37fed48c..c92a19b5 100644
--- a/initrd/initrd-stuff/usr/share/hwdata/Cards
+++ b/initrd/initrd-stuff/usr/share/hwdata/Cards
@@ -2871,7 +2871,7 @@ CHIPSET SiS630
DRIVER sis
NOCLOCKPROBE
-NAME SiS 650
+NAME SiS 650/M650/651/740
CHIPSET SiS650
DRIVER sis
NOCLOCKPROBE
diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd
index aed9345e..d2359b69 100755
--- a/initrd/mkdxsinitrd
+++ b/initrd/mkdxsinitrd
@@ -3,7 +3,7 @@
# Description: universal (distro independent) generator for initial
# ramdisks for linux diskless clients
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-07-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 04-07-2006
# Nico Dietrich
# Felix Endres
#
@@ -425,7 +425,7 @@ if [ "$use_busybox" = 1 ]; then
echo "You wanted to include busybox, but did not provide it in \
initrd/ directory."; }
fi
-if [ "$use_busybox" ] ; then
+if [ -n "$use_busybox" ] ; then
cp busybox ${INSTDIR}/bin
for bbins in [ arping ash cat chmod chown chroot cp date \
dd df dmesg echo expr fdisk free hwclock insmod ip \