diff options
Diffstat (limited to 'initrd/initrd-stuff/bin')
| -rwxr-xr-x | initrd/initrd-stuff/bin/hwautocfg | 8 | ||||
| -rwxr-xr-x | initrd/initrd-stuff/bin/screenres | 18 |
2 files changed, 15 insertions, 11 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 |
