xserver-common, zaurusd: Use native xserver orientation for spitz, akita and borzoi...
authorStanislav Brabec <utx@penguin.cz>
Mon, 22 Jun 2009 20:57:32 +0000 (20:57 +0000)
committerutx@penguin.cz <utx@penguin.cz>
Mon, 22 Jun 2009 20:57:32 +0000 (20:57 +0000)
recipes/xserver-common/files/avoid-rotated-server.patch [new file with mode: 0644]
recipes/xserver-common/xserver-common_1.25.bb
recipes/zaurusd/files/avoid-rotated-server.patch

diff --git a/recipes/xserver-common/files/avoid-rotated-server.patch b/recipes/xserver-common/files/avoid-rotated-server.patch
new file mode 100644 (file)
index 0000000..7511ed9
--- /dev/null
@@ -0,0 +1,72 @@
+Index: xserver-common-1.25/X11/Xserver
+===================================================================
+--- xserver-common-1.25.orig/X11/Xserver       2009-06-18 20:48:31.000000000 +0000
++++ xserver-common-1.25/X11/Xserver    2009-06-18 20:49:36.000000000 +0000
+@@ -48,6 +48,7 @@
+ SCREEN_SIZE=`fallback_screen_arg`
+ export USER=root
++export XSERVER_DEFAULT_ORIENTATION=normal
+ ARGS="-br -pn $INPUT_EXTRA_ARGS"
+@@ -88,7 +89,9 @@
+       "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi")
+               ARGS="$ARGS -dpi 200 -rgba rgb" ;;
+       "SHARP Spitz" | "SHARP Akita" | "SHARP Borzoi")
+-              ARGS="$ARGS -dpi 200 -rgba rgb -screen 480x640@270" ;;
++              ARGS="$ARGS -dpi 200 -rgba rgb -screen 480x640"
++              export XSERVER_DEFAULT_ORIENTATION=normal
++              ;;
+       "Simpad")
+               ARGS="$ARGS -dpi 100 -rgba rgb" ;;
+       "Generic OMAP1510/1610/1710")
+Index: xserver-common-1.25/X11/Xinit.d/11zaurus
+===================================================================
+--- xserver-common-1.25.orig/X11/Xinit.d/11zaurus      2009-06-18 20:48:31.000000000 +0000
++++ xserver-common-1.25/X11/Xinit.d/11zaurus   2009-06-18 21:07:14.000000000 +0000
+@@ -1,23 +1,35 @@
+ #!/bin/sh
+-if [ -z "`which chkhinge`" ]; then
+-   # probably not a clamshell zaurus
+-   exit 0
++if [ -z "`which chkhinge 2>/dev/null`" ]; then
++   # not a clamshell zaurus or we have kernel 2.6
++   # no rotation status check available
++   CHCK=true
++else
++   CHCK=chkhinge
+ fi
+ module_id() {
+     # Get model name
+-    echo `grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//" | tr a-z A-Z`
++    echo `grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//"`
+ }
+-chkhinge -e
++$CHCK -e
+ if [ $? = 12 ]; then
+    case `module_id` in
+-      *SPITZ | *AKITA | *BORZOI)
+-              DIRECTION="left" ;;
+-        default)
++      *Spitz | *Akita | *Borzoi)
++              DIRECTION="normal" ;;
++        *)
+                 DIRECTION="right" ;;
+    esac
+-   xrandr -o $DIRECTION
++else
++   case `module_id` in
++      *Spitz | *Akita | *Borzoi)
++              # Xfbdev needs to settle
++              sleep 2
++              DIRECTION="right" ;;
++        *)
++                DIRECTION="normal" ;;
++   esac
+ fi
++xrandr -o $DIRECTION
index e0a1231..9db0c2a 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "Common X11 scripts and support files"
 LICENSE = "GPL"
 SECTION = "x11"
 RDEPENDS_${PN} = "xmodmap xrandr xdpyinfo"
-PR = "r0"
+PR = "r1"
 
 PACKAGE_ARCH = "all"
 
@@ -11,6 +11,7 @@ inherit gpe
 
 SRC_URI_append = " file://setDPI.sh \
                    file://89xdgautostart.sh \
+                   file://avoid-rotated-server.patch;patch=1 \
 "
 
 do_install_append() {
index be1005f..0ee6012 100644 (file)
@@ -10,8 +10,8 @@ Index: zaurusd/config/mach-config/mach-akita-vars.in
 \ No newline at end of file
 +ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
 +
-+export XRANDR_LANDSCAPE=normal
-+export XRANDR_PORTRAIT=left
++export XRANDR_LANDSCAPE=right
++export XRANDR_PORTRAIT=normal
 Index: zaurusd/config/mach-config/mach-borzoi-vars.in
 ===================================================================
 --- zaurusd.orig/config/mach-config/mach-borzoi-vars.in        2009-03-07 11:04:43.000000000 +0000
@@ -27,8 +27,8 @@ Index: zaurusd/config/mach-config/mach-borzoi-vars.in
 \ No newline at end of file
 +ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
 +
-+export XRANDR_LANDSCAPE=normal
-+export XRANDR_PORTRAIT=left
++export XRANDR_LANDSCAPE=right
++export XRANDR_PORTRAIT=normal
 Index: zaurusd/config/mach-config/mach-corgi-vars.in
 ===================================================================
 --- zaurusd.orig/config/mach-config/mach-corgi-vars.in 2009-03-07 11:04:43.000000000 +0000
@@ -108,8 +108,8 @@ Index: zaurusd/config/mach-config/mach-spitz-vars.in
 \ No newline at end of file
 +ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
 +
-+export XRANDR_LANDSCAPE=normal
-+export XRANDR_PORTRAIT=left
++export XRANDR_LANDSCAPE=right
++export XRANDR_PORTRAIT=normal
 Index: zaurusd/config/mach-config/mach-tosa-vars.in
 ===================================================================
 --- zaurusd.orig/config/mach-config/mach-tosa-vars.in  2009-03-07 11:04:43.000000000 +0000