VirtualBox

Changeset 50345 in vbox for trunk/src


Ignore:
Timestamp:
Feb 6, 2014 2:33:06 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92084
Message:

Additions/solaris/Installer: Support VMSVGA.

Location:
trunk/src/VBox/Additions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/solaris/Installer/postinstall.sh

    r47318 r50345  
    242242            fi
    243243
    244             # Adjust xorg.conf with video driver sections
    245             $vboxadditions_path/x11config15sol.pl
     244            # Check for VirtualBox graphics card
     245            is_vboxgraphics=`prtconf -d | grep -i pci80ee,beef`
     246            if test "$?" -eq 0; then
     247                drivername="vboxvideo"
     248            else
     249                # Check for VMware graphics card
     250                is_vmwaregraphics=`prtconf -d | grep -i pci15ad,405`
     251                if test "$?" -eq 0; then
     252                    echo "Configuring X.Org to use VMware SVGA graphics driver..."
     253                    drivername="vmware"
     254                fi
     255            fi
     256
     257            # Adjust xorg.conf with video driver sections if a supported graphics card is found
     258            if test ! -z "$drivername"; then
     259                $vboxadditions_path/x11config15sol.pl "$drivername"
     260            else
     261                # No supported graphics card found, do nothing.
     262                echo "## No supported graphics card found. Skipped configuring of X.org drivers."
     263            fi
    246264        fi
    247265    fi
  • trunk/src/VBox/Additions/x11/Installer/x11config15sol.pl

    r44528 r50345  
    1 #!/usr/bin/perl -w
     1#!/usr/bin/perl
    22#
    33# Guest Additions X11 config update script
     
    1414#
    1515
     16use strict;
     17use warnings;
     18
    1619my $temp="/tmp/xorg.conf";
    1720my $os_type=`uname -s`;
    18 my @cfg_files = ("/etc/X11/xorg.conf-4", "/etc/X11/xorg.conf", "/etc/X11/.xorg.conf", "/etc/xorg.conf",
     21my @cfg_files = ("/etc/X11/xorg.conf", "/etc/X11/.xorg.conf", "/etc/X11/xorg.conf-4", "/etc/xorg.conf",
    1922                 "/usr/etc/X11/xorg.conf-4", "/usr/etc/X11/xorg.conf", "/usr/lib/X11/xorg.conf-4",
    2023                 "/usr/lib/X11/xorg.conf", "/etc/X11/XF86Config-4", "/etc/X11/XF86Config",
    2124                 "/etc/XF86Config", "/usr/X11R6/etc/X11/XF86Config-4", "/usr/X11R6/etc/X11/XF86Config",
    2225                 "/usr/X11R6/lib/X11/XF86Config-4", "/usr/X11R6/lib/X11/XF86Config");
     26
     27## @todo: r=ramshankar: Hmm, why do we use the same variable name with upper/lower case for different variables?
     28my $cfg;
    2329my $CFG;
    2430my $TMP;
    25 
     31my $line;
    2632my $config_count = 0;
    2733
     34# Command line options
     35if ($#ARGV < 0)
     36{
     37   die "x11config15sol.pl: Missing driver name argument to configure for X.org";
     38}
     39my $driver_name = $ARGV[0];
     40
     41# Loop through all possible config files and change them. It's done this wasy for hysterical raisins
     42# as we didn't know what the correct config file is so we update all of them. However, for Solaris it's
     43# most likely -only- one of the 2 config files (/etc/X11/xorg.conf, /etc/X11/.xorg.conf).
    2844foreach $cfg (@cfg_files)
    2945{
    30 
    3146    if (open(CFG, $cfg))
    3247    {
     
    4459                    $in_section = 1;
    4560                }
    46             } else {
     61            }
     62                        else
     63                    {
    4764                if ($line =~ /^\s*EndSection/i)
    4865                {
     
    5572                if ($line =~ /^\s*driver\s+\"(?:fbdev|vga|vesa|vboxvideo|ChangeMe)\"/i)
    5673                {
    57                     $line = "    Driver      \"vboxvideo\"\n";
     74                    $line = "    Driver      \"$driver_name\"\n";
    5875                }
    5976            }
     
    7895
    7996$config_count != 0 or die "Could not find any X11 configuration files";
     97
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette