diff options
author | Dirk von Suchodoletz | 2006-11-20 02:22:18 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-11-20 02:22:18 +0100 |
commit | 0d82010bdb9a85212a63069de5c9c2e7c5480d2d (patch) | |
tree | 046fbf8c4c52754453285e85087524bf4bb0dca2 /initramfs | |
parent | Support for commercial X servers (ATI at the moment ...) (diff) | |
download | core-0d82010bdb9a85212a63069de5c9c2e7c5480d2d.tar.gz core-0d82010bdb9a85212a63069de5c9c2e7c5480d2d.tar.xz core-0d82010bdb9a85212a63069de5c9c2e7c5480d2d.zip |
Support for nvidia too, still to be checked. Disable parallel start of
runlevel scripts in SuSE (no gain, but trouble), tvout option ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@515 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r-- | initramfs/distro-specs/suse/functions-10.1 | 38 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-default | 10 | ||||
-rwxr-xr-x | initramfs/initrd-stuff/bin/hwautocfg | 5 | ||||
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 4 |
4 files changed, 38 insertions, 19 deletions
diff --git a/initramfs/distro-specs/suse/functions-10.1 b/initramfs/distro-specs/suse/functions-10.1 index 136fe664..e36fd1af 100644 --- a/initramfs/distro-specs/suse/functions-10.1 +++ b/initramfs/distro-specs/suse/functions-10.1 @@ -120,29 +120,37 @@ sed -e "s,RC_LANG=.*,RC_LANG=\"${LANG}\" # added in initrd," \ -i /mnt/etc/${D_SYSCONFDIR}/language } -# check the glx stuff and configure it -checkglx () { +# check the glx and tvout stuff and configure it +checkgraphix () { +# test if unionfs case "${XMODULE}" in radeon) # check ${XDESC}/ hwsetup.info device string in Cards file and then # for needed components test -e /mnt/lib/modules/${KERNEL}/kernel/drivers/char/drm/fglrx.ko \ && test -e /mnt/usr/X11R6/lib/modules/drivers/fglrx_drv.* && { - XMODULE=fglrx - # it only works for UnionFS enabled systems - ln -sf /usr/X11R6/lib/libGL.so.1.2 \ - /mnt/usr/X11R6/lib/libGL.so.1 2>/dev/null + XMODULE=fglrx + # it only works for UnionFS enabled systems + ln -sf /usr/X11R6/lib/libGL.so.1.2 \ + /mnt/usr/X11R6/lib/libGL.so.1 2>/dev/null } - # there seems no problem, if no TV is connected - #TVOUT='\tOption\t\t"TVFormat" "PAL-B"\n -#\tOption\t\t"DesktopSetup" "horizontal"' + # check whether to enable tvout + if [ -n "$tvout" ] && [ "$tvout" != "no" -a "$tvout" != "NO" ] ; then + [ "$tvout" = "yes" ] && tvout="PAL-B" + TVOUT='\tOption\t\t"TVFormat" "'$tvout + TVOUT=$TVOUT'"\n\tOption\t\t"DesktopSetup" "horizontal"' + fi ;; nv) - # - # test -f /mnt/usr/X11R6/lib/modules/drivers/nvidia_drv.* - # gllib=$(ls /usr/X11R6/lib/libGL.so.1.0.*) - # ln -sf $gllib /mnt/usr/X11R6/lib/libGL.so.1 2>/dev/null - + # check for needed components + test -e /mnt/lib/modules/${KERNEL}/kernel/drivers/char/drm/nvidia.ko \ + && test -e /mnt/usr/X11R6/lib/modules/drivers/nvidia_drv.* && { + gllib=$(ls /usr/X11R6/lib/libGL.so.1.0.* 2>/dev/null|sed -n "1p") + if [ -n "$gllib" ] ; then + ln -sf $gllib /mnt/usr/X11R6/lib/libGL.so.1 2>/dev/null + XMODULE=nvidia + fi + } ;; esac -} +} diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default index 845e4ce1..83ef893f 100644 --- a/initramfs/distro-specs/suse/functions-default +++ b/initramfs/distro-specs/suse/functions-default @@ -13,6 +13,7 @@ # distro specific function called from servconfig script config_distro () { +# no need to run start scripts in parallel # enable magic sysrequest for the clients echo -e "# /etc/${D_SYSCONFDIR}/sysctl - file modified by $0 version $version"\ > /mnt/etc/${D_SYSCONFDIR}/sysctl.new @@ -30,6 +31,14 @@ echo -e "DXS VERSION = 4.1.0\nINITRAMFS GENERATION DATE = $date" \ # add the halt link to the 0 and 6 runlevel directories ln -sf ../halt /mnt/etc/${D_INITDIR}/rc0.d/S20halt ln -sf ../halt /mnt/etc/${D_INITDIR}/rc6.d/S20reboot +# enable execution of all important start scripts +# running stuff in parallel seems to be rather useless and generates some +# difficult to solve problems. If you want to try nevertheless enable the +# following line and disable the latter one (switching off that feature) +#sed -e "s,TARGETS =,TARGETS = xdm boot.ld," \ +# -i /mnt/etc/${D_INITDIR}/.depend.boot +sed -e "s,RUN_PARALLEL=.*,RUN_PARALLEL=\"no\"," \ + -i /mnt/etc/${D_SYSCONFDIR}/boot # if YaST2 should be runnable (without much effect anyway) on the client testmkd /mnt/var/log/YaST2 } @@ -141,6 +150,7 @@ sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"$start_xdmcp\"," \ # start the display manager as early as possible, but avoid that it is # started twice during bootup ... late_dm can postpone the start of # displaymanager and X if problems with keyboard, console occur ... +# might be connected to running startup scripts in parallel, see above ... if [ "x$late_dm" = "xyes" ] ; then ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/S01xdm ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/K18xdm diff --git a/initramfs/initrd-stuff/bin/hwautocfg b/initramfs/initrd-stuff/bin/hwautocfg index ccd56aa8..ae591673 100755 --- a/initramfs/initrd-stuff/bin/hwautocfg +++ b/initramfs/initrd-stuff/bin/hwautocfg @@ -126,8 +126,9 @@ if [ -z "$SCR_MODES" ] ; then #error "$hcfg_res" nonfatal fi monmanual=yes -# check for special X driver (fglrx, nvidia, ...) -checkglx +# check for special X driver (fglrx, nvidia, ...) and enable tvout if variable +# tvout is not "no" +checkgraphix # finally write config file echo -e "#\n# autogenerated X hardware configuration by $0\n# \ diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index b657c92f..ac17578a 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -912,8 +912,8 @@ done # by slxmkramfs from <distro>/functions-default & ~-version # find out if prerequisites for special X server modules are met (distro -# specific) -checkglx () { +# specific) and enable tvout if required +checkgraphix () { : } |