From: HyungKyu Song Date: Fri, 15 Feb 2013 16:00:50 +0000 (+0900) Subject: Tizen 2.0 Release X-Git-Tag: accepted/tizen_2.0/20130215.201536^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_2.0;p=adaptation%2Fintel_mfld%2Fxorg-server-configs-mfld-blackbay.git Tizen 2.0 Release --- diff --git a/Xmodmap b/Xmodmap new file mode 100644 index 0000000..2bac135 --- /dev/null +++ b/Xmodmap @@ -0,0 +1,11 @@ +keycode 123 = XF86AudioRaiseVolume +keycode 122 = XF86AudioLowerVolume +keycode 231 = XF86Standby +keycode 177 = XF86Send +keycode 110 = XF86Phone +keycode 182 = XF86Stop +keycode 124 = XF86PowerOff +keycode 179 = XF86WebCam +keycode 220 = XF86Pictures +keycode 153 = +keycode 239 = diff --git a/common/Xorg.sh b/common/Xorg.sh new file mode 100755 index 0000000..79a0def --- /dev/null +++ b/common/Xorg.sh @@ -0,0 +1,2 @@ +export HOME=/root +export DISPLAY=:0 diff --git a/common/Xresources b/common/Xresources new file mode 100644 index 0000000..032fd26 --- /dev/null +++ b/common/Xresources @@ -0,0 +1 @@ +Xft.dpi: 72 diff --git a/common/evdev.conf b/common/evdev.conf new file mode 100755 index 0000000..5d53d05 --- /dev/null +++ b/common/evdev.conf @@ -0,0 +1,22 @@ +Section "InputClass" + Identifier "evdev pointer catchall" + MatchIsPointer "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" +EndSection + +Section "InputClass" + Identifier "evdev touchscreen catchall" + MatchIsTouchScreen "on" + MatchDevicePath "/dev/input/event*" + Driver "evdevmultitouch" + Option "MultiTouch" "2" +EndSection + +Section "InputClass" + Identifier "evdev keyboard catchall" + MatchIsKeyboard "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" +EndSection + diff --git a/common/rotate.sh b/common/rotate.sh new file mode 100755 index 0000000..10c101c --- /dev/null +++ b/common/rotate.sh @@ -0,0 +1,87 @@ +#Variables +syntax_error=0 +orientation=0 + +#Detect the current orientation +current_orientation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')" +# 1=left, 2=inverted, 3=right, 0=normal + +#Next orintation, rotate 90 degrees +case $current_orientation in + normal) + orientation=3 + ;; + left) + orientation=0 + ;; + inverted) + orientation=1 + ;; + right) + orientation=2 + ;; +esac + +#Use the orientation if it is given +if [ "$1." != "." ]; then + orientation=$1 +fi + +#Touchscreen input method +method=evdev + +#Detect input device id +device=`xinput --list | grep Cando|awk '{ print $12 }' | awk -F '=' '{ print $2 }'` + +#Default input settings (first 2 rows of a 3x3 rotation matrix) +mata=1 +matb=0 +matc=0 +matd=0 +mate=1 +matf=0 + +#Work out the input settng for each orientatiom +case $orientation in + 0) + mata=1 + matb=0 + matc=0 + matd=0 + mate=1 + matf=0 + ;; + 1) + mata=0 + matb=-1 + matc=1 + matd=1 + mate=0 + matf=0 + ;; + 2 ) + mata=-1 + matb=0 + matc=1 + matd=0 + mate=-1 + matf=1 + ;; + 3 ) + mata=0 + matb=1 + matc=0 + matd=-1 + mate=0 + matf=1 + ;; +esac + +#Set the touchscreen rotation +if [ $method = "evdev" ]; then + xinput set-prop "$device" "Coordinate Transformation Matrix" $mata $matb $matc $matd $mate $matf 0 0 1 +fi + +#Set the screen rotation +xrandr -o $orientation + diff --git a/common/scripts/setcpu b/common/scripts/setcpu new file mode 100755 index 0000000..99787dc --- /dev/null +++ b/common/scripts/setcpu @@ -0,0 +1,24 @@ +#!/bin/sh + +if [ "$1" = "" ]; then + echo "Usage> /usr/bin/setcpu " + exit 1 +fi + +if [ "$1" = "perf" ]; then + echo "Setting CPU @ Performance Mode" + echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor +else + if [ "$1" = "performance" ]; then + echo "Setting CPU @ Performance Mode" + echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + else + if [ "$1" = "ondemand" ]; then + echo "Setting CPU @ Ondemand Mode" + echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + else + echo "Usage> /usr/bin/setcpu " + exit 1 + fi + fi +fi diff --git a/common/scripts/setpoll b/common/scripts/setpoll new file mode 100755 index 0000000..6011698 --- /dev/null +++ b/common/scripts/setpoll @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ "$1" = "" ]; then + echo "Usage> /usr/bin/setpoll < 0 or 1 >" + exit 1 +fi + +xinput set-prop "Pointer1" --type=int --format=8 "Evdev Use Poll" $1 diff --git a/common/startx b/common/startx new file mode 100755 index 0000000..c7d1c21 --- /dev/null +++ b/common/startx @@ -0,0 +1,29 @@ +#!/bin/sh + +DISPLAY=":0" +XORG_CONF=" -config /etc/X11/xorg.conf -configdir /etc/X11/xorg.conf.d " +OTHER_OPTIONS=" -ac -noreset -r +accessx 0 vt07 -nocursor -sharevts" + +udevadm trigger --subsystem-match=input & + +[ -x /usr/bin/pvrsrvinit ] && /usr/bin/pvrsrvinit + +if [ -e ~/.xinitrc ]; then + XINITRC=~/.xinitrc +else + XINITRC=/etc/X11/xinitrc +fi + +XSERVER_OPTIONS=" ${DISPLAY} ${OTHER_OPTIONS} ${XORG_CONF} " + +if [ "$1" = "--gdb" ]; then + gdb --args Xorg ${XSERVER_OPTIONS} +else + if [ "$1" = "--only" ]; then + Xorg ${XSERVER_OPTIONS} & + else + xinit ${XINITRC} -- /usr/bin/Xorg ${XSERVER_OPTIONS} & + fi +fi + + diff --git a/common/xinitrc b/common/xinitrc new file mode 100755 index 0000000..21a2d8c --- /dev/null +++ b/common/xinitrc @@ -0,0 +1,32 @@ +#!/bin/sh + +# Remapping the keycodes to our key-symbols +if [ -x /usr/bin/xmodmap ]; then + if [ -f /root/.xmodmap ]; then + xmodmap /root/.xmodmap + else + xmodmap - < /etc/X11/Xmodmap + fi +fi + +/usr/bin/scim -d & + +# set dpi +if [ -x /usr/bin/xrdb ]; then + if [ -e ~/.Xresources ]; then + /usr/bin/xrdb -load -nocpp ~/.Xresources + else + /usr/bin/xrdb -load -nocpp /etc/X11/Xresources + fi +fi +[ -x /usr/bin/rotate.sh ] && /usr/bin/rotate.sh + +# Copy .e directory if not exist +export HOME=/opt/home/app + +if [ ! -d ${HOME}/.e ]; then + cp -rf /opt/home/root/.e ${HOME}/.e + chown -R app:app ${HOME}/.e +fi + +su -c "HOME=/opt/home/app /usr/bin/enlightenment_start -profile samsung -i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it &" -l app diff --git a/common/xorg.conf b/common/xorg.conf new file mode 100755 index 0000000..d4cf7c6 --- /dev/null +++ b/common/xorg.conf @@ -0,0 +1,45 @@ +Section "ServerLayout" + Identifier "Test Layout" + Screen 0 "Screen0" 0 0 +EndSection + +Section "Screen" + Identifier "Screen0" + Device "emulfb" + Monitor "Monitor0" + # SubSection "Display" + # Modes "480x800" + # EndSubSection +EndSection + +Section "Monitor" + Identifier "Monitor0" + Option "DPMS" "true" +EndSection + +Section "ServerFlags" + Option "blank time" "0" + Option "standby time" "0" + Option "suspend time" "0" + Option "off time" "0" +EndSection + +Section "Device" + Identifier "emulfb" + Driver "emulfb" + Option "fbdev" "/dev/fb0" +EndSection + +Section "InputClass" + Identifier "evdev pointer catchall" + MatchIsPointer "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" +EndSection + +Section "InputClass" + Identifier "evdev keyboard catchall" + MatchIsKeyboard "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" +EndSection diff --git a/common/xresources b/common/xresources new file mode 100755 index 0000000..287ae8a --- /dev/null +++ b/common/xresources @@ -0,0 +1,29 @@ +#!/bin/sh + +set -e + +case "$1" in + start|stop|restart|reload|force-reload) + # Setting dpi to 72 + if [ -x /usr/bin/xrdb ]; then + if [ -e ~/.Xresources ]; then + /usr/bin/xrdb -load -nocpp ~/.Xresources + else + /usr/bin/xrdb -load -nocpp /etc/X11/Xresources + fi + fi + ;; + + status) + if [ -x /usr/bin/xrdb ]; then + /usr/bin/xrdb -query -nocpp + fi + ;; + + *) + echo "Usage: /etc/init.d/xresource {start|stop|status|restart|reload|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/common/xserver b/common/xserver new file mode 100755 index 0000000..8026ca8 --- /dev/null +++ b/common/xserver @@ -0,0 +1,53 @@ +#!/bin/sh + +set -e + +export DISPLAY=:0 +export PATH=/bin:/usr/bin/:/sbin:/usr/sbin + +case "$1" in + start) + is_running=`ps | grep -v grep | awk '{ print \$6 }' | grep Xorg` || true + if [ "${is_running}" = "" ]; then + echo "Starting Xorg server..." + /usr/bin/startx + else + echo "Xorg server is running already..." + fi + ;; + + restart|reload|force-reload) + is_running=`ps | grep -v grep | awk '{ print \$6 }' | grep Xorg` || true + if [ "${is_running}" != "" ]; then + $0 stop || true + sleep 3 + fi + $0 start || true + ;; + + stop) + is_running=`ps | grep -v grep | awk '{ print \$6 }' | grep Xorg` || true + if [ "${is_running}" != "" ]; then + echo "Stopping Xorg server..." + killall -9 Xorg + else + echo "Xorg server is not running..." + fi + ;; + + status) + is_running=`ps | grep -v grep | awk '{ print \$6 }' | grep Xorg` || true + if [ "${is_running}" = "" ]; then + echo "Xorg server is not running..." + else + echo "Xorg server is running..." + fi + ;; + + *) + echo "Usage: /etc/init.d/xserver {start|stop|status|restart|reload|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/packaging/xorg-server-configs-mfld-blackbay.changes b/packaging/xorg-server-configs-mfld-blackbay.changes new file mode 100644 index 0000000..333ed08 --- /dev/null +++ b/packaging/xorg-server-configs-mfld-blackbay.changes @@ -0,0 +1,10 @@ +* Wed Oct 24 2012 Chengwei Yang - 0.0.1 +- start system-server here raised a issue TZSP-3442 + +* Tue Jul 24 2012 Austin Zhang - 0.0.1 +- Removed default touchscreen config for IA, instead different + products have their own config. + +* Fri Jul 20 2012 Peng Li - 0.0.1 +- add "-sharevts" parameter for X launch on IA + diff --git a/packaging/xorg-server-configs-mfld-blackbay.spec b/packaging/xorg-server-configs-mfld-blackbay.spec new file mode 100644 index 0000000..04d4f29 --- /dev/null +++ b/packaging/xorg-server-configs-mfld-blackbay.spec @@ -0,0 +1,61 @@ +%define debug_package %{nil} + +Name: xorg-server-configs-mfld-blackbay +Summary: X.Org X11 X server mdfld blackbay packages +Version: 0.0.5 +Release: 1 +Group: System/X11 +License: MIT +Source0: %{name}-%{version}.tar.bz2 +Provides: xorg-x11-server-misc-emulfb + +%description +Xorg server misc package which contains startx, xinitrc and xorg.conf file for emulfb + + +%prep +%setup -q + + +%build + +%install + +mkdir -p %{buildroot}/etc/rc.d/init.d/ +mkdir -p %{buildroot}/etc/rc.d/rc3.d/ +mkdir -p %{buildroot}/etc/rc.d/rc4.d/ +mkdir -p %{buildroot}/etc/profile.d/ +mkdir -p %{buildroot}/etc/X11/ +mkdir -p %{buildroot}/usr/bin +mkdir -p %{buildroot}/etc/X11/xorg.conf.d/ +cp -af common/evdev.conf %{buildroot}/etc/X11/xorg.conf.d/ +cp -af common/xserver %{buildroot}/etc/rc.d/init.d/ +cp -af common/xresources %{buildroot}/etc/rc.d/init.d/ +cp -af common/xinitrc %{buildroot}//etc/X11/ +cp -af common/scripts/* %{buildroot}/usr/bin +cp -af common/startx %{buildroot}/usr/bin + + +ln -sf /etc/rc.d/init.d/xserver %{buildroot}/etc/rc.d/rc3.d/S20xserver +ln -sf /etc/rc.d/init.d/xserver %{buildroot}/etc/rc.d/rc4.d/S20xserver +ln -sf /etc/rc.d/init.d/xresources %{buildroot}/etc/rc.d/rc3.d/S80xresources +ln -sf /etc/rc.d/init.d/xresources %{buildroot}/etc/rc.d/rc4.d/S80xresources + +cp -af common/Xorg.sh %{buildroot}/etc/profile.d/ + +cp Xmodmap %{buildroot}/etc/X11 +cp common/Xresources %{buildroot}/etc/X11/ + +%files +/etc/X11/xorg.conf.d +%{_sysconfdir}/profile.d/Xorg.sh +%{_sysconfdir}/rc.d/init.d/* +%{_sysconfdir}/rc.d/rc3.d/* +%{_sysconfdir}/rc.d/rc4.d/* +%attr(-,app,app) /etc/X11/Xresources +/etc/X11/xinitrc +%{_bindir}/setcpu +%{_bindir}/setpoll +%{_bindir}/startx +/etc/X11/xorg.conf.d/evdev.conf +/etc/X11/Xmodmap